Cherish:Fix reticker not active
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
@@ -44,12 +44,14 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
|
||||
private static final String PREF_FLASH_ON_CALL_DND = "flashlight_on_call_ignore_dnd";
|
||||
private static final String PREF_FLASH_ON_CALL_RATE = "flashlight_on_call_rate";
|
||||
private static final String KEY_EDGE_LIGHTNING = "pulse_ambient_light";
|
||||
private static final String RETICKER_STATUS = "reticker_status";
|
||||
|
||||
private SystemSettingMasterSwitchPreference mEdgeLightning;
|
||||
private SystemSettingListPreference mFlashOnCall;
|
||||
private SystemSettingSwitchPreference mFlashOnCallIgnoreDND;
|
||||
private CustomSeekBarPreference mFlashOnCallRate;
|
||||
private Preference mChargingLeds;
|
||||
private SystemSettingSwitchPreference mRetickerStatus;
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
@@ -97,6 +99,11 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
|
||||
prefScreen.removePreference(mChargingLeds);
|
||||
}
|
||||
|
||||
mRetickerStatus = findPreference(RETICKER_STATUS);
|
||||
mRetickerStatus.setChecked((Settings.System.getInt(resolver,
|
||||
Settings.System.RETICKER_STATUS, 0) == 1));
|
||||
mRetickerStatus.setOnPreferenceChangeListener(this);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -120,6 +127,12 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
|
||||
Settings.System.putIntForUser(resolver, KEY_EDGE_LIGHTNING,
|
||||
value ? 1 : 0, UserHandle.USER_CURRENT);
|
||||
return true;
|
||||
} else if (preference == mRetickerStatus) {
|
||||
boolean value = (Boolean) newValue;
|
||||
Settings.System.putInt(resolver,
|
||||
Settings.System.RETICKER_STATUS, value ? 1 : 0);
|
||||
CherishUtils.showSettingsRestartDialog(getContext());
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user