Merge "Do not allow Sensors Off to be toggled from the lock screen"

This commit is contained in:
Michael Groover
2023-05-22 19:12:44 +00:00
committed by Android (Google) Code Review
2 changed files with 109 additions and 2 deletions

View File

@@ -401,8 +401,8 @@ public abstract class DevelopmentTiles extends TileService {
@Override
public void setIsEnabled(boolean isEnabled) {
// Don't allow sensors to be reenabled from the lock screen.
if (mIsEnabled && mKeyguardManager.isKeyguardLocked()) {
// Don't allow sensors to be toggled from the lock screen.
if (mKeyguardManager.isKeyguardLocked()) {
return;
}
mMetricsFeatureProvider.action(getApplicationContext(), SettingsEnums.QS_SENSOR_PRIVACY,