diff options
author | Dianne Hackborn <hackbod@google.com> | 2011-06-14 15:12:01 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2011-06-14 15:12:01 -0700 |
commit | 0a8a2324239d7604e2a68349585aa67b59b25f4c (patch) | |
tree | d155e1dc2fbfb6f5983498e99091a475bdde696d /packages | |
parent | 86ef7977a95d6e1783f646d96992582d1dbf080a (diff) | |
parent | 7d04932ef5c001769ccef244f551b75773f1666b (diff) | |
download | frameworks_base-0a8a2324239d7604e2a68349585aa67b59b25f4c.zip frameworks_base-0a8a2324239d7604e2a68349585aa67b59b25f4c.tar.gz frameworks_base-0a8a2324239d7604e2a68349585aa67b59b25f4c.tar.bz2 |
Merge "Fix issue #4603422: Compatibility mode button doesn't always update" into honeycomb-mr2
Diffstat (limited to 'packages')
5 files changed, 18 insertions, 14 deletions
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 88cd43c..ff979a0 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -30,6 +30,8 @@ <dimen name="status_bar_recents_thumbnail_max_height">64dp</dimen> <!-- Width of scrollable area in recents --> <dimen name="status_bar_recents_width">356dp</dimen> + <!-- Amount to offset bottom of notification peek window from top of status bar. --> + <dimen name="peek_window_y_offset">-12dp</dimen> </resources> diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java index d55a7c2..07f9ad8 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java @@ -54,7 +54,7 @@ public class CommandQueue extends IStatusBar.Stub { private static final int MSG_SET_LIGHTS_ON = 0x00070000; - private static final int MSG_SHOW_MENU = 0x00080000; + private static final int MSG_TOP_APP_WINDOW_CHANGED = 0x00080000; private static final int MSG_SHOW_IME_BUTTON = 0x00090000; private static final int MSG_SET_HARD_KEYBOARD_STATUS = 0x000a0000; @@ -82,7 +82,7 @@ public class CommandQueue extends IStatusBar.Stub { public void animateExpand(); public void animateCollapse(); public void setLightsOn(boolean on); - public void setMenuKeyVisible(boolean visible); + public void topAppWindowChanged(boolean visible); public void setImeWindowStatus(IBinder token, int vis, int backDisposition); public void setHardKeyboardStatus(boolean available, boolean enabled); } @@ -160,10 +160,11 @@ public class CommandQueue extends IStatusBar.Stub { } } - public void setMenuKeyVisible(boolean visible) { + public void topAppWindowChanged(boolean menuVisible) { synchronized (mList) { - mHandler.removeMessages(MSG_SHOW_MENU); - mHandler.obtainMessage(MSG_SHOW_MENU, visible ? 1 : 0, 0, null).sendToTarget(); + mHandler.removeMessages(MSG_TOP_APP_WINDOW_CHANGED); + mHandler.obtainMessage(MSG_TOP_APP_WINDOW_CHANGED, menuVisible ? 1 : 0, 0, + null).sendToTarget(); } } @@ -240,8 +241,8 @@ public class CommandQueue extends IStatusBar.Stub { case MSG_SET_LIGHTS_ON: mCallbacks.setLightsOn(msg.arg1 != 0); break; - case MSG_SHOW_MENU: - mCallbacks.setMenuKeyVisible(msg.arg1 != 0); + case MSG_TOP_APP_WINDOW_CHANGED: + mCallbacks.topAppWindowChanged(msg.arg1 != 0); break; case MSG_SHOW_IME_BUTTON: mCallbacks.setImeWindowStatus((IBinder)msg.obj, msg.arg1, msg.arg2); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java index 23ae823..e567dc7 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBar.java @@ -78,7 +78,7 @@ public abstract class StatusBar extends SystemUI implements CommandQueue.Callbac disable(switches[0]); setLightsOn(switches[1] != 0); - setMenuKeyVisible(switches[2] != 0); + topAppWindowChanged(switches[2] != 0); // StatusBarManagerService has a back up of IME token and it's restored here. setImeWindowStatus(binders.get(0), switches[3], switches[4]); setHardKeyboardStatus(switches[5] != 0, switches[6] != 0); diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java index 1e46246..84ae766 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java @@ -1019,7 +1019,7 @@ public class PhoneStatusBar extends StatusBar { } // Not supported - public void setMenuKeyVisible(boolean visible) { } + public void topAppWindowChanged(boolean visible) { } public void setImeWindowStatus(IBinder token, int vis, int backDisposition) { } @Override public void setHardKeyboardStatus(boolean available, boolean enabled) { } diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java index 4e10770..b304ebc 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/tablet/TabletStatusBar.java @@ -245,11 +245,12 @@ public class TabletStatusBar extends StatusBar implements 512, // ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, WindowManager.LayoutParams.TYPE_STATUS_BAR_PANEL, - WindowManager.LayoutParams.FLAG_LAYOUT_IN_SCREEN + WindowManager.LayoutParams.FLAG_LAYOUT_NO_LIMITS | WindowManager.LayoutParams.FLAG_ALT_FOCUSABLE_IM | WindowManager.LayoutParams.FLAG_SPLIT_TOUCH, PixelFormat.TRANSLUCENT); lp.gravity = Gravity.BOTTOM | Gravity.RIGHT; + lp.y = res.getDimensionPixelOffset(R.dimen.peek_window_y_offset); lp.setTitle("NotificationPeekWindow"); lp.windowAnimations = com.android.internal.R.style.Animation_Toast; @@ -955,14 +956,14 @@ public class TabletStatusBar extends StatusBar implements mHandler.sendEmptyMessage(on ? MSG_SHOW_CHROME : MSG_HIDE_CHROME); } - public void setMenuKeyVisible(boolean visible) { + public void topAppWindowChanged(boolean windowVisible) { if (DEBUG) { - Slog.d(TAG, (visible?"showing":"hiding") + " the MENU button"); + Slog.d(TAG, (windowVisible?"showing":"hiding") + " the MENU button"); } - mMenuButton.setVisibility(visible ? View.VISIBLE : View.GONE); + mMenuButton.setVisibility(windowVisible ? View.VISIBLE : View.GONE); // See above re: lights-out policy for legacy apps. - if (visible) setLightsOn(true); + if (windowVisible) setLightsOn(true); // XXX: HACK: not sure if this is the best way to catch a new activity that might require a // change in compatibility features, but it's a start. |