pub enum LockTaskMode {
    Normal,
    Never,
    IfWhitelisted,
    Always,
}
Expand description

This value indicates how tasks rooted at this activity will behave in lockTask mode. The value can be any one of the following R.attr.lockTaskMode string values:

Variants§

§

Normal

Default value. This is the default value. Tasks don’t launch into lock task mode but can be placed there by calling startLockTask().

§

Never

Tasks don’t launch into lockTask mode, and the device user can’t pin these tasks from the overview screen.

Note

This mode is only available to system and privileged applications. Non-privileged apps with this value are treated as normal.

§

IfWhitelisted

If the DPC authorizes this package using DevicePolicyManager.setLockTaskPackages(), then this mode is identical to always, except that the activity needs to call stopLockTask() before being able to finish if it is the last locked task. If the DPC does not authorize this package then this mode is identical to normal.

§

Always

Tasks rooted at this activity always launch into lock task mode. If the system is already in lock task mode when this task is launched then the new task are launched on top of the current task. Tasks launched in this mode can exit lock task mode by calling finish().

Note

This mode is only available to system and privileged applications. Non-privileged apps with this value are treated as normal.

Trait Implementations§

source§

impl Clone for LockTaskMode

source§

fn clone(&self) -> LockTaskMode

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for LockTaskMode

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for LockTaskMode

source§

fn default() -> LockTaskMode

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for LockTaskMode

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq<LockTaskMode> for LockTaskMode

source§

fn eq(&self, other: &LockTaskMode) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for LockTaskMode

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl YaDeserialize for LockTaskMode

source§

fn deserialize<R: Read>(reader: &mut Deserializer<R>) -> Result<Self, String>

source§

impl YaSerialize for LockTaskMode

source§

fn serialize<W: Write>(&self, writer: &mut Serializer<W>) -> Result<(), String>

source§

fn serialize_attributes( &self, source_attributes: Vec<OwnedAttribute>, source_namespace: Namespace ) -> Result<(Vec<OwnedAttribute>, Namespace), String>

source§

impl Eq for LockTaskMode

source§

impl StructuralEq for LockTaskMode

source§

impl StructuralPartialEq for LockTaskMode

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,