Cherish: Combined signal icons toggle [2/2]
Signed-off-by: minaripenguin <minaripenguin@users.noreply.github.com> Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
@@ -872,4 +872,8 @@
|
|||||||
<string name="smart_pixels_percent">Percent of pixels to disable</string>
|
<string name="smart_pixels_percent">Percent of pixels to disable</string>
|
||||||
<string name="smart_pixels_shift_title">Burn-in protection</string>
|
<string name="smart_pixels_shift_title">Burn-in protection</string>
|
||||||
<string name="smart_pixels_shift_summary">Prevents burn-in on OLED devices by shifting pixels every so often</string>
|
<string name="smart_pixels_shift_summary">Prevents burn-in on OLED devices by shifting pixels every so often</string>
|
||||||
|
|
||||||
|
<!-- Combined signal icons in status bar -->
|
||||||
|
<string name="combined_status_bar_signal_icons_title">Combined signal icons</string>
|
||||||
|
<string name="combined_status_bar_signal_icons_summary">Enable combined signal icons\n(WARNING: a soft reboot will occur upon enabling combined signal icons)</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|||||||
@@ -78,6 +78,12 @@
|
|||||||
android:summary="@string/data_disabled_icon_summary"
|
android:summary="@string/data_disabled_icon_summary"
|
||||||
android:defaultValue="true" />
|
android:defaultValue="true" />
|
||||||
|
|
||||||
|
<com.cherish.settings.preferences.SystemPropertySwitchPreference
|
||||||
|
android:key="persist.sys.flags.combined_signal_icons"
|
||||||
|
android:title="@string/combined_status_bar_signal_icons_title"
|
||||||
|
android:summary="@string/combined_status_bar_signal_icons_summary"
|
||||||
|
android:defaultValue="false" />
|
||||||
|
|
||||||
<com.cherish.settings.preferences.SystemSettingListPreference
|
<com.cherish.settings.preferences.SystemSettingListPreference
|
||||||
android:key="volte_icon_style"
|
android:key="volte_icon_style"
|
||||||
android:title="@string/volte_icon_style_title"
|
android:title="@string/volte_icon_style_title"
|
||||||
|
|||||||
@@ -50,6 +50,8 @@ public class StatusBarSettings extends SettingsPreferenceFragment implements
|
|||||||
|
|
||||||
private static final String VOLTE_ICON_STYLE = "volte_icon_style";
|
private static final String VOLTE_ICON_STYLE = "volte_icon_style";
|
||||||
private static final String VOWIFI_ICON_STYLE = "vowifi_icon_style";
|
private static final String VOWIFI_ICON_STYLE = "vowifi_icon_style";
|
||||||
|
|
||||||
|
private Preference mCombinedSignalIcons;
|
||||||
|
|
||||||
private SystemSettingListPreference mVolteIconStyle;
|
private SystemSettingListPreference mVolteIconStyle;
|
||||||
private SystemSettingListPreference mVowifiIconStyle;
|
private SystemSettingListPreference mVowifiIconStyle;
|
||||||
@@ -75,6 +77,9 @@ public class StatusBarSettings extends SettingsPreferenceFragment implements
|
|||||||
} else {
|
} else {
|
||||||
mVolteIconStyle.setEnabled(false);
|
mVolteIconStyle.setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mCombinedSignalIcons = findPreference("persist.sys.flags.combined_signal_icons");
|
||||||
|
mCombinedSignalIcons.setOnPreferenceChangeListener(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -91,6 +96,11 @@ public class StatusBarSettings extends SettingsPreferenceFragment implements
|
|||||||
mVolteIconStyle.setEnabled(false);
|
mVolteIconStyle.setEnabled(false);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
|
} else if (preference == mCombinedSignalIcons) {
|
||||||
|
boolean value = (Boolean) newValue;
|
||||||
|
Settings.Secure.putIntForUser(getContentResolver(),
|
||||||
|
Settings.Secure.ENABLE_COMBINED_SIGNAL_ICONS, value ? 1 : 0, UserHandle.USER_CURRENT);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user