diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-06-14 16:13:26 -0700 |
---|---|---|
committer | Dianne Hackborn <hackbod@google.com> | 2011-06-14 16:13:26 -0700 |
commit | 3fe9cc5ea6a9e1acd52144c8ae6cb0492dba34ba (patch) | |
tree | 5383392d0134c178b9704fc78b0b69f7e285d058 /policy | |
parent | 051d16ebec491f7ab504672f561e97b7e850eb1e (diff) | |
parent | e95c07bd8a4f658e035ba0ed2079357961af011b (diff) | |
download | frameworks_base-3fe9cc5ea6a9e1acd52144c8ae6cb0492dba34ba.zip frameworks_base-3fe9cc5ea6a9e1acd52144c8ae6cb0492dba34ba.tar.gz frameworks_base-3fe9cc5ea6a9e1acd52144c8ae6cb0492dba34ba.tar.bz2 |
resolved conflicts for merge of e95c07bd to master
Change-Id: I9af0c08a9f1c1f68661efe051a66835e850b76f6
Diffstat (limited to 'policy')
-rwxr-xr-x | policy/src/com/android/internal/policy/impl/PhoneWindowManager.java | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java index 9dd2625..5728989 100755 --- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java @@ -330,6 +330,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { static final Rect mTmpVisibleFrame = new Rect(); WindowState mTopFullscreenOpaqueWindowState; + WindowState mTopAppWindowState; + WindowState mLastTopAppWindowState; boolean mTopIsFullscreen; boolean mForceStatusBar; boolean mHideLockScreen; @@ -340,7 +342,6 @@ public class PhoneWindowManager implements WindowManagerPolicy { Intent mDeskDockIntent; int mShortcutKeyPressed = -1; boolean mConsumeShortcutKeyUp; - boolean mShowMenuKey = false; // track FLAG_NEEDS_MENU_KEY on frontmost window // support for activating the lock screen while the screen is on boolean mAllowLockscreenWhenOn; @@ -1957,12 +1958,11 @@ public class PhoneWindowManager implements WindowManagerPolicy { // the status bar. They are protected by the STATUS_BAR_SERVICE // permission, so they have the same privileges as the status // bar itself. - pf.left = df.left = cf.left = vf.left = mUnrestrictedScreenLeft; - pf.top = df.top = cf.top = vf.top = mUnrestrictedScreenTop; - pf.right = df.right = cf.right = vf.right - = mUnrestrictedScreenLeft+mUnrestrictedScreenWidth; - pf.bottom = df.bottom = cf.bottom = vf.bottom - = mUnrestrictedScreenTop+mUnrestrictedScreenHeight; + pf.left = df.left = cf.left = mRestrictedScreenLeft; + pf.top = df.top = cf.top = mRestrictedScreenTop; + pf.right = df.right = cf.right = mRestrictedScreenLeft+mRestrictedScreenWidth; + pf.bottom = df.bottom = cf.bottom + = mRestrictedScreenTop+mRestrictedScreenHeight; } else { pf.left = mContentLeft; pf.top = mContentTop; @@ -2032,6 +2032,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { /** {@inheritDoc} */ public void beginAnimationLw(int displayWidth, int displayHeight) { mTopFullscreenOpaqueWindowState = null; + mTopAppWindowState = null; mForceStatusBar = false; mHideLockScreen = false; @@ -2067,6 +2068,12 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } } + if (mTopAppWindowState == null && win.isVisibleOrBehindKeyguardLw()) { + if (attrs.type >= FIRST_APPLICATION_WINDOW + && attrs.type <= LAST_APPLICATION_WINDOW) { + mTopAppWindowState = win; + } + } } /** {@inheritDoc} */ @@ -2110,22 +2117,13 @@ public class PhoneWindowManager implements WindowManagerPolicy { } } - boolean topNeedsMenu = mShowMenuKey; - if (lp != null) { - topNeedsMenu = (lp.flags & WindowManager.LayoutParams.FLAG_NEEDS_MENU_KEY) != 0; - } - - if (DEBUG_LAYOUT) Log.v(TAG, "Top window " - + (topNeedsMenu ? "needs" : "does not need") - + " the MENU key"); - mTopIsFullscreen = topIsFullscreen; - final boolean changedMenu = (topNeedsMenu != mShowMenuKey); - if (changedMenu) { - final boolean topNeedsMenuF = topNeedsMenu; + if (mTopAppWindowState != null && mTopAppWindowState != mLastTopAppWindowState) { + mLastTopAppWindowState = mTopAppWindowState; - mShowMenuKey = topNeedsMenu; + final boolean topNeedsMenu = (mTopAppWindowState.getAttrs().flags + & WindowManager.LayoutParams.FLAG_NEEDS_MENU_KEY) != 0; mHandler.post(new Runnable() { public void run() { @@ -2140,9 +2138,7 @@ public class PhoneWindowManager implements WindowManagerPolicy { final IStatusBarService sbs = mStatusBarService; if (mStatusBarService != null) { try { - if (changedMenu) { - sbs.setMenuKeyVisible(topNeedsMenuF); - } + sbs.topAppWindowChanged(topNeedsMenu); } catch (RemoteException e) { // This should be impossible because we're in the same process. mStatusBarService = null; |