public interface KeyguardSecurityView
Modifier and Type | Field and Description |
---|---|
static int |
PROMPT_REASON_AFTER_LOCKOUT
Some auth is required because too many wrong credentials led to a lockout.
|
static int |
PROMPT_REASON_DEVICE_ADMIN
Strong auth is required because a device admin requested it.
|
static int |
PROMPT_REASON_NONE |
static int |
PROMPT_REASON_RESTART
Strong auth is required because the device has just booted.
|
static int |
PROMPT_REASON_TIMEOUT
Strong auth is required because the user hasn't used strong auth since a while.
|
static int |
PROMPT_REASON_USER_REQUEST
Some auth is required because the user force locked.
|
static int |
SCREEN_ON |
static int |
VIEW_REVEALED |
Modifier and Type | Method and Description |
---|---|
KeyguardSecurityCallback |
getCallback()
Get
KeyguardSecurityCallback for the given object |
boolean |
needsInput()
Inquire whether this view requires IME (keyboard) interaction.
|
void |
onPause()
Emulate activity life cycle within the view.
|
void |
onResume(int reason)
Emulate activity life cycle within this view.
|
void |
reset()
Reset the view and prepare to take input.
|
void |
setKeyguardCallback(KeyguardSecurityCallback callback)
Interface back to keyguard to tell it when security
|
void |
setLockPatternUtils(LockPatternUtils utils)
Set
LockPatternUtils object. |
void |
showMessage(String message,
int color)
Show a message on the security view with a specified color
|
void |
showPromptReason(int reason)
Show a string explaining why the security view needs to be solved.
|
void |
showUsabilityHint()
Instruct the view to show usability hints, if any.
|
void |
startAppearAnimation()
Starts the animation which should run when the security view appears.
|
boolean |
startDisappearAnimation(Runnable finishRunnable)
Starts the animation which should run when the security view disappears.
|
static final int SCREEN_ON
static final int VIEW_REVEALED
static final int PROMPT_REASON_NONE
static final int PROMPT_REASON_RESTART
static final int PROMPT_REASON_TIMEOUT
static final int PROMPT_REASON_DEVICE_ADMIN
static final int PROMPT_REASON_USER_REQUEST
static final int PROMPT_REASON_AFTER_LOCKOUT
void setKeyguardCallback(KeyguardSecurityCallback callback)
callback
- void setLockPatternUtils(LockPatternUtils utils)
LockPatternUtils
object. Useful for providing a mock interface.utils
- void reset()
void onPause()
void onResume(int reason)
reason
- the root cause of the event.boolean needsInput()
KeyguardSecurityCallback getCallback()
KeyguardSecurityCallback
for the given objectvoid showPromptReason(int reason)
reason
- a flag indicating which string should be shown, see PROMPT_REASON_NONE
and PROMPT_REASON_RESTART
void showMessage(String message, int color)
message
- the message to showcolor
- the color to usevoid showUsabilityHint()
void startAppearAnimation()
boolean startDisappearAnimation(Runnable finishRunnable)
finishRunnable
- the runnable to be run when the animation endedfinishRunnable
will be run, false if no
animation started and finishRunnable
will not be run