| java.lang.Object |
| ↳ |
com.datalogic.device.configuration.EnterpriseBatterySaverProfiles.Profile.Builder |
Class Overview
The builder for the Profile.
Summary
| Public Constructors |
|
|
Builder()
Create a new Builder for the Profile object, with the following default values:
- `name` unset
- `disable5G` set to `false`
- `cpuFrequencyLimit` set to `FREQUENCY_LIMIT_NONE`
- `gpuFrequencyLimit` set to `FREQUENCY_LIMIT_NONE`
- `usePowerSaveGovernor` set to `false`
- `downloadRateLimitKbps` set to `DOWNLOAD_RATE_LIMIT_NONE`
- `mobileDataAlwaysActive` set to `true`
- `adaptiveBrightness` set to `false`
- `disableBluetooth` set to `false`
- `disableWifi` set to `false`
- `disableLocation` set to `false`
- `disableTelephony` set to `false`
- `disableNfc` set to `false`
- `halvesBrightnessAdjustment` set to `false``
- `applicationsBlacklist` set to an empty list
- `installLocation` set to `USERDATA`
The name must be set before building the Profile object.
|
|
[Expand]
Inherited Methods |
From class
java.lang.Object
|
Object
|
clone()
|
|
boolean
|
equals(Object arg0)
|
|
void
|
finalize()
|
|
final
Class<?>
|
getClass()
|
|
int
|
hashCode()
|
|
final
void
|
notify()
|
|
final
void
|
notifyAll()
|
|
String
|
toString()
|
|
final
void
|
wait(long arg0, int arg1)
|
|
final
void
|
wait(long arg0)
|
|
final
void
|
wait()
|
|
Public Constructors
public
Builder
()
Create a new Builder for the Profile object, with the following default values:
- `name` unset
- `disable5G` set to `false`
- `cpuFrequencyLimit` set to `FREQUENCY_LIMIT_NONE`
- `gpuFrequencyLimit` set to `FREQUENCY_LIMIT_NONE`
- `usePowerSaveGovernor` set to `false`
- `downloadRateLimitKbps` set to `DOWNLOAD_RATE_LIMIT_NONE`
- `mobileDataAlwaysActive` set to `true`
- `adaptiveBrightness` set to `false`
- `disableBluetooth` set to `false`
- `disableWifi` set to `false`
- `disableLocation` set to `false`
- `disableTelephony` set to `false`
- `disableNfc` set to `false`
- `halvesBrightnessAdjustment` set to `false``
- `applicationsBlacklist` set to an empty list
- `installLocation` set to `USERDATA`
The name must be set before building the Profile object.
Public Methods
Add an application to the blacklist.
The application is identified by its package name. The name must be non empty.
Parameters
| application
| The package name of the application to add to the blacklist. |
Throws
| IllegalArgumentException
| if the name is empty or null.
|
Build and return a newly created Profile object. The created object is
guaranteed to be valid and ready to use.
Throws
| IllegalStateException
| if the name is not set or is empty.
|
Control if the adaptive brightness is enabled.
Parameters
| adaptiveBrightness
| true to enable the adaptive brightness, false otherwise.
|
Set the CPU frequency limit.
Throws
| IllegalArgumentException
| if the value is not one of the above.
|
Control if the 5G is disabled.
Control if Bluetooth is disabled.
Parameters
| disableBluetooth
| true to disable Bluetooth, false otherwise.
|
Control if the Location service is disabled.
Parameters
| disableLocation
| true to disable the location service, false otherwise.
|
Control if NFC is disabled.
Parameters
| disableNfc
| true to disable NFC, false otherwise.
|
Control if the Telephony service is disabled.
Parameters
| disableTelephony
| true to disable the telephony service, false otherwise.
|
Control if Wi-Fi is disabled.
Parameters
| disableWifi
| true to disable Wifi, false otherwise.
|
Set the download rate limit in Kbps.
Any non negative value is accepted but the following values are recommended:
Parameters
| downloadRateLimitKbps
| The download rate limit in Kbps. |
Throws
| IllegalArgumentException
| if the value is negative.
|
Set the GPU frequency limit.
Throws
| IllegalArgumentException
| if the value is not one of the above.
|
Control if the halves brightness adjustment is enabled.
Parameters
| halvesBrightnessAdjustment
| true to enable the halves brightness adjustment,
false otherwise.
|
Set the profile's install location.
Control if the mobile data is always active.
Parameters
| mobileDataAlwaysActive
| true to keep the mobile data always active, false
otherwise.
|
Set the profile name.
The name must be non empty and unique among all profiles. It is used to identify the
profile when creating an `ActivationItem`.
Parameters
| name
| The name of the profile. |
Throws
| IllegalArgumentException
| if the name is empty or null.
|
Control if the power save governor is used.
The power save governor is a CPU governor that is optimized for power
savings. It sets the CPU statically to the minimum frequency and
dynamically changes the CPU frequency based on the CPU load.
Parameters
| usePowerSaveGovernor
| true to use the power save governor, false otherwise. |