[Catalyst] Migrate AmbientDisplayAlwaysOnPreferenceController
As the preference is exported as external settings, for safety, do not update the preference key with datastore key. As a workaround, manage a mapping between preference hierarchy key and datastore key. Bug: 372307567 Flag: com.android.settings.flags.catalyst_lockscreen_from_display_settings Test: devtool Change-Id: I56126485061859b41216cd23b8e1caf63823a1ec
This commit is contained in:
@@ -56,8 +56,6 @@ import java.util.List;
|
||||
public class LockscreenDashboardFragment extends DashboardFragment
|
||||
implements OwnerInfoPreferenceController.OwnerInfoCallback {
|
||||
|
||||
public static final String KEY_AMBIENT_DISPLAY_ALWAYS_ON = "ambient_display_always_on";
|
||||
|
||||
private static final String TAG = "LockscreenDashboardFragment";
|
||||
|
||||
@VisibleForTesting
|
||||
@@ -111,7 +109,9 @@ public class LockscreenDashboardFragment extends DashboardFragment
|
||||
@Override
|
||||
public void onAttach(Context context) {
|
||||
super.onAttach(context);
|
||||
use(AmbientDisplayAlwaysOnPreferenceController.class).setConfig(getConfig(context));
|
||||
if (!isCatalystEnabled()) {
|
||||
use(AmbientDisplayAlwaysOnPreferenceController.class).setConfig(getConfig(context));
|
||||
}
|
||||
use(AmbientDisplayNotificationsPreferenceController.class).setConfig(getConfig(context));
|
||||
use(DoubleTapScreenPreferenceController.class).setConfig(getConfig(context));
|
||||
use(PickupGesturePreferenceController.class).setConfig(getConfig(context));
|
||||
|
||||
Reference in New Issue
Block a user