Parts: remove battery icon customization
It has been moved to Settings
Change-Id: I1488141e3d6fea864336d495c2b5575f9642ac4d
Signed-off-by: Joey <jbevilacqua@shiftphones.com>
diff --git a/res/values-de/strings.xml b/res/values-de/strings.xml
index 9be56e0..20b0a0a 100644
--- a/res/values-de/strings.xml
+++ b/res/values-de/strings.xml
@@ -104,15 +104,6 @@
<string name="status_bar_am_pm_normal">Standard</string>
<string name="status_bar_am_pm_small">Klein</string>
<string name="status_bar_am_pm_hidden">Ausgeblendet</string>
- <string name="status_bar_battery_title">Akkuanzeige</string>
- <string name="status_bar_battery_style_title">Anzeigeformat</string>
- <string name="status_bar_battery_style_icon_portrait">Symbol (Hochformat)</string>
- <string name="status_bar_battery_style_circle">Kreis</string>
- <string name="status_bar_battery_style_text">Text</string>
- <string name="status_bar_battery_percentage_title">Akkustand in Prozent</string>
- <string name="status_bar_battery_percentage_default">Ausgeblendet</string>
- <string name="status_bar_battery_percentage_text_inside">Innerhalb des Symbols</string>
- <string name="status_bar_battery_percentage_text_next">Neben dem Symbol</string>
<string name="status_bar_brightness_category">Helligkeit</string>
<string name="status_bar_brightness_slider_title">Helligkeitsregler</string>
<string name="status_bar_brightness_slider_summary">Helligkeit in den Schnelleinstellungen anpassen</string>
diff --git a/res/values-it/strings.xml b/res/values-it/strings.xml
index ce9c5a4..6f967d1 100644
--- a/res/values-it/strings.xml
+++ b/res/values-it/strings.xml
@@ -103,15 +103,6 @@
<string name="status_bar_am_pm_normal">Normale</string>
<string name="status_bar_am_pm_small">Piccolo</string>
<string name="status_bar_am_pm_hidden">Nascosto</string>
- <string name="status_bar_battery_title">Indicatore batteria</string>
- <string name="status_bar_battery_style_title">Stile indicatore batteria</string>
- <string name="status_bar_battery_style_icon_portrait">Icona verticale</string>
- <string name="status_bar_battery_style_circle">Cerchio</string>
- <string name="status_bar_battery_style_text">Testo</string>
- <string name="status_bar_battery_percentage_title">Percentuale batteria</string>
- <string name="status_bar_battery_percentage_default">Nascosta</string>
- <string name="status_bar_battery_percentage_text_inside">All\'interno dell\'icona</string>
- <string name="status_bar_battery_percentage_text_next">Accanto all\'icona</string>
<string name="status_bar_brightness_category">Luminosità</string>
<string name="status_bar_brightness_slider_title">Slider della luminosità</string>
<string name="status_bar_brightness_slider_summary">Regola la luminostà dalle impostazioni rapide</string>
diff --git a/res/values/arrays.xml b/res/values/arrays.xml
index 1101f1b..a90fff9 100644
--- a/res/values/arrays.xml
+++ b/res/values/arrays.xml
@@ -146,30 +146,6 @@
<item>2</item>
</string-array>
- <string-array name="status_bar_battery_style_entries" translatable="false">
- <item>@string/status_bar_battery_style_icon_portrait</item>
- <item>@string/status_bar_battery_style_circle</item>
- <item>@string/status_bar_battery_style_text</item>
- </string-array>
-
- <string-array name="status_bar_battery_style_values" translatable="false">
- <item>0</item>
- <item>1</item>
- <item>2</item>
- </string-array>
-
- <string-array name="status_bar_battery_percentage_entries" translatable="false">
- <item>@string/status_bar_battery_percentage_default</item>
- <item>@string/status_bar_battery_percentage_text_inside</item>
- <item>@string/status_bar_battery_percentage_text_next</item>
- </string-array>
-
- <string-array name="status_bar_battery_percentage_values" translatable="false">
- <item>0</item>
- <item>1</item>
- <item>2</item>
- </string-array>
-
<string-array name="status_bar_brightness_slider_entries" translatable="false">
<item>@string/status_bar_brightness_slider_show_never</item>
<item>@string/status_bar_brightness_slider_show_expanded</item>
diff --git a/res/values/strings.xml b/res/values/strings.xml
index bd47737..63934ed 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -131,19 +131,6 @@
<string name="status_bar_am_pm_small">Small</string>
<string name="status_bar_am_pm_hidden">Hidden</string>
- <!-- Status bar - Battery -->
- <string name="status_bar_battery_title">Battery indicator</string>
- <string name="status_bar_battery_style_title">Battery status style</string>
- <string name="status_bar_battery_style_icon_portrait">Icon portrait</string>
- <string name="status_bar_battery_style_circle">Circle</string>
- <string name="status_bar_battery_style_text">Text</string>
-
- <!-- Status bar - Battery percentage -->
- <string name="status_bar_battery_percentage_title">Battery percentage</string>
- <string name="status_bar_battery_percentage_default">Hidden</string>
- <string name="status_bar_battery_percentage_text_inside">Inside the icon</string>
- <string name="status_bar_battery_percentage_text_next">Next to the icon</string>
-
<!-- Status bar - Brightness -->
<string name="status_bar_brightness_category">Brightness</string>
<string name="status_bar_brightness_slider_title">Brightness slider</string>
diff --git a/res/xml/status_bar_settings.xml b/res/xml/status_bar_settings.xml
index 40c225d..a2d7d45 100644
--- a/res/xml/status_bar_settings.xml
+++ b/res/xml/status_bar_settings.xml
@@ -76,32 +76,6 @@
android:defaultValue="2" />
</PreferenceCategory>
- <!--
- <PreferenceCategory
- android:key="status_bar_battery_key"
- android:title="@string/status_bar_battery_title">
-
- <shiftos.preference.ShiftSystemSettingListPreference
- android:key="status_bar_battery_style"
- android:title="@string/status_bar_battery_style_title"
- android:summary="%s"
- android:dialogTitle="@string/status_bar_battery_style_title"
- android:entries="@array/status_bar_battery_style_entries"
- android:entryValues="@array/status_bar_battery_style_values"
- android:defaultValue="0" />
-
- <shiftos.preference.ShiftSystemSettingListPreference
- android:key="status_bar_show_battery_percent"
- android:title="@string/status_bar_battery_percentage_title"
- android:summary="%s"
- android:dialogTitle="@string/status_bar_battery_percentage_title"
- android:entries="@array/status_bar_battery_percentage_entries"
- android:entryValues="@array/status_bar_battery_percentage_values"
- android:defaultValue="0" />
-
- </PreferenceCategory>
- -->
-
<PreferenceCategory
android:title="@string/status_bar_brightness_category">
diff --git a/src/com/shiftos/shiftparts/statusbar/StatusBarSettings.java b/src/com/shiftos/shiftparts/statusbar/StatusBarSettings.java
index e705573..a45ef95 100644
--- a/src/com/shiftos/shiftparts/statusbar/StatusBarSettings.java
+++ b/src/com/shiftos/shiftparts/statusbar/StatusBarSettings.java
@@ -42,18 +42,14 @@
public class StatusBarSettings extends SettingsPreferenceFragment
implements Preference.OnPreferenceChangeListener, Searchable {
- private static final String CATEGORY_BATTERY = "status_bar_battery_key";
private static final String CATEGORY_CLOCK = "status_bar_clock_key";
private static final String ICON_BLACKLIST = "icon_blacklist";
private static final String STATUS_BAR_CLOCK_STYLE = "status_bar_clock";
private static final String STATUS_BAR_AM_PM = "status_bar_am_pm";
- private static final String STATUS_BAR_BATTERY_STYLE = "status_bar_battery_style";
- private static final String STATUS_BAR_SHOW_BATTERY_PERCENT = "status_bar_show_battery_percent";
private static final String STATUS_BAR_QUICK_QS_PULLDOWN = "qs_quick_pulldown";
- private static final int STATUS_BAR_BATTERY_STYLE_TEXT = 2;
private static final int PULLDOWN_DIR_NONE = 0;
private static final int PULLDOWN_DIR_RIGHT = 1;
@@ -64,14 +60,6 @@
private ShiftSystemSettingListPreference mQuickPulldown;
private ShiftSystemSettingListPreference mStatusBarClock;
private ShiftSystemSettingListPreference mStatusBarAmPm;
- /*
- private ShiftSystemSettingListPreference mStatusBarBattery;
- private ShiftSystemSettingListPreference mStatusBarBatteryShowPercent;
- */
-
- /*
- private PreferenceCategory mStatusBarBatteryCategory;
- */
private PreferenceCategory mStatusBarClockCategory;
private PreferenceScreen mNetworkTrafficPref;
@@ -98,18 +86,6 @@
mStatusBarClockCategory =
(PreferenceCategory) getPreferenceScreen().findPreference(CATEGORY_CLOCK);
- /*
- mStatusBarBatteryShowPercent =
- (ShiftSystemSettingListPreference) findPreference(STATUS_BAR_SHOW_BATTERY_PERCENT);
- mStatusBarBattery =
- (ShiftSystemSettingListPreference) findPreference(STATUS_BAR_BATTERY_STYLE);
- mStatusBarBattery.setOnPreferenceChangeListener(this);
- enableStatusBarBatteryDependents(mStatusBarBattery.getIntValue(2));
-
- mStatusBarBatteryCategory =
- (PreferenceCategory) getPreferenceScreen().findPreference(CATEGORY_BATTERY);
- */
-
mQuickPulldown =
(ShiftSystemSettingListPreference) findPreference(STATUS_BAR_QUICK_QS_PULLDOWN);
mQuickPulldown.setOnPreferenceChangeListener(this);
@@ -129,14 +105,6 @@
getPreferenceScreen().addPreference(mStatusBarClockCategory);
}
- /*
- if (TextUtils.delimitedStringContains(curIconBlacklist, ',', "battery")) {
- getPreferenceScreen().removePreference(mStatusBarBatteryCategory);
- } else {
- getPreferenceScreen().addPreference(mStatusBarBatteryCategory);
- }
- */
-
if (DateFormat.is24HourFormat(getActivity())) {
mStatusBarAmPm.setEnabled(false);
mStatusBarAmPm.setSummary(R.string.status_bar_am_pm_info);
@@ -178,21 +146,10 @@
case STATUS_BAR_CLOCK_STYLE:
updateNetworkTrafficStatus(value);
break;
- /*
- case STATUS_BAR_BATTERY_STYLE:
- enableStatusBarBatteryDependents(value);
- break;
- */
}
return true;
}
- /*
- private void enableStatusBarBatteryDependents(int batteryIconStyle) {
- mStatusBarBatteryShowPercent.setEnabled(batteryIconStyle != STATUS_BAR_BATTERY_STYLE_TEXT);
- }
- */
-
private void updateQuickPulldownSummary(int value) {
String summary="";
switch (value) {