summaryrefslogtreecommitdiffstats
path: root/policy
diff options
context:
space:
mode:
authorDaniel Sandler <dsandler@google.com>2010-12-02 00:11:33 -0500
committerDaniel Sandler <dsandler@google.com>2010-12-02 01:27:23 -0500
commit59485d7442a175551fcb5eeee71820432df4ea7b (patch)
treee0e590d3331218e657636f7e97df9ae1da54a2cb /policy
parentdcafdb2e9babeaa7aafd1cb15be6423a656de996 (diff)
downloadframeworks_base-59485d7442a175551fcb5eeee71820432df4ea7b.zip
frameworks_base-59485d7442a175551fcb5eeee71820432df4ea7b.tar.gz
frameworks_base-59485d7442a175551fcb5eeee71820432df4ea7b.tar.bz2
Do not allow lights out mode for old apps.
Legacy applications using FLAG_FULLSCREEN do so principally to get as much screen real estate as possible; reducing clutter is usually a secondary concern. The new UI style takes care of the latter for the most part, and the former is irrelevant because the xlarge system bar never goes away. Lights out---and with it the disappearance of important systemwide navigation controls---is probably *not* something these apps are expecting! Consider a game: it might want FLAG_FULLSCREEN on phone to take over your entire display, but might also rely on menu (to pause the game or bring up options) and home (to allow you to exit). Lights out makes these tasks much harder on the user because those buttons aren't visible anymore. So, to mitigate this potentially confusing situation, we now disable lights out for fullscreen legacy apps. [Hack, er, cleverness alert: We use NEEDS_MENU_KEY as a shorthand for "legacy app." This flag is set by pre-Honeycomb apps by default, but even an app built against the current API can request this flag; be forewarned that if you do, you won't get lights out mode in this particular system bar implementation when you use FLAG_FULLSCREEN.] Change-Id: If90d8354114ba45f9485b935b87ee575a30b9f87
Diffstat (limited to 'policy')
-rwxr-xr-xpolicy/src/com/android/internal/policy/impl/PhoneWindowManager.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
index c528745..c3112d8 100755
--- a/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
+++ b/policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
@@ -1820,12 +1820,12 @@ public class PhoneWindowManager implements WindowManagerPolicy {
final IStatusBarService sbs = mStatusBarService;
if (mStatusBarService != null) {
try {
- if (changedFullscreen) {
- sbs.setActiveWindowIsFullscreen(topIsFullscreenF);
- }
if (changedMenu) {
sbs.setMenuKeyVisible(topNeedsMenuF);
}
+ if (changedFullscreen) {
+ sbs.setActiveWindowIsFullscreen(topIsFullscreenF);
+ }
} catch (RemoteException e) {
// This should be impossible because we're in the same process.
mStatusBarService = null;