summaryrefslogtreecommitdiff
path: root/java/com/android/incallui
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2018-01-18 02:03:07 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2018-01-18 02:03:07 +0000
commitc332a5f54c2ea6459f66bd7bed33a5511e8609ac (patch)
tree9f6712592e098fe5c26f8609285aa5c373896aba /java/com/android/incallui
parent177a18757ed4954525ba662c0201079ea7f94d74 (diff)
parent6d123ee49dadb918acf5a3c57fee57d3aff6bab2 (diff)
Merge changes If884d5a1,I2a28d025
* changes: Relax number matching when coalescing rows in new call log. Move onUiShowing() call from onResume/onPause to onStart/onStop.
Diffstat (limited to 'java/com/android/incallui')
-rw-r--r--java/com/android/incallui/InCallActivity.java18
-rw-r--r--java/com/android/incallui/InCallPresenter.java6
2 files changed, 15 insertions, 9 deletions
diff --git a/java/com/android/incallui/InCallActivity.java b/java/com/android/incallui/InCallActivity.java
index 0a5666690..990560674 100644
--- a/java/com/android/incallui/InCallActivity.java
+++ b/java/com/android/incallui/InCallActivity.java
@@ -406,6 +406,10 @@ public class InCallActivity extends TransactionSafeFragmentActivity
== InCallOrientationEventListener.ACTIVITY_PREFERENCE_ALLOW_ROTATION);
InCallPresenter.getInstance().onActivityStarted();
+ if (!isRecreating) {
+ InCallPresenter.getInstance().onUiShowing(true);
+ }
+
if (ActivityCompat.isInMultiWindowMode(this)
&& !getResources().getBoolean(R.bool.incall_dialpad_allowed)) {
// Hide the dialpad because there may not be enough room
@@ -422,7 +426,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity
if (!InCallPresenter.getInstance().isReadyForTearDown()) {
updateTaskDescription();
- InCallPresenter.getInstance().onUiShowing(true);
+ InCallPresenter.getInstance().updateNotification();
}
// If there is a pending request to show or hide the dialpad, handle that now.
@@ -479,12 +483,7 @@ public class InCallActivity extends TransactionSafeFragmentActivity
dialpadFragment.onDialerKeyUp(null);
}
- if (!isRecreating) {
- InCallPresenter.getInstance().onUiShowing(false);
- }
- if (isFinishing()) {
- InCallPresenter.getInstance().unsetActivity(this);
- }
+ InCallPresenter.getInstance().updateNotification();
InCallPresenter.getInstance().getPseudoScreenState().removeListener(this);
Trace.endSection();
@@ -513,11 +512,16 @@ public class InCallActivity extends TransactionSafeFragmentActivity
InCallPresenter.getInstance().updateIsChangingConfigurations();
InCallPresenter.getInstance().onActivityStopped();
if (!isRecreating) {
+ InCallPresenter.getInstance().onUiShowing(false);
if (errorDialog != null) {
errorDialog.dismiss();
}
}
+ if (isFinishing()) {
+ InCallPresenter.getInstance().unsetActivity(this);
+ }
+
Trace.endSection();
}
diff --git a/java/com/android/incallui/InCallPresenter.java b/java/com/android/incallui/InCallPresenter.java
index f0d3adc7a..558ca33fc 100644
--- a/java/com/android/incallui/InCallPresenter.java
+++ b/java/com/android/incallui/InCallPresenter.java
@@ -1044,14 +1044,16 @@ public class InCallPresenter implements CallList.Listener, AudioModeProvider.Aud
"updateIsChangingConfigurations = " + isChangingConfigurations);
}
- /** Called when the activity goes in/out of the foreground. */
- public void onUiShowing(boolean showing) {
+ void updateNotification() {
// We need to update the notification bar when we leave the UI because that
// could trigger it to show again.
if (statusBarNotifier != null) {
statusBarNotifier.updateNotification();
}
+ }
+ /** Called when the activity goes in/out of the foreground. */
+ public void onUiShowing(boolean showing) {
if (proximitySensor != null) {
proximitySensor.onInCallShowing(showing);
}