Merge "OmniGears: DE translation-update" into android-4.4
diff --git a/src/org/omnirom/omnigears/slim/StatusBarClockStyle.java b/src/org/omnirom/omnigears/slim/StatusBarClockStyle.java
index 73fa586..af73dd4 100644
--- a/src/org/omnirom/omnigears/slim/StatusBarClockStyle.java
+++ b/src/org/omnirom/omnigears/slim/StatusBarClockStyle.java
@@ -184,7 +184,8 @@
if ((String) newValue != null) {
Settings.System.putString(getActivity().getContentResolver(),
Settings.System.STATUSBAR_CLOCK_DATE_FORMAT, (String) newValue);
- mClockDateFormat.setSummary(mClockDateFormat.getEntry());
+ int idx = mClockDateFormat.findIndexOfValue((String) newValue);
+ mClockDateFormat.setSummary(mClockDateFormat.getEntries()[idx]);
}
return true;
}
@@ -198,25 +199,19 @@
parsedDateEntries = new String[dateEntries.length];
Date now = new Date();
- int lastEntry = dateEntries.length - 1;
int dateFormat = Settings.System.getInt(getActivity()
.getContentResolver(), Settings.System.STATUSBAR_CLOCK_DATE_STYLE, 2);
for (int i = 0; i < dateEntries.length; i++) {
- if (i == lastEntry) {
- parsedDateEntries[i] = dateEntries[i];
+ String newDate;
+ CharSequence dateString = DateFormat.format(dateEntries[i], now);
+ if (dateFormat == CLOCK_DATE_STYLE_LOWERCASE) {
+ newDate = dateString.toString().toLowerCase();
+ } else if (dateFormat == CLOCK_DATE_STYLE_UPPERCASE) {
+ newDate = dateString.toString().toUpperCase();
} else {
- String newDate;
- CharSequence dateString = DateFormat.format(dateEntries[i], now);
- if (dateFormat == CLOCK_DATE_STYLE_LOWERCASE) {
- newDate = dateString.toString().toLowerCase();
- } else if (dateFormat == CLOCK_DATE_STYLE_UPPERCASE) {
- newDate = dateString.toString().toUpperCase();
- } else {
- newDate = dateString.toString();
- }
-
- parsedDateEntries[i] = newDate;
+ newDate = dateString.toString();
}
+ parsedDateEntries[i] = newDate;
}
mClockDateFormat.setEntries(parsedDateEntries);
}