Loading packages/SystemUI/src/com/android/systemui/tuner/BatteryPreference.java +1 −1 Original line number Diff line number Diff line Loading @@ -47,9 +47,9 @@ public class BatteryPreference extends DropDownPreference implements TunerServic @Override public void onAttached() { super.onAttached(); TunerService.get(getContext()).addTunable(this, StatusBarIconController.ICON_BLACKLIST); mHasPercentage = Settings.System.getInt(getContext().getContentResolver(), SHOW_PERCENT_SETTING, 0) != 0; TunerService.get(getContext()).addTunable(this, StatusBarIconController.ICON_BLACKLIST); } @Override Loading packages/SystemUI/src/com/android/systemui/tuner/ClockPreference.java +5 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,8 @@ public class ClockPreference extends DropDownPreference implements TunerService. private boolean mHasSeconds; private ArraySet<String> mBlacklist; private boolean mHasSetValue; private boolean mReceivedSeconds; private boolean mReceivedClock; public ClockPreference(Context context, AttributeSet attrs) { super(context, attrs); Loading @@ -55,12 +57,14 @@ public class ClockPreference extends DropDownPreference implements TunerService. @Override public void onTuningChanged(String key, String newValue) { if (StatusBarIconController.ICON_BLACKLIST.equals(key)) { mReceivedClock = true; mBlacklist = StatusBarIconController.getIconBlacklist(newValue); mClockEnabled = !mBlacklist.contains(mClock); } else if (Clock.CLOCK_SECONDS.equals(key)) { mReceivedSeconds = true; mHasSeconds = newValue != null && Integer.parseInt(newValue) != 0; } if (!mHasSetValue) { if (!mHasSetValue && mReceivedClock && mReceivedSeconds) { // Because of the complicated tri-state it can end up looping and setting state back to // what the user didn't choose. To avoid this, just set the state once and rely on the // preference to handle updates. Loading Loading
packages/SystemUI/src/com/android/systemui/tuner/BatteryPreference.java +1 −1 Original line number Diff line number Diff line Loading @@ -47,9 +47,9 @@ public class BatteryPreference extends DropDownPreference implements TunerServic @Override public void onAttached() { super.onAttached(); TunerService.get(getContext()).addTunable(this, StatusBarIconController.ICON_BLACKLIST); mHasPercentage = Settings.System.getInt(getContext().getContentResolver(), SHOW_PERCENT_SETTING, 0) != 0; TunerService.get(getContext()).addTunable(this, StatusBarIconController.ICON_BLACKLIST); } @Override Loading
packages/SystemUI/src/com/android/systemui/tuner/ClockPreference.java +5 −1 Original line number Diff line number Diff line Loading @@ -32,6 +32,8 @@ public class ClockPreference extends DropDownPreference implements TunerService. private boolean mHasSeconds; private ArraySet<String> mBlacklist; private boolean mHasSetValue; private boolean mReceivedSeconds; private boolean mReceivedClock; public ClockPreference(Context context, AttributeSet attrs) { super(context, attrs); Loading @@ -55,12 +57,14 @@ public class ClockPreference extends DropDownPreference implements TunerService. @Override public void onTuningChanged(String key, String newValue) { if (StatusBarIconController.ICON_BLACKLIST.equals(key)) { mReceivedClock = true; mBlacklist = StatusBarIconController.getIconBlacklist(newValue); mClockEnabled = !mBlacklist.contains(mClock); } else if (Clock.CLOCK_SECONDS.equals(key)) { mReceivedSeconds = true; mHasSeconds = newValue != null && Integer.parseInt(newValue) != 0; } if (!mHasSetValue) { if (!mHasSetValue && mReceivedClock && mReceivedSeconds) { // Because of the complicated tri-state it can end up looping and setting state back to // what the user didn't choose. To avoid this, just set the state once and rely on the // preference to handle updates. Loading