/** * Returns if the activity is in the lock task mode. * * @deprecated Use {@link ActivityManager#getLockTaskModeState} instead. */ @Deprecated public boolean isLockTask() { return getActivityManager().isInLockTaskMode(); }
/** * Stops a lock task. * * <p>The status of the lock task can be verified using {@link #isLockTask} method. Otherwise this * implementation has no effect. */ @Implementation(minSdk = LOLLIPOP) protected void stopLockTask() { Shadow.<ShadowActivityManager>extract(getActivityManager()) .setLockTaskModeState(ActivityManager.LOCK_TASK_MODE_NONE); }
/** * Starts a lock task. * * <p>The status of the lock task can be verified using {@link #isLockTask} method. Otherwise this * implementation has no effect. */ @Implementation(minSdk = LOLLIPOP) protected void startLockTask() { Shadow.<ShadowActivityManager>extract(getActivityManager()) .setLockTaskModeState(ActivityManager.LOCK_TASK_MODE_LOCKED); }
/** * Returns if the activity is in the lock task mode. * * @deprecated Use {@link ActivityManager#getLockTaskModeState} instead. */ @Deprecated public boolean isLockTask() { return getActivityManager().isInLockTaskMode(); }
/** * Starts a lock task. * * <p>The status of the lock task can be verified using {@link #isLockTask} method. Otherwise this * implementation has no effect. */ @Implementation(minSdk = LOLLIPOP) protected void startLockTask() { Shadow.<ShadowActivityManager>extract(getActivityManager()) .setLockTaskModeState(ActivityManager.LOCK_TASK_MODE_LOCKED); }
/** * Stops a lock task. * * <p>The status of the lock task can be verified using {@link #isLockTask} method. Otherwise this * implementation has no effect. */ @Implementation(minSdk = LOLLIPOP) protected void stopLockTask() { Shadow.<ShadowActivityManager>extract(getActivityManager()) .setLockTaskModeState(ActivityManager.LOCK_TASK_MODE_NONE); }