Add stats log for sensor privacy.
Test: statsd_testdrive 381 BUG: 192269258 Change-Id: I69e766b789b4b4a6ca0ad26b3a312baca3dbccd2
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package com.android.settings.display;
|
||||
|
||||
import static android.hardware.SensorPrivacyManager.Sensors.CAMERA;
|
||||
import static android.hardware.SensorPrivacyManager.Sources.DIALOG;
|
||||
|
||||
import android.content.Context;
|
||||
import android.hardware.SensorPrivacyManager;
|
||||
@@ -77,7 +78,7 @@ public class AdaptiveSleepCameraStatePreferenceController {
|
||||
mPreference.setSummary(R.string.adaptive_sleep_camera_lock_summary);
|
||||
mPreference.setPositiveButtonText(R.string.allow);
|
||||
mPreference.setPositiveButtonOnClickListener(
|
||||
p -> mPrivacyManager.setSensorPrivacy(CAMERA, false));
|
||||
p -> mPrivacyManager.setSensorPrivacy(DIALOG, CAMERA, false));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -17,6 +17,7 @@
|
||||
package com.android.settings.display;
|
||||
|
||||
import static android.hardware.SensorPrivacyManager.Sensors.CAMERA;
|
||||
import static android.hardware.SensorPrivacyManager.Sources.DIALOG;
|
||||
|
||||
import static com.android.settings.display.SmartAutoRotateController.isRotationResolverServiceAvailable;
|
||||
|
||||
@@ -63,7 +64,7 @@ public class SmartAutoRotateCameraStateController extends BasePreferenceControll
|
||||
((BannerMessagePreference) mPreference)
|
||||
.setPositiveButtonText(R.string.allow)
|
||||
.setPositiveButtonOnClickListener(v -> {
|
||||
mPrivacyManager.setSensorPrivacy(CAMERA, false);
|
||||
mPrivacyManager.setSensorPrivacy(DIALOG, CAMERA, false);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user