Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels) Summary: [Nested Classes](https://developer.android.com/reference/android/app/KeyguardManager#nestedclasses) \| [Methods](https://developer.android.com/reference/android/app/KeyguardManager#pubmethods) \| [Inherited Methods](https://developer.android.com/reference/android/app/KeyguardManager#inhmethods)

# KeyguardManager

*** ** * ** ***

` public class KeyguardManager `   
` extends https://developer.android.com/reference/java/lang/Object ` ` `

|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object) ||
| ↳ | android.app.KeyguardManager |

<br />

*** ** * ** ***

Class to manage and query the state of the lock screen (also known as Keyguard).

## Summary

| ### Nested classes ||
|---|---|
| ` interface` | `https://developer.android.com/reference/android/app/KeyguardManager.DeviceLockedStateListener` Listener for device locked state changes. |
| ` class` | `https://developer.android.com/reference/android/app/KeyguardManager.KeyguardDismissCallback` Callback passed to `https://developer.android.com/reference/android/app/KeyguardManager#requestDismissKeyguard(android.app.Activity,%20android.app.KeyguardManager.KeyguardDismissCallback)` to notify caller of result. |
| ` class` | `https://developer.android.com/reference/android/app/KeyguardManager.KeyguardLock` *This class was deprecated in API level 15. Use `https://developer.android.com/reference/android/R.attr#showWhenLocked` or `https://developer.android.com/reference/android/app/Activity#setShowWhenLocked(boolean)` instead. This allows you to seamlessly occlude and unocclude the keyguard as your application moves in and out of the foreground and does not require that any special permissions be requested.* |
| ` interface` | `https://developer.android.com/reference/android/app/KeyguardManager.KeyguardLockedStateListener` Listener for keyguard locked state changes. |
| ` interface` | `https://developer.android.com/reference/android/app/KeyguardManager.OnKeyguardExitResult` *This interface was deprecated in API level 26. Use `https://developer.android.com/reference/android/app/KeyguardManager.KeyguardDismissCallback`* |

| ### Public methods ||
|---|---|
| ` void` | ` https://developer.android.com/reference/android/app/KeyguardManager#addDeviceLockedStateListener(java.util.concurrent.Executor,%20android.app.KeyguardManager.DeviceLockedStateListener)(https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/app/KeyguardManager.DeviceLockedStateListener listener) ` Registers a listener to execute when the device locked state changes. |
| ` void` | ` https://developer.android.com/reference/android/app/KeyguardManager#addKeyguardLockedStateListener(java.util.concurrent.Executor,%20android.app.KeyguardManager.KeyguardLockedStateListener)(https://developer.android.com/reference/java/util/concurrent/Executor executor, https://developer.android.com/reference/android/app/KeyguardManager.KeyguardLockedStateListener listener) ` Registers a listener to execute when the keyguard locked state changes. |
| ` https://developer.android.com/reference/android/content/Intent` | ` https://developer.android.com/reference/android/app/KeyguardManager#createConfirmDeviceCredentialIntent(java.lang.CharSequence,%20java.lang.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence title, https://developer.android.com/reference/java/lang/CharSequence description) ` *This method was deprecated in API level 29. see `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setAllowedAuthenticators(int)`* |
| ` void` | ` https://developer.android.com/reference/android/app/KeyguardManager#exitKeyguardSecurely(android.app.KeyguardManager.OnKeyguardExitResult)(https://developer.android.com/reference/android/app/KeyguardManager.OnKeyguardExitResult callback) ` *This method was deprecated in API level 15. Use `https://developer.android.com/reference/android/R.attr#showWhenLocked` or `https://developer.android.com/reference/android/app/Activity#setShowWhenLocked(boolean)` to seamlessly occlude and unocclude the keyguard as your application moves in and out of the foreground, without requiring any special permissions. Use `https://developer.android.com/reference/android/app/KeyguardManager#requestDismissKeyguard(android.app.Activity,%20android.app.KeyguardManager.KeyguardDismissCallback)` to request dismissal of the keyguard.* |
| ` boolean` | ` https://developer.android.com/reference/android/app/KeyguardManager#inKeyguardRestrictedInputMode()() ` *This method was deprecated in API level 28. Use `https://developer.android.com/reference/android/app/KeyguardManager#isKeyguardLocked()` instead.* |
| ` boolean` | ` https://developer.android.com/reference/android/app/KeyguardManager#isDeviceLocked()() ` Returns whether the device is currently locked for the user. |
| ` boolean` | ` https://developer.android.com/reference/android/app/KeyguardManager#isDeviceSecure()() ` Returns whether the user has a secure lock screen. |
| ` boolean` | ` https://developer.android.com/reference/android/app/KeyguardManager#isKeyguardLocked()() ` Returns whether the lock screen (also known as Keyguard) is showing. |
| ` boolean` | ` https://developer.android.com/reference/android/app/KeyguardManager#isKeyguardSecure()() ` Returns whether the user has a secure lock screen or there is a locked SIM card. |
| ` https://developer.android.com/reference/android/app/KeyguardManager.KeyguardLock` | ` https://developer.android.com/reference/android/app/KeyguardManager#newKeyguardLock(java.lang.String)(https://developer.android.com/reference/java/lang/String tag) ` *This method was deprecated in API level 15. Use `https://developer.android.com/reference/android/R.attr#showWhenLocked` or `https://developer.android.com/reference/android/app/Activity#setShowWhenLocked(boolean)` instead. This allows you to seamlessly occlude and unocclude the keyguard as your application moves in and out of the foreground and does not require that any special permissions be requested.* |
| ` void` | ` https://developer.android.com/reference/android/app/KeyguardManager#removeDeviceLockedStateListener(android.app.KeyguardManager.DeviceLockedStateListener)(https://developer.android.com/reference/android/app/KeyguardManager.DeviceLockedStateListener listener) ` Unregisters a listener that executes when the device locked state changes. |
| ` void` | ` https://developer.android.com/reference/android/app/KeyguardManager#removeKeyguardLockedStateListener(android.app.KeyguardManager.KeyguardLockedStateListener)(https://developer.android.com/reference/android/app/KeyguardManager.KeyguardLockedStateListener listener) ` Unregisters a listener that executes when the keyguard locked state changes. |
| ` void` | ` https://developer.android.com/reference/android/app/KeyguardManager#requestDismissKeyguard(android.app.Activity,%20android.app.KeyguardManager.KeyguardDismissCallback)(https://developer.android.com/reference/android/app/Activity activity, https://developer.android.com/reference/android/app/KeyguardManager.KeyguardDismissCallback callback) ` Requests that the Keyguard (lock screen) be dismissed if it is currently showing. |

### Inherited methods

From class ` https://developer.android.com/reference/java/lang/Object ` ` https://developer.android.com/reference/java/lang/Object` ` https://developer.android.com/reference/java/lang/Object#clone()() `

Creates and returns a copy of this object.
` boolean` ` https://developer.android.com/reference/java/lang/Object#equals(java.lang.Object)(https://developer.android.com/reference/java/lang/Object obj) `

Indicates whether some other object is "equal to" this one.
` void` ` https://developer.android.com/reference/java/lang/Object#finalize()() `

Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
` final https://developer.android.com/reference/java/lang/Class<?>` ` https://developer.android.com/reference/java/lang/Object#getClass()() `

Returns the runtime class of this `Object`.
` int` ` https://developer.android.com/reference/java/lang/Object#hashCode()() `

Returns a hash code value for the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#notify()() `

Wakes up a single thread that is waiting on this object's monitor.
` final void` ` https://developer.android.com/reference/java/lang/Object#notifyAll()() `

Wakes up all threads that are waiting on this object's monitor.
` https://developer.android.com/reference/java/lang/String` ` https://developer.android.com/reference/java/lang/Object#toString()() `

Returns a string representation of the object.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long,%20int)(long timeoutMillis, int nanos) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait(long)(long timeoutMillis) `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*, or until a certain amount of real time has elapsed.
` final void` ` https://developer.android.com/reference/java/lang/Object#wait()() `

Causes the current thread to wait until it is awakened, typically by being *notified* or *interrupted*.

## Public methods

### addDeviceLockedStateListener

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public void addDeviceLockedStateListener (Executor executor, 
                KeyguardManager.DeviceLockedStateListener listener)
```

Registers a listener to execute when the device locked state changes.   

Requires `https://developer.android.com/reference/android/Manifest.permission#SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE`

<br />

| Parameters ||
|---|---|
| `executor` | `Executor`: The `https://developer.android.com/reference/java/util/concurrent/Executor` where the `listener` will be invoked. This value cannot be `null`. Callback and listener events are dispatched through this `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `listener` | `KeyguardManager.DeviceLockedStateListener`: The listener to add to receive device locked state changes. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/KeyguardManager#isDeviceLocked()`
- `https://developer.android.com/reference/android/app/KeyguardManager#removeDeviceLockedStateListener(android.app.KeyguardManager.DeviceLockedStateListener)`

### addKeyguardLockedStateListener

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void addKeyguardLockedStateListener (Executor executor, 
                KeyguardManager.KeyguardLockedStateListener listener)
```

Registers a listener to execute when the keyguard locked state changes.   

Requires `https://developer.android.com/reference/android/Manifest.permission#SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE`

<br />

| Parameters ||
|---|---|
| `executor` | `Executor`: This value cannot be `null`. Callback and listener events are dispatched through this `https://developer.android.com/reference/java/util/concurrent/Executor`, providing an easy way to control which thread is used. To dispatch events through the main thread of your application, you can use `https://developer.android.com/reference/android/content/Context#getMainExecutor()`. Otherwise, provide an `https://developer.android.com/reference/java/util/concurrent/Executor` that dispatches to an appropriate thread. <br /> |
| `listener` | `KeyguardManager.KeyguardLockedStateListener`: The listener to add to receive keyguard locked state changes. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/KeyguardManager#isKeyguardLocked()`
- `https://developer.android.com/reference/android/app/KeyguardManager#removeKeyguardLockedStateListener(android.app.KeyguardManager.KeyguardLockedStateListener)`

### createConfirmDeviceCredentialIntent

Added in [API level 21](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 29](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public Intent createConfirmDeviceCredentialIntent (CharSequence title, 
                CharSequence description)
```

<br />

**This method was deprecated in API level 29.**   

see `https://developer.android.com/reference/android/hardware/biometrics/BiometricPrompt.Builder#setAllowedAuthenticators(int)`

Get an intent to prompt the user to confirm credentials (pin, pattern, password or biometrics if enrolled) for the current user of the device. The caller is expected to launch this activity using `https://developer.android.com/reference/android/app/Activity#startActivityForResult(android.content.Intent,%20int)` and check for `https://developer.android.com/reference/android/app/Activity#RESULT_OK` if the user successfully completes the challenge.   

Requires the `https://developer.android.com/reference/android/content/pm/PackageManager#FEATURE_SECURE_LOCK_SCREEN` feature which can be detected using `https://developer.android.com/reference/android/content/pm/PackageManager#hasSystemFeature(java.lang.String)`.

<br />

| Parameters ||
|---|---|
| `title` | `CharSequence` <br /> |
| `description` | `CharSequence` <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/content/Intent` | the intent for launching the activity or null if no password is required. <br /> |

### exitKeyguardSecurely

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void exitKeyguardSecurely (KeyguardManager.OnKeyguardExitResult callback)
```

<br />

**This method was deprecated in API level 15.**   

Use `https://developer.android.com/reference/android/R.attr#showWhenLocked` or `https://developer.android.com/reference/android/app/Activity#setShowWhenLocked(boolean)` to seamlessly occlude and unocclude the keyguard as your application moves in and out of the foreground, without requiring any special permissions. Use `https://developer.android.com/reference/android/app/KeyguardManager#requestDismissKeyguard(android.app.Activity,%20android.app.KeyguardManager.KeyguardDismissCallback)` to request dismissal of the keyguard.

Exit the keyguard securely. The use case for this api is that, after disabling the keyguard, your app, which was granted permission to disable the keyguard and show a limited amount of information deemed safe without the user getting past the keyguard, needs to navigate to something that is not safe to view without getting past the keyguard. This will, if the keyguard is secure, bring up the unlock screen of the keyguard.   

Requires `https://developer.android.com/reference/android/Manifest.permission#DISABLE_KEYGUARD`

<br />

| Parameters ||
|---|---|
| `callback` | `KeyguardManager.OnKeyguardExitResult`: Lets you know whether the operation was successful and it is safe to launch anything that would normally be considered safe once the user has gotten past the keyguard. <br /> |

### inKeyguardRestrictedInputMode

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 28](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean inKeyguardRestrictedInputMode ()
```

<br />

**This method was deprecated in API level 28.**   

Use `https://developer.android.com/reference/android/app/KeyguardManager#isKeyguardLocked()` instead.

Returns whether the lock screen is showing.

This is exactly the same as `https://developer.android.com/reference/android/app/KeyguardManager#isKeyguardLocked()`.

<br />

| Returns ||
|---|---|
| `boolean` | the value of `https://developer.android.com/reference/android/app/KeyguardManager#isKeyguardLocked()` <br /> |

### isDeviceLocked

Added in [API level 22](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isDeviceLocked ()
```

Returns whether the device is currently locked for the user.

This method returns the device locked state for the `https://developer.android.com/reference/android/content/Context`'s user. The device is considered to be locked for a user when the user's apps are currently inaccessible and some form of lock screen authentication is required to regain access to them. The lock screen authentication typically uses PIN, pattern, password, or biometric. Some devices may support additional methods, such as unlock using a paired smartwatch. "Swipe" does not count as authentication; if the lock screen is dismissible with swipe, for example due to the lock screen being set to Swipe or due to the device being kept unlocked by being near a trusted bluetooth device or in a trusted location, the device is considered unlocked.
**Note:** In the case of multiple full users, each user can have their own lock screen authentication configured. The device-locked state may differ between different users. For example, the device may be unlocked for the current user, but locked for a non-current user if lock screen authentication would be required to access that user's apps after switching to that user.

In the case of a profile, when the device goes to the main lock screen, up to two layers of authentication may be required to regain access to the profile's apps: one to unlock the main lock screen, and one to unlock the profile (when a separate profile challenge is required). For a profile, the device is considered to be locked as long as any challenge remains, either the parent user's challenge (when applicable) or the profile's challenge (when applicable).

<br />

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the device is currently locked for the user <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/KeyguardManager#isKeyguardLocked()`

### isDeviceSecure

Added in [API level 23](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isDeviceSecure ()
```

Returns whether the user has a secure lock screen.

This returns `true` if the `https://developer.android.com/reference/android/content/Context`'s user has a secure lock screen. A full user or a profile that uses a separate challenge has a secure lock screen if its lock screen is set to PIN, pattern, or password, as opposed to swipe or none. A profile that uses a unified challenge is considered to have a secure lock screen if and only if its parent user has a secure lock screen.

This method does not consider whether the lock screen is currently showing or not.

See also `https://developer.android.com/reference/android/app/KeyguardManager#isKeyguardSecure()` which includes locked SIM cards.

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the user has a secure lock screen <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/KeyguardManager#isKeyguardSecure()`

### isKeyguardLocked

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isKeyguardLocked ()
```

Returns whether the lock screen (also known as Keyguard) is showing.

Specifically, this returns `true` in the following cases:

- The lock screen is showing in the foreground.
- The lock screen is showing, but it is occluded by an activity that is showing on top of it. A common example is the phone app receiving a call or making an emergency call.
- The lock screen was showing but is temporarily disabled as a result of [lock task mode](https://developer.android.com/work/dpc/dedicated-devices/lock-task-mode) or an app using the deprecated `https://developer.android.com/reference/android/app/KeyguardManager.KeyguardLock` API.

"Showing" refers to a logical state of the UI, regardless of whether the screen happens to be on. When the power button is pressed on an unlocked device, the lock screen starts "showing" immediately when the screen turns off.

This method does not distinguish a lock screen that is requiring authentication (e.g. with PIN, pattern, password, or biometric) from a lock screen that is trivially dismissible (e.g. with swipe). It also does not distinguish a lock screen requesting a SIM card PIN from a normal device lock screen. Finally, it always returns the global lock screen state and does not consider the `https://developer.android.com/reference/android/content/Context`'s user specifically.

Note that `isKeyguardLocked()` is confusingly named and probably should be called `isKeyguardShowing()`. On many devices, the lock screen displays an *unlocked* padlock icon when it is trivially dismissible. As mentioned above, `isKeyguardLocked()` actually returns `true` in this case, not `false` as might be expected. `https://developer.android.com/reference/android/app/KeyguardManager#isDeviceLocked()` is an alternative API that has slightly different semantics.

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the lock screen is showing <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/KeyguardManager#isDeviceLocked()`

### isKeyguardSecure

Added in [API level 16](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public boolean isKeyguardSecure ()
```

Returns whether the user has a secure lock screen or there is a locked SIM card.

Specifically, this returns `true` if at least one of the following is true:

- The `https://developer.android.com/reference/android/content/Context`'s user has a secure lock screen. A full user or a profile that uses a separate challenge has a secure lock screen if its lock screen is set to PIN, pattern, or password, as opposed to swipe or none. A profile that uses a unified challenge is considered to have a secure lock screen if and only if its parent user has a secure lock screen.
- At least one SIM card is currently locked and requires a PIN.

This method does not consider whether the lock screen is currently showing or not.

See also `https://developer.android.com/reference/android/app/KeyguardManager#isDeviceSecure()` which excludes locked SIM cards.

<br />

| Returns ||
|---|---|
| `boolean` | `true` if the user has a secure lock screen or there is a locked SIM card <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/KeyguardManager#isDeviceSecure()`

### newKeyguardLock

Added in [API level 1](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)   
Deprecated in [API level 15](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public KeyguardManager.KeyguardLock newKeyguardLock (String tag)
```

<br />

**This method was deprecated in API level 15.**   

Use `https://developer.android.com/reference/android/R.attr#showWhenLocked` or `https://developer.android.com/reference/android/app/Activity#setShowWhenLocked(boolean)` instead. This allows you to seamlessly occlude and unocclude the keyguard as your application moves in and out of the foreground and does not require that any special permissions be requested.

Enables you to temporarily disable / reenable the keyguard (lock screen).

<br />

| Parameters ||
|---|---|
| `tag` | `String`: A tag that informally identifies who you are (for debugging who is disabling the keyguard). <br /> |

| Returns ||
|---|---|
| `https://developer.android.com/reference/android/app/KeyguardManager.KeyguardLock` | A `https://developer.android.com/reference/android/app/KeyguardManager.KeyguardLock` handle to use to disable and reenable the keyguard. <br /> |

### removeDeviceLockedStateListener

Added in [version 36.1](https://developer.android.com/topic/libraries/support-library/revisions)

```
public void removeDeviceLockedStateListener (KeyguardManager.DeviceLockedStateListener listener)
```

Unregisters a listener that executes when the device locked state changes.   

Requires `https://developer.android.com/reference/android/Manifest.permission#SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE`

<br />

| Parameters ||
|---|---|
| `listener` | `KeyguardManager.DeviceLockedStateListener`: The listener to remove. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/KeyguardManager#isDeviceLocked()`
- `https://developer.android.com/reference/android/app/KeyguardManager#addDeviceLockedStateListener(java.util.concurrent.Executor,%20android.app.KeyguardManager.DeviceLockedStateListener)`

### removeKeyguardLockedStateListener

Added in [API level 33](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void removeKeyguardLockedStateListener (KeyguardManager.KeyguardLockedStateListener listener)
```

Unregisters a listener that executes when the keyguard locked state changes.   

Requires `https://developer.android.com/reference/android/Manifest.permission#SUBSCRIBE_TO_KEYGUARD_LOCKED_STATE`

<br />

| Parameters ||
|---|---|
| `listener` | `KeyguardManager.KeyguardLockedStateListener`: The listener to remove. This value cannot be `null`. <br /> |

**See also:**

- `https://developer.android.com/reference/android/app/KeyguardManager#isKeyguardLocked()`
- `https://developer.android.com/reference/android/app/KeyguardManager#addKeyguardLockedStateListener(java.util.concurrent.Executor,%20android.app.KeyguardManager.KeyguardLockedStateListener)`

### requestDismissKeyguard

Added in [API level 26](https://developer.android.com/guide/topics/manifest/uses-sdk-element#ApiLevels)

```
public void requestDismissKeyguard (Activity activity, 
                KeyguardManager.KeyguardDismissCallback callback)
```

Requests that the Keyguard (lock screen) be dismissed if it is currently showing.

If the Keyguard is not secure or the device is currently in a trusted state, calling this method will immediately dismiss the Keyguard without any user interaction.

If the Keyguard is secure and the device is not in a trusted state, this will bring up the UI so the user can enter their credentials.

If the value set for the `https://developer.android.com/reference/android/app/Activity` attr `https://developer.android.com/reference/android/R.attr#turnScreenOn` is true, the screen will turn on when the keyguard is dismissed.

<br />

| Parameters ||
|---|---|
| `activity` | `Activity`: The activity requesting the dismissal. The activity must either be visible by using `https://developer.android.com/reference/android/R.attr#showWhenLocked` or `https://developer.android.com/reference/android/app/Activity#setShowWhenLocked(boolean)`, or must be in a state in which it would be visible if Keyguard would not be hiding it. If that's not the case, the request will fail immediately and `https://developer.android.com/reference/android/app/KeyguardManager.KeyguardDismissCallback#onDismissError()` will be invoked. This value cannot be `null`. <br /> |
| `callback` | `KeyguardManager.KeyguardDismissCallback`: The callback to be called if the request to dismiss Keyguard was successful or `null` if the caller isn't interested in knowing the result. The callback will not be invoked if the activity was destroyed before the callback was received. <br /> |