LockTaskFeatures Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This enumeration supports a bitwise combination of its member values.
[System.Flags]
public enum LockTaskFeatures
[<System.Flags>]
type LockTaskFeatures =
- Inheritance
-
LockTaskFeatures
- Attributes
Fields
| Name | Value | Description |
|---|---|---|
| None | 0 | Disable all configurable SystemUI features during LockTask mode. This includes, system info area in the status bar (connectivity icons, clock, etc.); notifications (including alerts, icons, and the notification shade); Home button; Recents button and UI; global actions menu (i.e. power button menu); keyguard Android reference for Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. |
| SystemInfo | 1 | Enable the system info area in the status bar during LockTask mode. The system info area usually occupies the right side of the status bar (although this can differ across OEMs). It includes all system information indicators, such as date and time, connectivity, battery, vibration mode, etc. Android reference for Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. |
| Notifications | 2 | Enable notifications during LockTask mode. This includes notification icons on the status bar, heads-up notifications, and the expandable notification shade. Note that the Quick Settings panel remains disabled. This feature flag can only be used in combination with LOCK_TASK_FEATURE_HOME. setLockTaskFeatures(ComponentName,int) throws an IllegalArgumentException if this feature flag is defined without LOCK_TASK_FEATURE_HOME. Android reference for Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. |
| Home | 4 | Enable the Home button during LockTask mode. Note that if a custom launcher is used, it has to be registered as the default launcher with addPersistentPreferredActivity(ComponentName,IntentFilter,ComponentName), and its package needs to be allowlisted for LockTask with setLockTaskPackages(ComponentName,String[]). Android reference for Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. |
| Overview | 8 | Enable the Overview button and the Overview screen during LockTask mode. This feature flag can only be used in combination with LOCK_TASK_FEATURE_HOME, and setLockTaskFeatures(ComponentName,int) will throw an IllegalArgumentException if this feature flag is defined without LOCK_TASK_FEATURE_HOME. Android reference for Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. |
| GlobalActions | 16 | Enable the global actions dialog during LockTask mode. This is the dialog that shows up when the user long-presses the power button, for example. Note that the user may not be able to power off the device if this flag is not set. This flag is enabled by default until setLockTaskFeatures(ComponentName,int) is called for the first time. Android reference for Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. |
| Keyguard | 32 | Enable the keyguard during LockTask mode. Note that if the keyguard is already disabled with setKeyguardDisabled(ComponentName,boolean), setting this flag will have no effect. If this flag is not set, the keyguard will not be shown even if the user has a lock screen credential. Android reference for Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. |
| BlockActivityStartInTask | 64 | Enable blocking of non-allowlisted activities from being started into a locked task. Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License. |