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_DND = "flashlight_on_call_ignore_dnd";
|
||||||
private static final String PREF_FLASH_ON_CALL_RATE = "flashlight_on_call_rate";
|
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 KEY_EDGE_LIGHTNING = "pulse_ambient_light";
|
||||||
|
private static final String RETICKER_STATUS = "reticker_status";
|
||||||
|
|
||||||
private SystemSettingMasterSwitchPreference mEdgeLightning;
|
private SystemSettingMasterSwitchPreference mEdgeLightning;
|
||||||
private SystemSettingListPreference mFlashOnCall;
|
private SystemSettingListPreference mFlashOnCall;
|
||||||
private SystemSettingSwitchPreference mFlashOnCallIgnoreDND;
|
private SystemSettingSwitchPreference mFlashOnCallIgnoreDND;
|
||||||
private CustomSeekBarPreference mFlashOnCallRate;
|
private CustomSeekBarPreference mFlashOnCallRate;
|
||||||
private Preference mChargingLeds;
|
private Preference mChargingLeds;
|
||||||
|
private SystemSettingSwitchPreference mRetickerStatus;
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle icicle) {
|
public void onCreate(Bundle icicle) {
|
||||||
super.onCreate(icicle);
|
super.onCreate(icicle);
|
||||||
@@ -96,6 +98,11 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
|
|||||||
com.android.internal.R.bool.config_intrusiveBatteryLed)) {
|
com.android.internal.R.bool.config_intrusiveBatteryLed)) {
|
||||||
prefScreen.removePreference(mChargingLeds);
|
prefScreen.removePreference(mChargingLeds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mRetickerStatus = findPreference(RETICKER_STATUS);
|
||||||
|
mRetickerStatus.setChecked((Settings.System.getInt(resolver,
|
||||||
|
Settings.System.RETICKER_STATUS, 0) == 1));
|
||||||
|
mRetickerStatus.setOnPreferenceChangeListener(this);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,6 +127,12 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
|
|||||||
Settings.System.putIntForUser(resolver, KEY_EDGE_LIGHTNING,
|
Settings.System.putIntForUser(resolver, KEY_EDGE_LIGHTNING,
|
||||||
value ? 1 : 0, UserHandle.USER_CURRENT);
|
value ? 1 : 0, UserHandle.USER_CURRENT);
|
||||||
return true;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user