Revert"Cherish: Allow customizing footer text [2/2]"
this commit fdc85e21ef.
Signed-off-by: Hưng Phan <phandinhhungvp2001@gmail.com>
This commit is contained in:
@@ -514,11 +514,6 @@
|
||||
<string name="statusbar_icons_style">Colored Statusbar Icons</string>
|
||||
<string name="statusbar_icons_style_summary">Choose the style of your statusbar icons (requires SystemUI restart)</string>
|
||||
|
||||
<!-- QS footer text -->
|
||||
<string name="qs_footer_text_show_title">Show QS footer text</string>
|
||||
<string name="qs_footer_text_string_title">Customize footer text</string>
|
||||
<string name="qs_footer_text_string_summary">Set to empty for default TheKeepLove</string>
|
||||
|
||||
<!-- Notification headers -->
|
||||
<string name="notification_headers_title">Notification Headers</string>
|
||||
<string name="notification_headers_summary">Show headers in the notification shade</string>
|
||||
|
||||
@@ -29,20 +29,6 @@
|
||||
android:summary="@string/qs_date_summary"
|
||||
android:defaultValue="true" />
|
||||
|
||||
<!-- QS footer text toggle -->
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="qs_footer_text_show"
|
||||
android:title="@string/qs_footer_text_show_title"
|
||||
android:defaultValue="false" />
|
||||
|
||||
<!-- QS footer text string -->
|
||||
<com.cherish.settings.preferences.SystemSettingEditTextPreference
|
||||
android:key="qs_footer_text_string"
|
||||
android:title="@string/qs_footer_text_string_title"
|
||||
android:summary="@string/qs_footer_text_string_summary"
|
||||
android:dependency="qs_footer_text_show"
|
||||
android:defaultValue="TheKeepLove" />
|
||||
|
||||
<com.cherish.settings.preferences.SystemSettingSwitchPreference
|
||||
android:key="qs_show_battery_estimate"
|
||||
android:title="@string/qs_show_battery_estimate_title"
|
||||
|
||||
@@ -37,10 +37,6 @@ import java.util.ArrayList;
|
||||
public class QuickSettings extends SettingsPreferenceFragment implements
|
||||
OnPreferenceChangeListener {
|
||||
|
||||
private static final String QS_FOOTER_TEXT_STRING = "qs_footer_text_string";
|
||||
|
||||
private SystemSettingEditTextPreference mFooterString;
|
||||
|
||||
private ListPreference mQuickPulldown;
|
||||
@Override
|
||||
public void onCreate(Bundle icicle) {
|
||||
@@ -57,18 +53,6 @@ public class QuickSettings extends SettingsPreferenceFragment implements
|
||||
mQuickPulldown.setValue(String.valueOf(qpmode));
|
||||
mQuickPulldown.setSummary(mQuickPulldown.getEntry());
|
||||
mQuickPulldown.setOnPreferenceChangeListener(this);
|
||||
|
||||
mFooterString = (SystemSettingEditTextPreference) findPreference(QS_FOOTER_TEXT_STRING);
|
||||
mFooterString.setOnPreferenceChangeListener(this);
|
||||
String footerString = Settings.System.getString(getContentResolver(),
|
||||
QS_FOOTER_TEXT_STRING);
|
||||
if (footerString != null && !footerString.isEmpty())
|
||||
mFooterString.setText(footerString);
|
||||
else {
|
||||
mFooterString.setText("TheKeepLove");
|
||||
Settings.System.putString(getActivity().getContentResolver(),
|
||||
Settings.System.QS_FOOTER_TEXT_STRING, "TheKeepLove");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -82,17 +66,6 @@ public class QuickSettings extends SettingsPreferenceFragment implements
|
||||
int index = mQuickPulldown.findIndexOfValue((String) newValue);
|
||||
mQuickPulldown.setSummary(
|
||||
mQuickPulldown.getEntries()[index]);
|
||||
return true;
|
||||
} else if (preference == mFooterString) {
|
||||
String value = (String) newValue;
|
||||
if (value != "" && !value.isEmpty())
|
||||
Settings.System.putString(getActivity().getContentResolver(),
|
||||
Settings.System.QS_FOOTER_TEXT_STRING, value);
|
||||
else {
|
||||
mFooterString.setText("TheKeepLove");
|
||||
Settings.System.putString(getActivity().getContentResolver(),
|
||||
Settings.System.QS_FOOTER_TEXT_STRING, "TheKeepLove");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user