Set toggle state for profile group
The toggle state should be set for all users in the current profile group; for example a profile user. Test: make RunSettingsRoboTests ROBOTEST_FILTER=SensorToggleControllerTest Fixes: 194280328 Change-Id: Ib0b74e7b27722b44b116e614dc960bff72983a38
This commit is contained in:
@@ -172,6 +172,27 @@ public class SensorPrivacyManagerHelper {
|
||||
mSensorPrivacyManager.setSensorPrivacy(source, sensor, blocked, userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the sensor privacy for the current profile group.
|
||||
* @param source The source with which sensor privacy is toggled.
|
||||
* @param sensor The sensor to set for
|
||||
* @param blocked The state to set to
|
||||
*/
|
||||
public void setSensorBlockedForProfileGroup(int source, int sensor, boolean blocked) {
|
||||
mSensorPrivacyManager.setSensorPrivacyForProfileGroup(source, sensor, blocked);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the sensor privacy for the given user's profile group.
|
||||
* @param source The source with which sensor privacy is toggled.
|
||||
* @param sensor The sensor to set for
|
||||
* @param blocked The state to set to
|
||||
*/
|
||||
public void setSensorBlockedForProfileGroup(int source, int sensor, boolean blocked,
|
||||
int userId) {
|
||||
mSensorPrivacyManager.setSensorPrivacyForProfileGroup(source, sensor, blocked, userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a listener for the state of the current user. If the current user changes and the state
|
||||
* of the new user is different, a callback will be received.
|
||||
|
Reference in New Issue
Block a user