to top
Datalogic APIs
public final enum

PocketModePolicy

extends Enum<E extends Enum<E>>
java.lang.Object
   ↳ java.lang.Enum<E extends java.lang.Enum<E>>
     ↳ com.datalogic.device.configuration.PocketModePolicy

Summary

Enum Values
PocketModePolicy  DEVICE_LOCK  When pocket-mode is triggered by the proximity sensor the display will enter suspend state, much like when the power button is pressed. 
PocketModePolicy  DISPLAY_OFF  When pocket-mode is triggered by the proximity sensor, the display will be turned off, leaving the device in an unlocked state. 
PocketModePolicy  PROGRESSIVE_DEVICE_LOCK  When pocket-mode is triggered by the proximity sensor the display will be initially turned off, as for the DISPLAY_OFF policy. 
Public Methods
static PocketModePolicy fromInt(int id)
Retrieves the corresponding PocketModePolicy value, from a valid integer.
int toInt()
Retrieves the corresponding int value.
static PocketModePolicy valueOf(String name)
final static PocketModePolicy[] values()
[Expand]
Inherited Methods
From class java.lang.Enum
From class java.lang.Object
From interface java.lang.Comparable

Enum Values

public static final PocketModePolicy DEVICE_LOCK

Added in revision 41

When pocket-mode is triggered by the proximity sensor the display will enter suspend state, much like when the power button is pressed. The device will be in locked state. When the proximity sensor no longer detects an obstruction, the device will resume from suspend state and will be locked or unlocked according to the screen lock configuration.

public static final PocketModePolicy DISPLAY_OFF

Added in revision 41

When pocket-mode is triggered by the proximity sensor, the display will be turned off, leaving the device in an unlocked state. When the proximity sensor no longer detects an obstruction, the display will be turned on and the device remaining in its unlocked state.

public static final PocketModePolicy PROGRESSIVE_DEVICE_LOCK

Added in revision 41

When pocket-mode is triggered by the proximity sensor the display will be initially turned off, as for the DISPLAY_OFF policy. Then, after a period defined by POWER_POCKET_MODE_LOCK_TIMEOUT without any new sensor change, it will enter the suspend state, like with the DEVICE_LOCK policy. When the proximity sensor no longer detects an obstruction, the display will turn on and the device will remain in its unlocked state if the lock timeout has not elapsed; otherwise, the device will resume from suspend state and will be locked or unlocked according to the screen lock configuration.

Public Methods

public static PocketModePolicy fromInt (int id)

Added in revision 41

Retrieves the corresponding PocketModePolicy value, from a valid integer.

Parameters
id int
Returns
  • Type of the corresponding enum value, or DISPLAY_OFF if not a valid integer is passed.

public int toInt ()

Added in revision 41

Retrieves the corresponding int value.

Returns
  • int

public static PocketModePolicy valueOf (String name)

Added in revision 41

public static final PocketModePolicy[] values ()

Added in revision 41