Cherish: Fix edge lighting colorpicker showing wrong colorhex in summary
Signed-off-by: AnkitGourav <Ankitgourav035@gmail.com>
This commit is contained in:
@@ -37,17 +37,16 @@ public class NotificationSettings extends SettingsPreferenceFragment implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
mEdgeLightColorPreference = (ColorPickerPreference) findPreference(PULSE_AMBIENT_LIGHT_COLOR);
|
mEdgeLightColorPreference = (ColorPickerPreference) findPreference(PULSE_AMBIENT_LIGHT_COLOR);
|
||||||
|
mEdgeLightColorPreference.setOnPreferenceChangeListener(this);
|
||||||
int edgeLightColor = Settings.System.getInt(getContentResolver(),
|
int edgeLightColor = Settings.System.getInt(getContentResolver(),
|
||||||
Settings.System.PULSE_AMBIENT_LIGHT_COLOR, 0xFF3980FF);
|
Settings.System.PULSE_AMBIENT_LIGHT_COLOR, 0xFF3980FF);
|
||||||
mEdgeLightColorPreference.setNewPreviewColor(edgeLightColor);
|
|
||||||
mEdgeLightColorPreference.setAlphaSliderEnabled(false);
|
|
||||||
String edgeLightColorHex = String.format("#%08x", (0xFF3980FF & edgeLightColor));
|
String edgeLightColorHex = String.format("#%08x", (0xFF3980FF & edgeLightColor));
|
||||||
if (edgeLightColorHex.equals("#ff3980ff")) {
|
if (edgeLightColorHex.equals("#ff3980ff")) {
|
||||||
mEdgeLightColorPreference.setSummary(R.string.default_string);
|
mEdgeLightColorPreference.setSummary(R.string.default_string);
|
||||||
} else {
|
} else {
|
||||||
mEdgeLightColorPreference.setSummary(edgeLightColorHex);
|
mEdgeLightColorPreference.setSummary(edgeLightColorHex);
|
||||||
}
|
}
|
||||||
mEdgeLightColorPreference.setOnPreferenceChangeListener(this);
|
mEdgeLightColorPreference.setNewPreviewColor(edgeLightColor);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user