protected abstract class

KeyguardExternalViewProviderService.Provider

extends Object
java.lang.Object
   ↳ cyanogenmod.externalviews.KeyguardExternalViewProviderService.Provider

Class Overview

This class provides an interface for the host and service to communicate to each other.

Summary

Protected Constructors
KeyguardExternalViewProviderService.Provider(Bundle options)
Protected Methods
final void collapseNotificationPanel()
This method was deprecated in API level 5. As of SDK version ELDERBERRY this does nothing.
Bundle getOptions()
void onAttach()
Called when the host view is attached to a window.
abstract void onBouncerShowing(boolean showing)
Called from the host when the keyguard is displaying the security screen for the user to enter their pin, password, or pattern.
abstract View onCreateView()
Callback used for getting the view to be displayed within the host's content.
void onDetach()
Called when the host view is detached from a window.
abstract void onKeyguardDismissed()
Called from the host when the user has unlocked the device.
abstract void onKeyguardShowing(boolean screenOn)
Called from the host when the keyguard is being shown to the user.
void onLockscreenSlideOffsetChanged(float swipeProgress)
Called from the host when the user is swiping the lockscreen to transition into the live lock screen
abstract void onScreenTurnedOff()
Called from the host when the screen is turned off.
abstract void onScreenTurnedOn()
Called from the host when the screen is turned on.
final boolean requestDismiss()
Request that the keyguard be dismissed.
final boolean requestDismissAndStartActivity(Intent intent)
Request that the keyguard be dismissed and the activity provided by the given intent be started once the keyguard is dismissed.
final void setInteractivity(boolean isInteractive)
This method should be called when the provided view needs to change from interactive to non-interactive and vice versa.
final void slideLockscreenIn()
Call this method when you like to slide in the lockscreen on top of your live lockscreen.
[Expand]
Inherited Methods
From class java.lang.Object

Protected Constructors

protected KeyguardExternalViewProviderService.Provider (Bundle options)

Added in API level 4

Protected Methods

protected final void collapseNotificationPanel ()

Added in API level 4

This method was deprecated in API level 5.
As of SDK version ELDERBERRY this does nothing.

Call this method when you would like to take focus and hide the notification panel.

You should call this method if your component requires focus and the users's attention. The user will still be able to bring the notifications back into view by sliding down from the status bar. Calling this method has no effect for non-interactive components.

protected Bundle getOptions ()

Added in API level 4

protected void onAttach ()

Added in API level 4

Called when the host view is attached to a window.

protected abstract void onBouncerShowing (boolean showing)

Added in API level 4

Called from the host when the keyguard is displaying the security screen for the user to enter their pin, password, or pattern.

Interactive components will no longer have focus when the bouncer is displayed and should enter a paused or idle state while the bouncer is being shown.

Parameters
showing True if the bouncer is being show or false when it is dismissed without the device being unlocked.

protected abstract View onCreateView ()

Added in API level 4

Callback used for getting the view to be displayed within the host's content.

Returns
  • The view to be displayed within the host's content. If null is returned no content will be displayed.

protected void onDetach ()

Added in API level 4

Called when the host view is detached from a window.

protected abstract void onKeyguardDismissed ()

Added in API level 4

Called from the host when the user has unlocked the device. Once this is called the lock lock screen is no longer being displayed.

The view component should enter a paused state when this is called, and save any state information that may be needed once the lock screen is displayed again. For example, a non-interactive component that provides animated visuals should pause playback of those animations and save the state, if necessary, of that animation.

protected abstract void onKeyguardShowing (boolean screenOn)

Added in API level 4

Called from the host when the keyguard is being shown to the user.

Parameters
screenOn True if the screen is currently on.

protected void onLockscreenSlideOffsetChanged (float swipeProgress)

Added in API level 5

Called from the host when the user is swiping the lockscreen to transition into the live lock screen

Parameters
swipeProgress [0-1] represents the progress of the swipe

protected abstract void onScreenTurnedOff ()

Added in API level 4

Called from the host when the screen is turned off.

The provided view should provided view should pause its activity, if not currently in a paused state, and do any work necessary to be ready when the screen is turned back on. This will allow for a seamless user experience once the screen is turned on.

protected abstract void onScreenTurnedOn ()

Added in API level 4

Called from the host when the screen is turned on.

The provided view should return to a running state when this is called. For example, a non-interactive component that provides animated visuals should resume playback of those animations.

protected final boolean requestDismiss ()

Added in API level 4

Request that the keyguard be dismissed. Calling this method will dismiss the lock screen, if it is a not secure, or present the user with the security screen for the user to enter their security code to finish dismissing the lock screen.

If the user has a secure lock screen and dismisses the bouncer without entering their secure code, the lock screen will not be dismissed and onBouncerShowing(boolean) will be called with onShowing being set to false, indicating that the lock screen was not dismissed as requested.

Returns
  • True if the call succeeded.

protected final boolean requestDismissAndStartActivity (Intent intent)

Added in API level 4

Request that the keyguard be dismissed and the activity provided by the given intent be started once the keyguard is dismissed. If a secure lock screen is being used the user will need to enter their correct security code to finish dismissing the lock screen.

If the user has a secure lock screen and dismisses the bouncer without entering their secure code, the lock screen will not be dismissed and onBouncerShowing(boolean) will be called with onShowing being set to false, indicating that the lock screen was not dismissed as requested.

Parameters
intent An intent specifying an activity to launch.
Returns
  • True if the call succeeded.

protected final void setInteractivity (boolean isInteractive)

Added in API level 4

This method should be called when the provided view needs to change from interactive to non-interactive and vice versa.

Interactive components can receive input focus and receive user interaction while non-interactive components never receive focus and are purely visual.

protected final void slideLockscreenIn ()

Added in API level 5

Call this method when you like to slide in the lockscreen on top of your live lockscreen. Only relevant if you use setInteractivity(boolean)