diff options
| author | takuo <kitame@gmail.com> | 2010-05-25 14:41:42 +0900 |
|---|---|---|
| committer | takuo <kitame@gmail.com> | 2010-05-25 14:41:42 +0900 |
| commit | 66ae61f534570046325824db3d9fcb31a1f3612c (patch) | |
| tree | bb8134c38b776d22ff7041510e2430776ea397bd | |
| parent | 4c4b1e85a6b5ee2d7def439a94b8ea3b687b3bdf (diff) | |
| parent | ce936e351ce5a2eb7445ab02d9b8c3e5da4ff3bb (diff) | |
| download | android_development-66ae61f534570046325824db3d9fcb31a1f3612c.tar.gz android_development-66ae61f534570046325824db3d9fcb31a1f3612c.tar.bz2 android_development-66ae61f534570046325824db3d9fcb31a1f3612c.zip | |
Merge remote branch 'cyanogen/eclair' into eclair
| -rw-r--r-- | apps/SpareParts/res/values/strings.xml | 32 | ||||
| -rw-r--r-- | apps/SpareParts/res/xml/spare_parts.xml | 42 | ||||
| -rw-r--r-- | apps/SpareParts/src/com/android/spare_parts/SpareParts.java | 25 |
3 files changed, 56 insertions, 43 deletions
diff --git a/apps/SpareParts/res/values/strings.xml b/apps/SpareParts/res/values/strings.xml index 6f89e91cc..ae0fae958 100644 --- a/apps/SpareParts/res/values/strings.xml +++ b/apps/SpareParts/res/values/strings.xml @@ -87,26 +87,28 @@ <!-- Sound & display settings screen, compatibility mode option summary text when check box is clear --> <string name="compatibility_mode_summary_off">Run older apps in Compatibility mode. This require rebooting. </string> - <string name="title_ui_tweaks">User interface color tweaks</string> + <string name="title_ui_tweaks">User interface tweaks</string> <string name="title_general_color_tweaks">General</string> - <string name="summary_general_color_tweaks">Clock, date, carrier, etc.</string> - <string name="title_clock_color">Clock</string> - <string name="title_date_color">Date</string> - <string name="title_spn_label_color">Carrier SPN label</string> - <string name="title_plmn_label_color">Carrier PLMN label</string> + <string name="summary_general_color_tweaks">Clock, date, battery, carrier, etc.</string> + + <string name="title_show_clock">Show clock</string> + <string name="title_clock_color">Clock color</string> + <string name="title_date_color">Date color</string> + <string name="title_spn_label_color">Carrier SPN label color</string> + <string name="title_plmn_label_color">Carrier PLMN label color</string> <string name="title_notifications_color_tweaks">Notifications</string> <string name="summary_notifications_color_tweaks">Notifications ticker, ongoing notifications, latest notifications, clear notifications, etc.</string> - <string name="title_notifications_ticker_color">Notifications ticker</string> - <string name="title_no_notifications_color">No notification title</string> - <string name="title_clear_button_label_color">Clear notifications label</string> - <string name="title_ongoing_notifications_color">Ongoing notifications title</string> - <string name="title_latest_notifications_color">Latest notifications title</string> - <string name="title_notifications_items">Notification items</string> - <string name="title_notifications_items_title">Items title</string> - <string name="title_notifications_items_text">Items text</string> - <string name="title_notifications_items_time">Items time</string> + <string name="title_notifications_ticker_color">Notifications ticker color</string> + <string name="title_no_notifications_color">No notification title color</string> + <string name="title_clear_button_label_color">Clear notifications label color</string> + <string name="title_ongoing_notifications_color">Ongoing notifications title color</string> + <string name="title_latest_notifications_color">Latest notifications title color</string> + <string name="title_notifications_items">Notification items colors</string> + <string name="title_notifications_items_title">Items title color</string> + <string name="title_notifications_items_text">Items text color</string> + <string name="title_notifications_items_time">Items time color</string> <string name="dialog_title_color">Select a color</string> diff --git a/apps/SpareParts/res/xml/spare_parts.xml b/apps/SpareParts/res/xml/spare_parts.xml index b376e194d..c146cdb22 100644 --- a/apps/SpareParts/res/xml/spare_parts.xml +++ b/apps/SpareParts/res/xml/spare_parts.xml @@ -100,23 +100,6 @@ android:title="@string/compatibility_mode_title" android:summaryOn="@string/compatibility_mode_summary_on" android:summaryOff="@string/compatibility_mode_summary_off" /> - - <CheckBoxPreference - android:key="battery_status" - android:title="@string/battery_status_title" - android:summaryOn="@string/battery_status_summary_on" - android:summaryOff="@string/battery_status_summary_off" - android:disableDependentsState="false" /> - - <!-- - <ListPreference - android:key="battery_status_color_title" - android:title="@string/battery_status_color_title" - android:dialogTitle="@string/dialog_title_color" - android:entries="@array/colors" - android:entryValues="@array/colors_values" - android:dependency="battery_status" /> - --> <CheckBoxPreference android:key="compcache_enabled" @@ -155,14 +138,35 @@ <PreferenceScreen android:title="@string/title_general_color_tweaks" - android:summary="@string/summary_general_color_tweaks"> + android:summary="@string/summary_general_color_tweaks"> + + <CheckBoxPreference + android:key="battery_status" + android:title="@string/battery_status_title" + android:summaryOn="@string/battery_status_summary_on" + android:summaryOff="@string/battery_status_summary_off" + android:disableDependentsState="false" /> + + <ListPreference + android:key="battery_status_color_title" + android:title="@string/battery_status_color_title" + android:dialogTitle="@string/dialog_title_color" + android:entries="@array/colors" + android:entryValues="@array/colors_values" + android:dependency="battery_status" /> + + <CheckBoxPreference + android:key="show_status_clock" + android:title="@string/title_show_clock" + android:disableDependentsState="false" /> <ListPreference android:key="clock_color" android:title="@string/title_clock_color" android:dialogTitle="@string/dialog_title_color" android:entries="@array/colors" - android:entryValues="@array/colors_values" /> + android:entryValues="@array/colors_values" + android:dependency="show_status_clock" /> <ListPreference android:key="date_color" diff --git a/apps/SpareParts/src/com/android/spare_parts/SpareParts.java b/apps/SpareParts/src/com/android/spare_parts/SpareParts.java index bc91cbfd8..b0d437ce9 100644 --- a/apps/SpareParts/src/com/android/spare_parts/SpareParts.java +++ b/apps/SpareParts/src/com/android/spare_parts/SpareParts.java @@ -63,6 +63,7 @@ public class SpareParts extends PreferenceActivity //Wysie_Soh private static final String RECENT_APPS_NUM_PREF = "recent_apps_num"; + private static final String UI_SHOW_STATUS_CLOCK = "show_status_clock"; private static final String UI_CLOCK_COLOR = "clock_color"; private static final String UI_DATE_COLOR = "date_color"; private static final String UI_NO_NOTIF_COLOR = "no_notifications_color"; @@ -71,7 +72,7 @@ public class SpareParts extends PreferenceActivity private static final String UI_SPN_LABEL_COLOR = "spn_label_color"; private static final String UI_PLMN_LABEL_COLOR = "plmn_label_color"; private static final String UI_CLEAR_LABEL_COLOR = "clear_button_label_color"; - //private static final String UI_BATTERY_PERCENT_COLOR = "battery_status_color_title"; + private static final String UI_BATTERY_PERCENT_COLOR = "battery_status_color_title"; private static final String UI_NOTIF_TICKER_COLOR = "new_notifications_ticker_color"; private static final String UI_NOTIF_ITEM_TITLE_COLOR = "notifications_title_color"; private static final String UI_NOTIF_ITEM_TEXT_COLOR = "notifications_text_color"; @@ -90,7 +91,7 @@ public class SpareParts extends PreferenceActivity private ListPreference mPlmnLabelColorPref; private ListPreference mClearLabelColorPref; private ListPreference mNotifTickerColor; - //private ListPreference mBatteryPercentColorPreference; + private ListPreference mBatteryPercentColorPreference; private ListPreference mNotifItemTitlePref; private ListPreference mNotifItemTextPref; private ListPreference mNotifItemTimePref; @@ -106,6 +107,7 @@ public class SpareParts extends PreferenceActivity private CheckBoxPreference mLauncherColumnPref; private CheckBoxPreference mBatteryStatusPref; private CheckBoxPreference mCompcachePref; + private CheckBoxPreference mShowClockPref; private IWindowManager mWindowManager; @@ -174,7 +176,8 @@ public class SpareParts extends PreferenceActivity mLauncherOrientationPref = (CheckBoxPreference) prefSet.findPreference(LAUNCHER_ORIENTATION_PREF); mLauncherColumnPref = (CheckBoxPreference) prefSet.findPreference(LAUNCHER_COLUMN_PREF); mBatteryStatusPref = (CheckBoxPreference) prefSet.findPreference(BATTERY_STATUS_PREF); - mCompcachePref = (CheckBoxPreference) prefSet.findPreference(COMPCACHE_PREF); + mCompcachePref = (CheckBoxPreference) prefSet.findPreference(COMPCACHE_PREF); + mShowClockPref = (CheckBoxPreference) prefSet.findPreference(UI_SHOW_STATUS_CLOCK); mClockColorPref = (ListPreference) prefSet.findPreference(UI_CLOCK_COLOR); mClockColorPref.setOnPreferenceChangeListener(this); mDateColorPref = (ListPreference) prefSet.findPreference(UI_DATE_COLOR); @@ -191,8 +194,8 @@ public class SpareParts extends PreferenceActivity mPlmnLabelColorPref.setOnPreferenceChangeListener(this); mClearLabelColorPref = (ListPreference) prefSet.findPreference(UI_CLEAR_LABEL_COLOR); mClearLabelColorPref.setOnPreferenceChangeListener(this); - //mBatteryPercentColorPreference = (ListPreference) prefSet.findPreference(UI_BATTERY_PERCENT_COLOR); - //mBatteryPercentColorPreference.setOnPreferenceChangeListener(this); + mBatteryPercentColorPreference = (ListPreference) prefSet.findPreference(UI_BATTERY_PERCENT_COLOR); + mBatteryPercentColorPreference.setOnPreferenceChangeListener(this); mNotifTickerColor = (ListPreference) prefSet.findPreference(UI_NOTIF_TICKER_COLOR); mNotifTickerColor.setOnPreferenceChangeListener(this); mNotifItemTitlePref = (ListPreference) prefSet.findPreference(UI_NOTIF_ITEM_TITLE_COLOR); @@ -246,6 +249,9 @@ public class SpareParts extends PreferenceActivity mCompcachePref.setChecked(Settings.Secure.getInt( getContentResolver(), Settings.Secure.COMPCACHE_ENABLED, 0) != 0); + mShowClockPref.setChecked(Settings.System.getInt( + getContentResolver(), + Settings.System.SHOW_STATUS_CLOCK, 0) != 0); } public boolean onPreferenceChange(Preference preference, Object objValue) { @@ -273,8 +279,8 @@ public class SpareParts extends PreferenceActivity writePlmnLabelColorPreference(objValue); } else if (preference == mClearLabelColorPref) { writeClearLabelColorPreference(objValue); - //} else if (preference == mBatteryPercentColorPreference) { - // writeBatteryPercentColorPreference(objValue); + } else if (preference == mBatteryPercentColorPreference) { + writeBatteryPercentColorPreference(objValue); } else if (preference == mNotifTickerColor) { writeTickerNotifColorPreference(objValue); } else if (preference == mNotifItemTitlePref) { @@ -327,7 +333,6 @@ public class SpareParts extends PreferenceActivity } } - /* public void writeBatteryPercentColorPreference(Object objValue) { try { int val = Integer.parseInt(objValue.toString()); @@ -336,7 +341,6 @@ public class SpareParts extends PreferenceActivity } catch (NumberFormatException e) { } } - */ public void writeClockColorPreference(Object objValue) { try { @@ -514,6 +518,9 @@ public class SpareParts extends PreferenceActivity } else if (COMPCACHE_PREF.equals(key)) { Settings.Secure.putInt(getContentResolver(), Settings.Secure.COMPCACHE_ENABLED, mCompcachePref.isChecked() ? 1 : 0); + } else if (UI_SHOW_STATUS_CLOCK.equals(key)) { + Settings.System.putInt(getContentResolver(), Settings.System.SHOW_STATUS_CLOCK, + mShowClockPref.isChecked() ? 1 : 0); } } |
