Merge "Expose SensorPrivacy as SystemApi" into sc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
445abca30e
@@ -24,6 +24,7 @@ import android.app.ActivityManager;
|
||||
import android.content.ComponentName;
|
||||
import android.content.pm.FeatureInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.hardware.SensorPrivacyManager;
|
||||
import android.os.Build;
|
||||
import android.os.CarrierAssociatedAppEntry;
|
||||
import android.os.Environment;
|
||||
@@ -1252,6 +1253,14 @@ public class SystemConfig {
|
||||
addFeature(PackageManager.FEATURE_CROSS_LAYER_BLUR, 0);
|
||||
}
|
||||
|
||||
if (SensorPrivacyManager.USE_MICROPHONE_TOGGLE) {
|
||||
addFeature(PackageManager.FEATURE_MICROPHONE_TOGGLE, 0);
|
||||
}
|
||||
|
||||
if (SensorPrivacyManager.USE_CAMERA_TOGGLE) {
|
||||
addFeature(PackageManager.FEATURE_CAMERA_TOGGLE, 0);
|
||||
}
|
||||
|
||||
for (String featureName : mUnavailableFeatures) {
|
||||
removeFeature(featureName);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user