summaryrefslogtreecommitdiff
path: root/InCallUI
diff options
context:
space:
mode:
authorYorke Lee <yorkelee@google.com>2015-06-01 19:06:35 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-06-01 19:06:35 +0000
commit8ba67a3e93d3ccd72248788c562c36edc9330ed7 (patch)
tree0523ba2cc9fe44a4134e47c978246db75c3c75ab /InCallUI
parentb0836e7888590c4c708725e02cdfd1eb73e5b73f (diff)
parent44e7b2d7212f9862f3bfa9f13bffd92959a58e43 (diff)
am 461c4ba4: am bc3c1d98: am e9478f1b: Merge "Disable OrientationEventListener when activity backgrounded" into mnc-dev
* commit '461c4ba4c0c72d9c06c8089bd0fceb31e364625c': Disable OrientationEventListener when activity backgrounded
Diffstat (limited to 'InCallUI')
-rw-r--r--InCallUI/src/com/android/incallui/InCallActivity.java17
1 files changed, 9 insertions, 8 deletions
diff --git a/InCallUI/src/com/android/incallui/InCallActivity.java b/InCallUI/src/com/android/incallui/InCallActivity.java
index 89e73439b..01ddac4ec 100644
--- a/InCallUI/src/com/android/incallui/InCallActivity.java
+++ b/InCallUI/src/com/android/incallui/InCallActivity.java
@@ -233,13 +233,6 @@ public class InCallActivity extends Activity implements FragmentDisplayManager {
}
};
- if (mOrientationEventListener.canDetectOrientation()) {
- Log.v(this, "Orientation detection enabled.");
- mOrientationEventListener.enable();
- } else {
- Log.v(this, "Orientation detection disabled.");
- mOrientationEventListener.disable();
- }
Log.d(this, "onCreate(): exit");
}
@@ -259,6 +252,14 @@ public class InCallActivity extends Activity implements FragmentDisplayManager {
Log.d(this, "onStart()...");
super.onStart();
+ if (mOrientationEventListener.canDetectOrientation()) {
+ Log.v(this, "Orientation detection enabled.");
+ mOrientationEventListener.enable();
+ } else {
+ Log.v(this, "Orientation detection disabled.");
+ mOrientationEventListener.disable();
+ }
+
// setting activity should be last thing in setup process
InCallPresenter.getInstance().setActivity(this);
@@ -314,9 +315,9 @@ public class InCallActivity extends Activity implements FragmentDisplayManager {
@Override
protected void onStop() {
Log.d(this, "onStop()...");
-
InCallPresenter.getInstance().updateIsChangingConfigurations();
InCallPresenter.getInstance().onActivityStopped();
+ mOrientationEventListener.disable();
super.onStop();
}