Fix AmbientDisplayAlwaysOn isSliceable.
I changed this method to return true in ag/22761786 thinking that it was necessary (as per the example at https://g3doc.corp.google.com/company/teams/apps-android-settings/howto/settings_slices.md#preference-controller), but this breaks a test, so I'm rolling back that part of the change. Fix: 279881487 Test: presubmit Change-Id: I87716a0daf5face9a79f98353b49ea2166226279
This commit is contained in:
@@ -22,6 +22,7 @@ import android.os.PowerManager;
|
||||
import android.os.SystemProperties;
|
||||
import android.os.UserHandle;
|
||||
import android.provider.Settings;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import androidx.preference.Preference;
|
||||
|
||||
@@ -63,7 +64,7 @@ public class AmbientDisplayAlwaysOnPreferenceController extends TogglePreference
|
||||
|
||||
@Override
|
||||
public boolean isPublicSlice() {
|
||||
return true;
|
||||
return TextUtils.equals(getPreferenceKey(), "ambient_display_always_on");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user