#[non_exhaustive]pub enum LocationPowerSaveMode {
UnknownLocationPowerSaveMode,
LocationModeNoChange,
LocationModeGpsDisabledWhenScreenOff,
LocationModeAllDisabledWhenScreenOff,
LocationModeForegroundOnly,
LocationModeThrottleRequestsWhenScreenOff,
UnknownValue(UnknownValue),
}Expand description
How location features are configured to behave on the mobile device when the devices “battery saver” feature is on. (https://developer.android.com/reference/android/os/PowerManager#getLocationPowerSaveMode())
§Working with unknown values
This enum is defined as #[non_exhaustive] because Google Cloud may add
additional enum variants at any time. Adding new variants is not considered
a breaking change. Applications should write their code in anticipation of:
- New values appearing in future releases of the client library, and
- New values received dynamically, without application changes.
Please consult the Working with enums section in the user guide for some guidelines.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownLocationPowerSaveMode
Undefined LocationPowerSaveMode
LocationModeNoChange
Either the location providers shouldn’t be affected by battery saver, or battery saver is off.
LocationModeGpsDisabledWhenScreenOff
The GPS based location provider should be disabled when battery saver is on and the device is non-interactive.
LocationModeAllDisabledWhenScreenOff
All location providers should be disabled when battery saver is on and the device is non-interactive.
LocationModeForegroundOnly
All the location providers will be kept available, but location fixes should only be provided to foreground apps.
LocationModeThrottleRequestsWhenScreenOff
Location will not be turned off, but LocationManager will throttle all requests to providers when the device is non-interactive.
UnknownValue(UnknownValue)
If set, the enum was initialized with an unknown value.
Applications can examine the value using LocationPowerSaveMode::value or LocationPowerSaveMode::name.
Implementations§
Trait Implementations§
Source§impl Clone for LocationPowerSaveMode
impl Clone for LocationPowerSaveMode
Source§fn clone(&self) -> LocationPowerSaveMode
fn clone(&self) -> LocationPowerSaveMode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more