diff options
Diffstat (limited to 'java/com/android/dialer/app/dialpad')
-rw-r--r-- | java/com/android/dialer/app/dialpad/DialpadFragment.java | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/java/com/android/dialer/app/dialpad/DialpadFragment.java b/java/com/android/dialer/app/dialpad/DialpadFragment.java index e9d57b399..3cd3ac27c 100644 --- a/java/com/android/dialer/app/dialpad/DialpadFragment.java +++ b/java/com/android/dialer/app/dialpad/DialpadFragment.java @@ -29,6 +29,7 @@ import android.content.DialogInterface; import android.content.Intent; import android.content.IntentFilter; import android.content.pm.PackageManager; +import android.content.res.Resources; import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; @@ -84,6 +85,9 @@ import com.android.dialer.common.LogUtil; import com.android.dialer.dialpadview.DialpadKeyButton; import com.android.dialer.dialpadview.DialpadView; import com.android.dialer.location.GeoUtil; +import com.android.dialer.logging.UiAction; +import com.android.dialer.oem.MotorolaUtils; +import com.android.dialer.performancereport.PerformanceReport; import com.android.dialer.proguard.UsedByReflection; import com.android.dialer.telecom.TelecomUtil; import com.android.dialer.util.CallUtil; @@ -626,6 +630,14 @@ public class DialpadFragment extends Fragment Trace.beginSection(TAG + " onResume"); super.onResume(); + Resources res = getResources(); + int iconId = R.drawable.quantum_ic_call_vd_theme_24; + if (MotorolaUtils.isWifiCallingAvailable(getContext())) { + iconId = R.drawable.ic_wifi_calling; + } + mFloatingActionButtonController.changeIcon( + res.getDrawable(iconId, null), res.getString(R.string.description_dial_button)); + final DialtactsActivity activity = (DialtactsActivity) getActivity(); mDialpadQueryListener = activity; @@ -1005,6 +1017,8 @@ public class DialpadFragment extends Fragment */ private void handleDialButtonPressed() { if (isDigitsEmpty()) { // No number entered. + // No real call made, so treat it as a click + PerformanceReport.recordClick(UiAction.Type.PRESS_CALL_BUTTON_WITHOUT_CALLING); handleDialButtonClickWithEmptyDigits(); } else { final String number = mDigits.getText().toString(); @@ -1015,6 +1029,7 @@ public class DialpadFragment extends Fragment if (number != null && !TextUtils.isEmpty(mProhibitedPhoneNumberRegexp) && number.matches(mProhibitedPhoneNumberRegexp)) { + PerformanceReport.recordClick(UiAction.Type.PRESS_CALL_BUTTON_WITHOUT_CALLING); LogUtil.i( "DialpadFragment.handleDialButtonPressed", "The phone number is prohibited explicitly by a rule."); @@ -1051,6 +1066,10 @@ public class DialpadFragment extends Fragment startActivity(newFlashIntent()); } else { if (!TextUtils.isEmpty(mLastNumberDialed)) { + // Dialpad will be filled with last called number, + // but we don't want to record it as user action + PerformanceReport.setIgnoreActionOnce(UiAction.Type.TEXT_CHANGE_WITH_INPUT); + // Recall the last number dialed. mDigits.setText(mLastNumberDialed); @@ -1166,6 +1185,10 @@ public class DialpadFragment extends Fragment mDialpadView.setVisibility(View.GONE); } + if (mOverflowPopupMenu != null) { + mOverflowPopupMenu.dismiss(); + } + mFloatingActionButtonController.setVisible(false); mDialpadChooser.setVisibility(View.VISIBLE); |