summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorCraig Mautner <cmautner@google.com>2015-03-10 17:44:11 +0000
committerCraig Mautner <cmautner@google.com>2015-03-10 17:44:11 +0000
commit1a07846d4d7f1665345a27da11d0f8d518b3b431 (patch)
treeb5de3ff156aef81c07ca578e9845b09a5d861bbe /services
parenta75e3e0b44e31ee5d042480d3da8d13cad56dc5a (diff)
downloadframeworks_base-1a07846d4d7f1665345a27da11d0f8d518b3b431.zip
frameworks_base-1a07846d4d7f1665345a27da11d0f8d518b3b431.tar.gz
frameworks_base-1a07846d4d7f1665345a27da11d0f8d518b3b431.tar.bz2
Revert "Add a timeout state to frozen windows"
Wrong bug listed on comment. Resubmitting with correct bug listed. This reverts commit a75e3e0b44e31ee5d042480d3da8d13cad56dc5a. Change-Id: I49cb364c44763fd2d0c120d6998281d38571050b
Diffstat (limited to 'services')
-rw-r--r--services/core/java/com/android/server/wm/WindowManagerService.java26
1 files changed, 9 insertions, 17 deletions
diff --git a/services/core/java/com/android/server/wm/WindowManagerService.java b/services/core/java/com/android/server/wm/WindowManagerService.java
index a4f3f23..7e69e87 100644
--- a/services/core/java/com/android/server/wm/WindowManagerService.java
+++ b/services/core/java/com/android/server/wm/WindowManagerService.java
@@ -496,12 +496,7 @@ public class WindowManagerService extends IWindowManager.Stub
int mLastDisplayFreezeDuration = 0;
Object mLastFinishedFreezeSource = null;
boolean mWaitingForConfig = false;
-
- final static int WINDOWS_FREEZING_SCREENS_NONE = 0;
- final static int WINDOWS_FREEZING_SCREENS_ACTIVE = 1;
- final static int WINDOWS_FREEZING_SCREENS_TIMEOUT = 2;
- private int mWindowsFreezingScreen = WINDOWS_FREEZING_SCREENS_NONE;
-
+ boolean mWindowsFreezingScreen = false;
boolean mClientFreezingScreen = false;
int mAppsFreezingScreen = 0;
int mLastWindowForcedOrientation = ActivityInfo.SCREEN_ORIENTATION_UNSPECIFIED;
@@ -4704,7 +4699,7 @@ public class WindowManagerService extends IWindowManager.Stub
if (mAppsFreezingScreen == 1) {
startFreezingDisplayLocked(false, 0, 0);
mH.removeMessages(H.APP_FREEZE_TIMEOUT);
- mH.sendEmptyMessageDelayed(H.APP_FREEZE_TIMEOUT, 2000);
+ mH.sendEmptyMessageDelayed(H.APP_FREEZE_TIMEOUT, 5000);
}
}
final int N = wtoken.allAppWindows.size();
@@ -6420,7 +6415,7 @@ public class WindowManagerService extends IWindowManager.Stub
mAltOrientation = altOrientation;
mPolicy.setRotationLw(mRotation);
- mWindowsFreezingScreen = WINDOWS_FREEZING_SCREENS_ACTIVE;
+ mWindowsFreezingScreen = true;
mH.removeMessages(H.WINDOW_FREEZE_TIMEOUT);
mH.sendEmptyMessageDelayed(H.WINDOW_FREEZE_TIMEOUT, WINDOW_FREEZE_TIMEOUT_DURATION);
mWaitingForConfig = true;
@@ -7789,7 +7784,6 @@ public class WindowManagerService extends IWindowManager.Stub
// TODO(multidisplay): Can non-default displays rotate?
synchronized (mWindowMap) {
Slog.w(TAG, "Window freeze timeout expired.");
- mWindowsFreezingScreen = WINDOWS_FREEZING_SCREENS_TIMEOUT;
final WindowList windows = getDefaultWindowListLocked();
int i = windows.size();
while (i > 0) {
@@ -7857,7 +7851,6 @@ public class WindowManagerService extends IWindowManager.Stub
case APP_FREEZE_TIMEOUT: {
synchronized (mWindowMap) {
Slog.w(TAG, "App freeze timeout expired.");
- mWindowsFreezingScreen = WINDOWS_FREEZING_SCREENS_TIMEOUT;
final int numStacks = mStackIdToStack.size();
for (int stackNdx = 0; stackNdx < numStacks; ++stackNdx) {
final TaskStack stack = mStackIdToStack.valueAt(stackNdx);
@@ -8921,8 +8914,8 @@ public class WindowManagerService extends IWindowManager.Stub
w.mOrientationChanging = true;
w.mLastFreezeDuration = 0;
mInnerFields.mOrientationChangeComplete = false;
- if (mWindowsFreezingScreen == WINDOWS_FREEZING_SCREENS_NONE) {
- mWindowsFreezingScreen = WINDOWS_FREEZING_SCREENS_ACTIVE;
+ if (!mWindowsFreezingScreen) {
+ mWindowsFreezingScreen = true;
// XXX should probably keep timeout from
// when we first froze the display.
mH.removeMessages(H.WINDOW_FREEZE_TIMEOUT);
@@ -9912,8 +9905,8 @@ public class WindowManagerService extends IWindowManager.Stub
"With display frozen, orientationChangeComplete="
+ mInnerFields.mOrientationChangeComplete);
if (mInnerFields.mOrientationChangeComplete) {
- if (mWindowsFreezingScreen != WINDOWS_FREEZING_SCREENS_NONE) {
- mWindowsFreezingScreen = WINDOWS_FREEZING_SCREENS_NONE;
+ if (mWindowsFreezingScreen) {
+ mWindowsFreezingScreen = false;
mLastFinishedFreezeSource = mInnerFields.mLastWindowFreezeSource;
mH.removeMessages(H.WINDOW_FREEZE_TIMEOUT);
}
@@ -10195,7 +10188,7 @@ public class WindowManagerService extends IWindowManager.Stub
} else {
mInnerFields.mOrientationChangeComplete = true;
mInnerFields.mLastWindowFreezeSource = mAnimator.mLastWindowFreezeSource;
- if (mWindowsFreezingScreen != WINDOWS_FREEZING_SCREENS_NONE) {
+ if (mWindowsFreezingScreen) {
doRequest = true;
}
}
@@ -10531,8 +10524,7 @@ public class WindowManagerService extends IWindowManager.Stub
return;
}
- if (mWaitingForConfig || mAppsFreezingScreen > 0
- || mWindowsFreezingScreen == WINDOWS_FREEZING_SCREENS_ACTIVE
+ if (mWaitingForConfig || mAppsFreezingScreen > 0 || mWindowsFreezingScreen
|| mClientFreezingScreen) {
if (DEBUG_ORIENTATION) Slog.d(TAG,
"stopFreezingDisplayLocked: Returning mWaitingForConfig=" + mWaitingForConfig