Added in API level 31
SensorPrivacyManager
public
final
class
SensorPrivacyManager
extends Object
| java.lang.Object | |
| ↳ | android.hardware.SensorPrivacyManager |
This class provides information about the microphone and camera toggles.
Summary
Nested classes | |
|---|---|
class |
SensorPrivacyManager.Sensors
Individual sensors not listed in |
Public methods | |
|---|---|
boolean
|
supportsSensorToggle(int sensor)
Checks if the given toggle is supported on this device |
Inherited methods | |
|---|---|
Public methods
supportsSensorToggle
Added in API level 31
public boolean supportsSensorToggle (int sensor)
Checks if 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. |
Content and code samples on this page are subject to the licenses described in the Content License. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2021-08-11 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]