Dynamically show the menu button on the system bar.
Windows with FLAG_NEEDS_MENU_KEY (or windowNeedsMenuKey=true in their theme) will cause the system bar to show a menu icon. (Note that the phone's status bar currently ignores this, but phones tend to have hardware menu keys anyway.) Additionally, all windows whose package's SDK version is pre-Honeycomb will have FLAG_NEEDS_MENU_KEY set by default. Bug: 3003728 Change-Id: I2d983763a726ea4f32cd1af9b0390e30478b11d1
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -31,5 +31,6 @@ oneway interface IStatusBar
|
||||
void animateExpand();
|
||||
void animateCollapse();
|
||||
void setLightsOn(boolean on);
|
||||
void setMenuKeyVisible(boolean visible);
|
||||
}
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user