Compare commits
4 Commits
twelve-one
...
111
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ca84402338 | ||
|
|
968cd1560d | ||
|
|
42aa4ba440 | ||
|
|
25c1e4f684 |
@@ -651,4 +651,20 @@
|
|||||||
<item>4</item>
|
<item>4</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
|
|
||||||
|
<!-- QS SystemInfo -->
|
||||||
|
<string-array name="qs_system_info_entries">
|
||||||
|
<item>@string/qs_system_info_off</item>
|
||||||
|
<item>@string/qs_system_info_cpu_temp</item>
|
||||||
|
<item>@string/qs_system_info_battery_temp</item>
|
||||||
|
<item>@string/qs_system_info_gpu_clock</item>
|
||||||
|
<item>@string/qs_system_info_gpu_busy</item>
|
||||||
|
</string-array>
|
||||||
|
<string-array name="qs_system_info_values" translatable="false">
|
||||||
|
<item>0</item>
|
||||||
|
<item>1</item>
|
||||||
|
<item>2</item>
|
||||||
|
<item>3</item>
|
||||||
|
<item>4</item>
|
||||||
|
</string-array>
|
||||||
|
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -901,4 +901,19 @@
|
|||||||
<!-- Fingerprint Ripple Effect -->
|
<!-- Fingerprint Ripple Effect -->
|
||||||
<string name="enable_fingerprint_ripple_effect_title">Ripple effect</string>
|
<string name="enable_fingerprint_ripple_effect_title">Ripple effect</string>
|
||||||
<string name="enable_fingerprint_ripple_effect_summary">Show ripple effect on unlock with fingerprint</string>
|
<string name="enable_fingerprint_ripple_effect_summary">Show ripple effect on unlock with fingerprint</string>
|
||||||
|
|
||||||
|
<!-- QS SystemInfo -->
|
||||||
|
<string name="qs_system_info_title">System Info</string>
|
||||||
|
<string name="qs_system_info_off">Off</string>
|
||||||
|
<string name="qs_system_info_cpu_temp">CPU temperature</string>
|
||||||
|
<string name="qs_system_info_battery_temp">Battery temperature</string>
|
||||||
|
<string name="qs_system_info_gpu_clock">GPU frequency</string>
|
||||||
|
<string name="qs_system_info_gpu_busy">GPU utilization</string>
|
||||||
|
|
||||||
|
<!-- QS Clock/Date Size -->
|
||||||
|
<string name="status_bar_clock_font_size_title">Statusbar Clock font size</string>
|
||||||
|
<string name="qs_clock_font_size_title">QS Header Clock font size</string>
|
||||||
|
<string name="qs_date_title_size_title">QS Header Date font size</string>
|
||||||
|
|
||||||
|
<string name="status_bar_show_clock_bg">Show clock background chip</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -32,6 +32,21 @@
|
|||||||
android:max="100"
|
android:max="100"
|
||||||
android:min="1" />
|
android:min="1" />
|
||||||
|
|
||||||
|
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||||
|
android:key="qs_system_info"
|
||||||
|
android:title="@string/qs_system_info_title"
|
||||||
|
android:entries="@array/qs_system_info_entries"
|
||||||
|
android:entryValues="@array/qs_system_info_values"
|
||||||
|
android:defaultValue="0" />
|
||||||
|
|
||||||
|
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
|
||||||
|
android:key="qs_header_clock_size"
|
||||||
|
android:title="@string/qs_clock_font_size_title"
|
||||||
|
android:max="27"
|
||||||
|
settings:min="10"
|
||||||
|
android:defaultValue="14"
|
||||||
|
settings:units="dp"/>
|
||||||
|
|
||||||
|
|
||||||
<!-- QS date -->
|
<!-- QS date -->
|
||||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||||
@@ -40,6 +55,14 @@
|
|||||||
android:summary="@string/qs_date_summary"
|
android:summary="@string/qs_date_summary"
|
||||||
android:defaultValue="true" />
|
android:defaultValue="true" />
|
||||||
|
|
||||||
|
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
|
||||||
|
android:key="qs_header_date_size"
|
||||||
|
android:title="@string/qs_date_title_size_title"
|
||||||
|
android:max="27"
|
||||||
|
settings:min="10"
|
||||||
|
android:defaultValue="14"
|
||||||
|
settings:units="dp"/>
|
||||||
|
|
||||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||||
android:key="qs_footer_data_usage"
|
android:key="qs_footer_data_usage"
|
||||||
android:title="@string/qs_footer_datausage_title"
|
android:title="@string/qs_footer_datausage_title"
|
||||||
|
|||||||
@@ -51,6 +51,19 @@
|
|||||||
android:summary="@string/status_bar_clock_summary"
|
android:summary="@string/status_bar_clock_summary"
|
||||||
android:fragment="com.cherish.settings.fragments.Clock" />
|
android:fragment="com.cherish.settings.fragments.Clock" />
|
||||||
|
|
||||||
|
<SwitchPreference
|
||||||
|
android:key="statusbar_clock_chip"
|
||||||
|
android:title="@string/status_bar_show_clock_bg"
|
||||||
|
android:defaultValue="true" />
|
||||||
|
|
||||||
|
<com.cherish.settings.preferences.SystemSettingSeekBarPreference
|
||||||
|
android:key="status_bar_clock_size"
|
||||||
|
android:title="@string/status_bar_clock_font_size_title"
|
||||||
|
android:max="20"
|
||||||
|
settings:min="4"
|
||||||
|
android:defaultValue="14"
|
||||||
|
settings:units="dp"/>
|
||||||
|
|
||||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||||
android:key="data_disabled_icon"
|
android:key="data_disabled_icon"
|
||||||
android:title="@string/data_disabled_icon_title"
|
android:title="@string/data_disabled_icon_title"
|
||||||
|
|||||||
@@ -37,7 +37,13 @@ import java.util.ArrayList;
|
|||||||
public class QuickSettings extends SettingsPreferenceFragment implements
|
public class QuickSettings extends SettingsPreferenceFragment implements
|
||||||
OnPreferenceChangeListener {
|
OnPreferenceChangeListener {
|
||||||
|
|
||||||
|
private static final String KEY_QS_CLOCK_SIZE = "qs_header_clock_size";
|
||||||
|
private static final String KEY_QS_DATE_SIZE = "qs_header_date_size";
|
||||||
|
|
||||||
private ListPreference mQuickPulldown;
|
private ListPreference mQuickPulldown;
|
||||||
|
private CustomSeekBarPreference mQsClockSize;
|
||||||
|
private CustomSeekBarPreference mQSDateSize;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle icicle) {
|
public void onCreate(Bundle icicle) {
|
||||||
super.onCreate(icicle);
|
super.onCreate(icicle);
|
||||||
@@ -53,6 +59,18 @@ public class QuickSettings extends SettingsPreferenceFragment implements
|
|||||||
mQuickPulldown.setValue(String.valueOf(qpmode));
|
mQuickPulldown.setValue(String.valueOf(qpmode));
|
||||||
mQuickPulldown.setSummary(mQuickPulldown.getEntry());
|
mQuickPulldown.setSummary(mQuickPulldown.getEntry());
|
||||||
mQuickPulldown.setOnPreferenceChangeListener(this);
|
mQuickPulldown.setOnPreferenceChangeListener(this);
|
||||||
|
|
||||||
|
mQsClockSize = (CustomSeekBarPreference) findPreference(KEY_QS_CLOCK_SIZE);
|
||||||
|
int qsClockSize = Settings.System.getInt(getActivity().getContentResolver(),
|
||||||
|
Settings.System.QS_HEADER_CLOCK_SIZE, 14);
|
||||||
|
mQsClockSize.setValue(qsClockSize / 1);
|
||||||
|
mQsClockSize.setOnPreferenceChangeListener(this);
|
||||||
|
|
||||||
|
mQSDateSize = (CustomSeekBarPreference) findPreference(KEY_QS_DATE_SIZE);
|
||||||
|
int qsDateSize = Settings.System.getInt(getActivity().getContentResolver(),
|
||||||
|
Settings.System.QS_HEADER_DATE_SIZE, 14);
|
||||||
|
mQSDateSize.setValue(qsDateSize / 1);
|
||||||
|
mQSDateSize.setOnPreferenceChangeListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -66,6 +84,16 @@ public class QuickSettings extends SettingsPreferenceFragment implements
|
|||||||
int index = mQuickPulldown.findIndexOfValue((String) newValue);
|
int index = mQuickPulldown.findIndexOfValue((String) newValue);
|
||||||
mQuickPulldown.setSummary(
|
mQuickPulldown.setSummary(
|
||||||
mQuickPulldown.getEntries()[index]);
|
mQuickPulldown.getEntries()[index]);
|
||||||
|
return true;
|
||||||
|
} else if (preference == mQsClockSize) {
|
||||||
|
int width = ((Integer)newValue).intValue();
|
||||||
|
Settings.System.putInt(getActivity().getContentResolver(),
|
||||||
|
Settings.System.QS_HEADER_CLOCK_SIZE, width);
|
||||||
|
return true;
|
||||||
|
} else if (preference == mQSDateSize) {
|
||||||
|
int dateWidth = ((Integer)newValue).intValue();
|
||||||
|
Settings.System.putInt(getActivity().getContentResolver(),
|
||||||
|
Settings.System.QS_HEADER_DATE_SIZE, dateWidth);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -53,9 +53,13 @@ public class StatusBarSettings extends SettingsPreferenceFragment implements
|
|||||||
private static final String CONFIG_RESOURCE_NAME = "flag_combined_status_bar_signal_icons";
|
private static final String CONFIG_RESOURCE_NAME = "flag_combined_status_bar_signal_icons";
|
||||||
private static final String COBINED_STATUSBAR_ICONS = "show_combined_status_bar_signal_icons";
|
private static final String COBINED_STATUSBAR_ICONS = "show_combined_status_bar_signal_icons";
|
||||||
private static final String STATUS_BAR_CLOCK_STYLE = "status_bar_clock";
|
private static final String STATUS_BAR_CLOCK_STYLE = "status_bar_clock";
|
||||||
|
private static final String KEY_STATUS_BAR_CLOCK_SIZE = "status_bar_clock_size";
|
||||||
|
private static final String PREF_CLOCK_BG = "statusbar_clock_chip";
|
||||||
|
|
||||||
private SecureSettingSwitchPreference mCombinedIcons;
|
private SecureSettingSwitchPreference mCombinedIcons;
|
||||||
private SystemSettingListPreference mStatusBarClock;
|
private SystemSettingListPreference mStatusBarClock;
|
||||||
|
private CustomSeekBarPreference mClockSize;
|
||||||
|
private SwitchPreference mStatusBarClockBG;
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle icicle) {
|
public void onCreate(Bundle icicle) {
|
||||||
super.onCreate(icicle);
|
super.onCreate(icicle);
|
||||||
@@ -66,6 +70,17 @@ public class StatusBarSettings extends SettingsPreferenceFragment implements
|
|||||||
final Context mContext = getActivity().getApplicationContext();
|
final Context mContext = getActivity().getApplicationContext();
|
||||||
final ContentResolver resolver = getActivity().getContentResolver();
|
final ContentResolver resolver = getActivity().getContentResolver();
|
||||||
|
|
||||||
|
mClockSize = (CustomSeekBarPreference) findPreference(KEY_STATUS_BAR_CLOCK_SIZE);
|
||||||
|
int clockSize = Settings.System.getInt(getActivity().getContentResolver(),
|
||||||
|
Settings.System.STATUS_BAR_CLOCK_SIZE, 14);
|
||||||
|
mClockSize.setValue(clockSize / 1);
|
||||||
|
mClockSize.setOnPreferenceChangeListener(this);
|
||||||
|
|
||||||
|
mStatusBarClockBG = (SwitchPreference) findPreference(PREF_CLOCK_BG);
|
||||||
|
mStatusBarClockBG.setChecked((Settings.System.getInt(getActivity()
|
||||||
|
.getContentResolver(), Settings.System.STATUSBAR_CLOCK_CHIP, 1) == 1));
|
||||||
|
mStatusBarClockBG.setOnPreferenceChangeListener(this);
|
||||||
|
|
||||||
mCombinedIcons = (SecureSettingSwitchPreference)
|
mCombinedIcons = (SecureSettingSwitchPreference)
|
||||||
findPreference(COBINED_STATUSBAR_ICONS);
|
findPreference(COBINED_STATUSBAR_ICONS);
|
||||||
Resources sysUIRes = null;
|
Resources sysUIRes = null;
|
||||||
@@ -112,6 +127,16 @@ public class StatusBarSettings extends SettingsPreferenceFragment implements
|
|||||||
boolean enabled = (boolean) objValue;
|
boolean enabled = (boolean) objValue;
|
||||||
Settings.Secure.putInt(resolver,
|
Settings.Secure.putInt(resolver,
|
||||||
COBINED_STATUSBAR_ICONS, enabled ? 1 : 0);
|
COBINED_STATUSBAR_ICONS, enabled ? 1 : 0);
|
||||||
|
return true;
|
||||||
|
} else if (preference == mClockSize) {
|
||||||
|
int width = ((Integer)objValue).intValue();
|
||||||
|
Settings.System.putInt(getActivity().getContentResolver(),
|
||||||
|
Settings.System.STATUS_BAR_CLOCK_SIZE, width);
|
||||||
|
return true;
|
||||||
|
} else if (preference == mStatusBarClockBG) {
|
||||||
|
boolean value = (Boolean) objValue;
|
||||||
|
Settings.System.putInt(getActivity().getContentResolver(),
|
||||||
|
Settings.System.STATUSBAR_CLOCK_CHIP, value ? 1 : 0);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user