SensorPrivacyManager

public final class SensorPrivacyManager
extends Object

java.lang.Object
   ↳ android.hardware.SensorPrivacyManager


This class provides access to the sensor privacy services; sensor privacy allows the user to disable access to all sensors on the device.

Summary

Nested classes

class SensorPrivacyManager.Sensors

Individual sensors not listed in Sensors 

Public methods

boolean supportsSensorToggle(int sensor)

Checks whether a given toggle is supported on this device.

Inherited methods

Public methods

supportsSensorToggle

public boolean supportsSensorToggle (int sensor)

Checks whether the given toggle is supported on this device.

Parameters
sensor int: The sensor to check Value is SensorPrivacyManager.Sensors.MICROPHONE, or SensorPrivacyManager.Sensors.CAMERA

Returns
boolean Whether the toggle for the sensor is supported on this device.