public class GestureLauncherService extends SystemService
For now, only camera launch gesture is supported, and in the future, more gestures can be added.
PHASE_ACTIVITY_MANAGER_READY, PHASE_BOOT_COMPLETED, PHASE_LOCK_SETTINGS_READY, PHASE_SYSTEM_SERVICES_READY, PHASE_THIRD_PARTY_APPS_CAN_START, PHASE_WAIT_FOR_DEFAULT_DISPLAY
Constructor and Description |
---|
GestureLauncherService(Context context) |
Modifier and Type | Method and Description |
---|---|
boolean |
interceptPowerKeyDown(KeyEvent event,
boolean interactive,
MutableBoolean outLaunched) |
static boolean |
isCameraDoubleTapPowerEnabled(Resources resources) |
static boolean |
isCameraDoubleTapPowerSettingEnabled(Context context,
int userId) |
static boolean |
isCameraLaunchEnabled(Resources resources)
Whether to enable the camera launch gesture.
|
static boolean |
isCameraLaunchSettingEnabled(Context context,
int userId) |
static boolean |
isGestureLauncherEnabled(Resources resources)
Whether GestureLauncherService should be enabled according to system properties.
|
void |
onBootPhase(int phase)
Called on each phase of the boot process.
|
void |
onStart()
Called when the dependencies listed in the @Service class-annotation are available
and after the chosen start phase.
|
getBinderService, getContext, getLocalService, isSafeMode, onCleanupUser, onStartUser, onStopUser, onSwitchUser, onUnlockUser, publishBinderService, publishBinderService, publishLocalService
public GestureLauncherService(Context context)
public void onStart()
SystemService
onStart
in class SystemService
public void onBootPhase(int phase)
SystemService
onBootPhase
in class SystemService
phase
- The current boot phase.public static boolean isCameraLaunchSettingEnabled(Context context, int userId)
public static boolean isCameraDoubleTapPowerSettingEnabled(Context context, int userId)
public static boolean isCameraLaunchEnabled(Resources resources)
public static boolean isCameraDoubleTapPowerEnabled(Resources resources)
public static boolean isGestureLauncherEnabled(Resources resources)
public boolean interceptPowerKeyDown(KeyEvent event, boolean interactive, MutableBoolean outLaunched)