Skip to content

Commit 38c60c3

Browse files
committed
remove battery percent font size option
Change-Id: I3be3779bd6488b51bdc482e7aa59bd3861e013a8
1 parent 8200dc2 commit 38c60c3

File tree

4 files changed

+0
-58
lines changed

4 files changed

+0
-58
lines changed

apps/SpareParts/res/values/arrays.xml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,4 @@
6565
<item>2</item>
6666
<item>3</item>
6767
</string-array>
68-
69-
<!-- Extra -->
70-
<string-array name="entries_battery_font_size">
71-
<item>Small</item>
72-
<item>Medium</item>
73-
<item>Large</item>
74-
</string-array>
75-
76-
<string-array name="entryvalues_battery_font_size">
77-
<item>10</item>
78-
<item>11</item>
79-
<item>12</item>
80-
</string-array>
81-
<!-- end extra -->
8268
</resources>

apps/SpareParts/res/values/strings.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,6 @@
5656

5757
<string name="title_battery_color">Battery percentage color</string>
5858
<string name="summary_battery_color">Change battery percentage color</string>
59-
60-
<string name="title_battery_font_size">Battery percentage font size</string>
61-
<string name="summary_battery_font_size">Change battery percentage font size</string>
6259
<!-- end extra -->
6360

6461
<string name="title_window_animations">Window animations</string>

apps/SpareParts/res/xml/spare_parts.xml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,6 @@
9090
android:summary="@string/summary_battery_color"
9191
android:defaultValue="-1" />
9292

93-
<ListPreference
94-
android:dependency="battery_percentage"
95-
android:key="battery_fontsize"
96-
android:title="@string/title_battery_font_size"
97-
android:summary="@string/summary_battery_font_size"
98-
android:entries="@array/entries_battery_font_size"
99-
android:entryValues="@array/entryvalues_battery_font_size" />
100-
10193
</PreferenceCategory>
10294
<!-- end -->
10395

apps/SpareParts/src/com/android/spare_parts/SpareParts.java

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ public class SpareParts extends PreferenceActivity
5858
private static final String CLOCK_COLOR_PREF = "clock_color";
5959
private static final String BATTERY_PERCENTAGE_PREF = "battery_percentage";
6060
private static final String BATTERY_COLOR_PREF = "battery_color";
61-
private static final String BATTERY_FONT_SIZE_PREF = "battery_fontsize";
6261
//end extra
6362

6463
private static final String WINDOW_ANIMATIONS_PREF = "window_animations";
@@ -73,7 +72,6 @@ public class SpareParts extends PreferenceActivity
7372
private Preference mClockColorPref;
7473
private CheckBoxPreference mBatteryPercentagePref;
7574
private Preference mBatteryColorPref;
76-
private ListPreference mBatteryFontSizePref;
7775
//end extra
7876

7977
private ListPreference mWindowAnimationsPref;
@@ -132,8 +130,6 @@ public void onCreate(Bundle icicle) {
132130
mClockColorPref = prefSet.findPreference(CLOCK_COLOR_PREF);
133131
mBatteryPercentagePref = (CheckBoxPreference) prefSet.findPreference(BATTERY_PERCENTAGE_PREF);
134132
mBatteryColorPref = prefSet.findPreference(BATTERY_COLOR_PREF);
135-
mBatteryFontSizePref = (ListPreference) prefSet.findPreference(BATTERY_FONT_SIZE_PREF);
136-
mBatteryFontSizePref.setOnPreferenceChangeListener(this);
137133
//end extra
138134

139135
mWindowAnimationsPref = (ListPreference) prefSet.findPreference(WINDOW_ANIMATIONS_PREF);
@@ -184,11 +180,7 @@ public boolean onPreferenceChange(Preference preference, Object objValue) {
184180
writeAnimationPreference(0, objValue);
185181
} else if (preference == mTransitionAnimationsPref) {
186182
writeAnimationPreference(1, objValue);
187-
//extra
188-
} else if (preference == mBatteryFontSizePref) {
189-
writeBatteryFontSizePreference(objValue);
190183
}
191-
//end extra
192184
// always let the preference setting proceed.
193185
return true;
194186
}
@@ -227,17 +219,6 @@ public void writeAnimationPreference(int which, Object objValue) {
227219
}
228220
}
229221

230-
//extra
231-
public void writeBatteryFontSizePreference(Object objValue) {
232-
try {
233-
int val = Integer.parseInt(objValue.toString());
234-
Settings.System.putInt(getContentResolver(),
235-
Settings.System.BATTERY_FONT_SIZE, val);
236-
} catch (NumberFormatException e) {
237-
}
238-
}
239-
//end extra
240-
241222
int floatToIndex(float val, int resid) {
242223
String[] indices = getResources().getStringArray(resid);
243224
float lastVal = Float.parseFloat(indices[0]);
@@ -260,17 +241,6 @@ public void readAnimationPreference(int which, ListPreference pref) {
260241
}
261242
}
262243

263-
//extra
264-
private int readBatteryFontSizePreference(ListPreference pref) {
265-
try {
266-
return Settings.System.getInt(getContentResolver(), Settings.System.BATTERY_FONT_SIZE);
267-
}
268-
catch (SettingNotFoundException e) {
269-
return 12;
270-
}
271-
}
272-
//end extra
273-
274244
//extra
275245
private int readClockFontColor() {
276246
try {
@@ -333,9 +303,6 @@ public void onResume() {
333303
super.onResume();
334304
readAnimationPreference(0, mWindowAnimationsPref);
335305
readAnimationPreference(1, mTransitionAnimationsPref);
336-
//extra
337-
readBatteryFontSizePreference(mBatteryFontSizePref);
338-
//end extra
339306
updateToggles();
340307
}
341308
}

0 commit comments

Comments
 (0)