Merge "omnigears: clean up some of the options text" into android-4.4
diff --git a/res/values/custom_strings.xml b/res/values/custom_strings.xml
index 552b73e..c6027fb 100644
--- a/res/values/custom_strings.xml
+++ b/res/values/custom_strings.xml
@@ -265,4 +265,8 @@
<string name="recent_clear_all_button_location_bottom_left">Bottom left</string>
<string name="recent_clear_all_button_location_bottom_right">Bottom right</string>
+ <string name="notification_drawer_category_title">Notification drawer</string>
+ <string name="custom_statusbar_header_title">Contextual notification panel header</string>
+ <string name="custom_statusbar_header_summary">Sets the background of the notification panel header to an image based on the current date and time</string>
+
</resources>
diff --git a/res/xml/bars_and_menus_settings.xml b/res/xml/bars_and_menus_settings.xml
index 18b5dd2..eef2f61 100644
--- a/res/xml/bars_and_menus_settings.xml
+++ b/res/xml/bars_and_menus_settings.xml
@@ -49,6 +49,18 @@
android:summary="@string/show_activity_indicators_on_status_bar_summary"
android:defaultValue="false" />
+ <!-- Notification drawer -->
+ <PreferenceCategory
+ android:key="category_notification_drawer"
+ android:title="@string/notification_drawer_category_title"/>
+
+ <CheckBoxPreference
+ android:key="custom_status_bar_header"
+ android:title="@string/custom_statusbar_header_title"
+ android:summary="@string/custom_statusbar_header_summary"
+ android:defaultValue="false" />
+
+ <!-- Recents panel -->
<PreferenceCategory
android:key="category_recent_panel"
android:title="@string/bars_and_menus_category_recent_panel_title"/>
diff --git a/src/org/omnirom/omnigears/BarsAndMenusSettings.java b/src/org/omnirom/omnigears/BarsAndMenusSettings.java
index fc40793..e1ea941 100644
--- a/src/org/omnirom/omnigears/BarsAndMenusSettings.java
+++ b/src/org/omnirom/omnigears/BarsAndMenusSettings.java
@@ -57,6 +57,7 @@
private static final String RECENT_MENU_CLEAR_ALL_LOCATION = "recent_menu_clear_all_location";
private static final String STATUS_BAR_NETWORK_ACTIVITY = "status_bar_network_activity";
private static final String POWER_MENU_SCREENSHOT = "power_menu_screenshot";
+ private static final String STATUS_BAR_CUSTOM_HEADER = "custom_status_bar_header";
private CheckBoxPreference mStatusBarBrightnessControl;
private CheckBoxPreference mStatusBarNotifCount;
@@ -65,6 +66,7 @@
private ListPreference mRecentClearAllPosition;
private CheckBoxPreference mStatusBarNetworkActivity;
private CheckBoxPreference mScreenshotPowerMenu;
+ private CheckBoxPreference mStatusBarCustomHeader;
@Override
public void onCreate(Bundle savedInstanceState) {
@@ -110,12 +112,18 @@
mStatusBarNetworkActivity = (CheckBoxPreference) prefSet.findPreference(STATUS_BAR_NETWORK_ACTIVITY);
mStatusBarNetworkActivity.setChecked(Settings.System.getInt(resolver,
Settings.System.STATUS_BAR_NETWORK_ACTIVITY, 0) == 1);
- mStatusBarNetworkActivity.setOnPreferenceChangeListener(this);
+ mStatusBarNetworkActivity.setOnPreferenceChangeListener(this);
mScreenshotPowerMenu = (CheckBoxPreference) prefSet.findPreference(POWER_MENU_SCREENSHOT);
mScreenshotPowerMenu.setChecked(Settings.System.getInt(resolver,
Settings.System.SCREENSHOT_IN_POWER_MENU, 0) == 1);
mScreenshotPowerMenu.setOnPreferenceChangeListener(this);
+ mStatusBarNetworkActivity.setOnPreferenceChangeListener(this);
+
+ mStatusBarCustomHeader = (CheckBoxPreference) prefSet.findPreference(STATUS_BAR_CUSTOM_HEADER);
+ mStatusBarCustomHeader.setChecked(Settings.System.getInt(resolver,
+ Settings.System.STATUS_BAR_CUSTOM_HEADER, 0) == 1);
+ mStatusBarCustomHeader.setOnPreferenceChangeListener(this);
}
@Override
@@ -148,6 +156,10 @@
} else if (preference == mScreenshotPowerMenu) {
boolean value = (Boolean) objValue;
Settings.System.putInt(resolver, Settings.System.SCREENSHOT_IN_POWER_MENU, value ? 1 : 0);
+ } else if (preference == mStatusBarCustomHeader) {
+ boolean value = (Boolean) objValue;
+ Settings.System.putInt(resolver,
+ Settings.System.STATUS_BAR_CUSTOM_HEADER, value ? 1 : 0);
} else {
return false;
}