Loading core/java/android/view/WindowManager.java +13 −0 Original line number Diff line number Diff line Loading @@ -611,6 +611,19 @@ public interface WindowManager extends ViewManager { * {@hide} */ public static final int FLAG_SPLIT_TOUCH = 0x00800000; /** * Flag for a window belonging to an activity that responds to {@link KeyEvent#KEYCODE_MENU} * and therefore needs a Menu key. For devices where Menu is a physical button this flag is * ignored, but on devices where the Menu key is drawn in software it may be hidden unless * this flag is set. * * (Note that Action Bars, when available, are the preferred way to offer additional * functions otherwise accessed via an options menu.) * * {@hide} */ public static final int FLAG_NEEDS_MENU_KEY = 0x01000000; /** Window flag: *sigh* The lock screen wants to continue running its * animation while it is fading. A kind-of hack to allow this. Maybe * in the future we just make this the default behavior. Loading core/java/com/android/internal/statusbar/IStatusBar.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -31,5 +31,6 @@ oneway interface IStatusBar void animateExpand(); void animateCollapse(); void setLightsOn(boolean on); void setMenuKeyVisible(boolean visible); } core/java/com/android/internal/statusbar/IStatusBarService.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -31,12 +31,13 @@ interface IStatusBarService void setIconVisibility(String slot, boolean visible); void removeIcon(String slot); void setActiveWindowIsFullscreen(boolean fullscreen); void setMenuKeyVisible(boolean visible); // ---- Methods below are for use by the status bar policy services ---- // You need the STATUS_BAR_SERVICE permission void registerStatusBar(IStatusBar callbacks, out StatusBarIconList iconList, out List<IBinder> notificationKeys, out List<StatusBarNotification> notifications, out boolean[] lightsOn); out boolean[] switches); void onPanelRevealed(); void onNotificationClick(String pkg, String tag, int id); void onNotificationError(String pkg, String tag, int id, Loading packages/SystemUI/res/layout-xlarge/status_bar.xml +1 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,7 @@ android:paddingLeft="4dip" android:paddingRight="4dip" systemui:keyCode="82" android:visibility="invisible" /> <ImageButton android:id="@+id/recent" android:layout_width="wrap_content" Loading packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java +13 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,8 @@ public class CommandQueue extends IStatusBar.Stub { private static final int MSG_SET_LIGHTS_ON = 0x00070000; private static final int MSG_SHOW_MENU = 0x00080000; private StatusBarIconList mList; private Callbacks mCallbacks; private Handler mHandler = new H(); Loading @@ -78,6 +80,7 @@ public class CommandQueue extends IStatusBar.Stub { public void animateExpand(); public void animateCollapse(); public void setLightsOn(boolean on); public void setMenuKeyVisible(boolean visible); } public CommandQueue(Callbacks callbacks, StatusBarIconList list) { Loading Loading @@ -153,6 +156,13 @@ public class CommandQueue extends IStatusBar.Stub { } } public void setMenuKeyVisible(boolean visible) { synchronized (mList) { mHandler.removeMessages(MSG_SHOW_MENU); mHandler.obtainMessage(MSG_SHOW_MENU, visible ? 1 : 0, 0, null).sendToTarget(); } } private final class H extends Handler { public void handleMessage(Message msg) { final int what = msg.what & MSG_MASK; Loading Loading @@ -210,6 +220,9 @@ 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); break; } } } Loading Loading
core/java/android/view/WindowManager.java +13 −0 Original line number Diff line number Diff line Loading @@ -611,6 +611,19 @@ public interface WindowManager extends ViewManager { * {@hide} */ public static final int FLAG_SPLIT_TOUCH = 0x00800000; /** * Flag for a window belonging to an activity that responds to {@link KeyEvent#KEYCODE_MENU} * and therefore needs a Menu key. For devices where Menu is a physical button this flag is * ignored, but on devices where the Menu key is drawn in software it may be hidden unless * this flag is set. * * (Note that Action Bars, when available, are the preferred way to offer additional * functions otherwise accessed via an options menu.) * * {@hide} */ public static final int FLAG_NEEDS_MENU_KEY = 0x01000000; /** Window flag: *sigh* The lock screen wants to continue running its * animation while it is fading. A kind-of hack to allow this. Maybe * in the future we just make this the default behavior. Loading
core/java/com/android/internal/statusbar/IStatusBar.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -31,5 +31,6 @@ oneway interface IStatusBar void animateExpand(); void animateCollapse(); void setLightsOn(boolean on); void setMenuKeyVisible(boolean visible); }
core/java/com/android/internal/statusbar/IStatusBarService.aidl +2 −1 Original line number Diff line number Diff line Loading @@ -31,12 +31,13 @@ interface IStatusBarService void setIconVisibility(String slot, boolean visible); void removeIcon(String slot); void setActiveWindowIsFullscreen(boolean fullscreen); void setMenuKeyVisible(boolean visible); // ---- Methods below are for use by the status bar policy services ---- // You need the STATUS_BAR_SERVICE permission void registerStatusBar(IStatusBar callbacks, out StatusBarIconList iconList, out List<IBinder> notificationKeys, out List<StatusBarNotification> notifications, out boolean[] lightsOn); out boolean[] switches); void onPanelRevealed(); void onNotificationClick(String pkg, String tag, int id); void onNotificationError(String pkg, String tag, int id, Loading
packages/SystemUI/res/layout-xlarge/status_bar.xml +1 −0 Original line number Diff line number Diff line Loading @@ -144,6 +144,7 @@ android:paddingLeft="4dip" android:paddingRight="4dip" systemui:keyCode="82" android:visibility="invisible" /> <ImageButton android:id="@+id/recent" android:layout_width="wrap_content" Loading
packages/SystemUI/src/com/android/systemui/statusbar/CommandQueue.java +13 −0 Original line number Diff line number Diff line Loading @@ -54,6 +54,8 @@ public class CommandQueue extends IStatusBar.Stub { private static final int MSG_SET_LIGHTS_ON = 0x00070000; private static final int MSG_SHOW_MENU = 0x00080000; private StatusBarIconList mList; private Callbacks mCallbacks; private Handler mHandler = new H(); Loading @@ -78,6 +80,7 @@ public class CommandQueue extends IStatusBar.Stub { public void animateExpand(); public void animateCollapse(); public void setLightsOn(boolean on); public void setMenuKeyVisible(boolean visible); } public CommandQueue(Callbacks callbacks, StatusBarIconList list) { Loading Loading @@ -153,6 +156,13 @@ public class CommandQueue extends IStatusBar.Stub { } } public void setMenuKeyVisible(boolean visible) { synchronized (mList) { mHandler.removeMessages(MSG_SHOW_MENU); mHandler.obtainMessage(MSG_SHOW_MENU, visible ? 1 : 0, 0, null).sendToTarget(); } } private final class H extends Handler { public void handleMessage(Message msg) { final int what = msg.what & MSG_MASK; Loading Loading @@ -210,6 +220,9 @@ 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); break; } } } Loading