From cc2cde0555bd49362f7631c64d24221b24ed71c8 Mon Sep 17 00:00:00 2001 From: zachh Date: Thu, 31 Aug 2017 12:34:18 -0700 Subject: Added logging to aid debugging of issue where dialer shows blank screen. Bug: 64129606 Test: none PiperOrigin-RevId: 167174480 Change-Id: I4b5a494b0b334b42ee053c4d4d1e81d7699461d0 --- .../dialer/dialpadview/DialpadFragment.java | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'java/com/android/dialer/dialpadview') diff --git a/java/com/android/dialer/dialpadview/DialpadFragment.java b/java/com/android/dialer/dialpadview/DialpadFragment.java index c15014fd0..e22250c6f 100644 --- a/java/com/android/dialer/dialpadview/DialpadFragment.java +++ b/java/com/android/dialer/dialpadview/DialpadFragment.java @@ -317,6 +317,7 @@ public class DialpadFragment extends Fragment @Override public void onCreate(Bundle state) { Trace.beginSection(TAG + " onCreate"); + LogUtil.enterBlock("DialpadFragment.onCreate"); super.onCreate(state); mFirstLaunch = state == null; @@ -352,6 +353,7 @@ public class DialpadFragment extends Fragment @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedState) { Trace.beginSection(TAG + " onCreateView"); + LogUtil.enterBlock("DialpadFragment.onCreateView"); Trace.beginSection(TAG + " inflate view"); View fragmentView = inflater.inflate(R.layout.dialpad_fragment, container, false); Trace.endSection(); @@ -393,6 +395,7 @@ public class DialpadFragment extends Fragment (v, event) -> { if (isDigitsEmpty()) { if (getActivity() != null) { + LogUtil.i("DialpadFragment.onCreateView", "dialpad spacer touched"); return ((HostInterface) getActivity()).onDialpadSpacerTouchWithEmptyQuery(); } return true; @@ -486,12 +489,16 @@ public class DialpadFragment extends Fragment * screen to enter "Add Call" mode, this method will show correct UI for the mode. */ private void configureScreenFromIntent(Activity parent) { + LogUtil.enterBlock("DialpadFragment.configureScreenFromIntent"); + // If we were not invoked with a DIAL intent if (!Intent.ACTION_DIAL.equals(parent.getIntent().getAction())) { setStartedFromNewIntent(false); return; } + LogUtil.i("DialpadFragment.configureScreenFromIntent", "dial intent"); + // See if we were invoked with a DIAL intent. If we were, fill in the appropriate // digits in the dialer field. Intent intent = parent.getIntent(); @@ -521,6 +528,7 @@ public class DialpadFragment extends Fragment if (!(mStartedFromNewIntent && digitsFilled)) { final String action = intent.getAction(); + LogUtil.i("DialpadFragment.configureScreenFromIntent", "action: %s", action); if (Intent.ACTION_DIAL.equals(action) || Intent.ACTION_VIEW.equals(action) || Intent.ACTION_MAIN.equals(action)) { @@ -532,6 +540,10 @@ public class DialpadFragment extends Fragment } } } + LogUtil.i( + "DialpadFragment.configureScreenFromIntent", + "needToShowDialpadChooser? %b", + needToShowDialpadChooser); showDialpadChooser(needToShowDialpadChooser); setStartedFromNewIntent(false); } @@ -595,7 +607,7 @@ public class DialpadFragment extends Fragment @Override public void onStart() { - LogUtil.d("DialpadFragment.onStart", "first launch: %b", mFirstLaunch); + LogUtil.i("DialpadFragment.onStart", "first launch: %b", mFirstLaunch); Trace.beginSection(TAG + " onStart"); super.onStart(); // if the mToneGenerator creation fails, just continue without it. It is @@ -622,7 +634,7 @@ public class DialpadFragment extends Fragment @Override public void onResume() { - LogUtil.d("DialpadFragment.onResume", ""); + LogUtil.enterBlock("DialpadFragment.onResume"); Trace.beginSection(TAG + " onResume"); super.onResume(); @@ -662,6 +674,7 @@ public class DialpadFragment extends Fragment stopWatch.lap("fdin"); if (!isPhoneInUse()) { + LogUtil.i("DialpadFragment.onResume", "phone not in use"); // A sanity-check: the "dialpad chooser" UI should not be visible if the phone is idle. showDialpadChooser(false); } @@ -711,6 +724,7 @@ public class DialpadFragment extends Fragment @Override public void onStop() { + LogUtil.enterBlock("DialpadFragment.onStop"); super.onStop(); synchronized (mToneGeneratorLock) { @@ -991,6 +1005,7 @@ public class DialpadFragment extends Fragment } private void hideAndClearDialpad(boolean animate) { + LogUtil.enterBlock("DialpadFragment.hideAndClearDialpad"); FragmentUtils.getParentUnsafe(this, DialpadListener.class).hideDialpadFragment(animate, true); } @@ -1194,8 +1209,10 @@ public class DialpadFragment extends Fragment } else { LogUtil.i("DialpadFragment.showDialpadChooser", "Displaying normal Dialer UI."); if (mDialpadView != null) { + LogUtil.i("DialpadFragment.showDialpadChooser", "mDialpadView not null"); mDialpadView.setVisibility(View.VISIBLE); } else { + LogUtil.i("DialpadFragment.showDialpadChooser", "mDialpadView null"); mDigits.setVisibility(View.VISIBLE); } @@ -1681,6 +1698,7 @@ public class DialpadFragment extends Fragment // one of the choices, which would be confusing. (But at // least that's better than leaving the dialpad chooser // onscreen, but useless...) + LogUtil.i("CallStateReceiver.onReceive", "hiding dialpad chooser, state: %s", state); showDialpadChooser(false); } } -- cgit v1.2.3