Revert "Fixes 'no ripple effect' issue for screen attention setting"
This reverts commit 20d1da2b62
.
Reason for revert: Based on bisection, this is the likely root cause of b/186904496
Bug: 186904496
Change-Id: I0eaa026b52610d7ef4543c32791531971e68f8e6
This commit is contained in:
@@ -71,15 +71,11 @@ public class ScreenTimeoutSettings extends RadioButtonPickerFragment implements
|
||||
private CharSequence[] mInitialEntries;
|
||||
private CharSequence[] mInitialValues;
|
||||
private FooterPreference mPrivacyPreference;
|
||||
private final MetricsFeatureProvider mMetricsFeatureProvider;
|
||||
private MetricsFeatureProvider mMetricsFeatureProvider;
|
||||
private SensorPrivacyManager mPrivacyManager;
|
||||
|
||||
@VisibleForTesting
|
||||
Context mContext;
|
||||
|
||||
@VisibleForTesting
|
||||
RestrictedLockUtils.EnforcedAdmin mAdmin;
|
||||
|
||||
@VisibleForTesting
|
||||
Preference mDisableOptionsPreference;
|
||||
|
||||
@@ -101,7 +97,6 @@ public class ScreenTimeoutSettings extends RadioButtonPickerFragment implements
|
||||
@Override
|
||||
public void onAttach(Context context) {
|
||||
super.onAttach(context);
|
||||
mContext = context;
|
||||
mInitialEntries = getResources().getStringArray(R.array.screen_timeout_entries);
|
||||
mInitialValues = getResources().getStringArray(R.array.screen_timeout_values);
|
||||
mAdaptiveSleepController = new AdaptiveSleepPreferenceController(context);
|
||||
@@ -109,6 +104,11 @@ public class ScreenTimeoutSettings extends RadioButtonPickerFragment implements
|
||||
context);
|
||||
mAdaptiveSleepCameraStatePreferenceController =
|
||||
new AdaptiveSleepCameraStatePreferenceController(context);
|
||||
mPrivacyPreference = new FooterPreference(context);
|
||||
mPrivacyPreference.setIcon(R.drawable.ic_privacy_shield_24dp);
|
||||
mPrivacyPreference.setTitle(R.string.adaptive_sleep_privacy);
|
||||
mPrivacyPreference.setSelectable(false);
|
||||
mPrivacyPreference.setLayoutResource(R.layout.preference_footer);
|
||||
mPrivacyManager = SensorPrivacyManager.getInstance(context);
|
||||
mPrivacyManager.addSensorPrivacyListener(CAMERA,
|
||||
(sensor, enabled) -> mAdaptiveSleepController.updatePreference());
|
||||
@@ -167,12 +167,6 @@ public class ScreenTimeoutSettings extends RadioButtonPickerFragment implements
|
||||
preferenceWithLargestTimeout.setChecked(true);
|
||||
}
|
||||
|
||||
mPrivacyPreference = new FooterPreference(mContext);
|
||||
mPrivacyPreference.setIcon(R.drawable.ic_privacy_shield_24dp);
|
||||
mPrivacyPreference.setTitle(R.string.adaptive_sleep_privacy);
|
||||
mPrivacyPreference.setSelectable(false);
|
||||
mPrivacyPreference.setLayoutResource(R.layout.preference_footer);
|
||||
|
||||
if (isScreenAttentionAvailable(getContext())) {
|
||||
mAdaptiveSleepPermissionController.addToScreen(screen);
|
||||
mAdaptiveSleepCameraStatePreferenceController.addToScreen(screen);
|
||||
|
Reference in New Issue
Block a user