Cherish:Battery light customization [2/2]
This commit is contained in:
@@ -21,6 +21,8 @@ import net.margaritov.preference.colorpicker.ColorPickerPreference;
|
||||
|
||||
public class NotificationSettings extends SettingsPreferenceFragment implements Preference.OnPreferenceChangeListener{
|
||||
|
||||
private Preference mChargingLeds;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
super.onCreate(icicle);
|
||||
@@ -28,6 +30,13 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
|
||||
addPreferencesFromResource(R.xml.cherish_settings_notifications);
|
||||
PreferenceScreen prefScreen = getPreferenceScreen();
|
||||
ContentResolver resolver = getActivity().getContentResolver();
|
||||
|
||||
mChargingLeds = (Preference) findPreference("charging_light");
|
||||
if (mChargingLeds != null
|
||||
&& !getResources().getBoolean(
|
||||
com.android.internal.R.bool.config_intrusiveBatteryLed)) {
|
||||
prefScreen.removePreference(mChargingLeds);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user