[2/2] OmniGears: Clock tweaks

PS5:
- added slims clock and date customizations for status bar
PS6:
- Remove color preference
- Refactored code
PS7/8:
- Fixed build
PS9:
- Fixed FC
PS10:
- Display date style & format if it is disabled

Base: https://gerrit.omnirom.org/#/c/4938/

Change-Id: I6d9a1db1717cbe08ed275c8cca21ec2ace7e96c4
diff --git a/res/xml/bars_settings.xml b/res/xml/bars_settings.xml
index 60ae2a6..9b1d78c 100644
--- a/res/xml/bars_settings.xml
+++ b/res/xml/bars_settings.xml
@@ -71,6 +71,11 @@
                 android:summary="@string/qs_configurable_summary"
                 android:persistent="false"/>
 
+        <PreferenceScreen
+                android:fragment="org.omnirom.omnigears.slim.StatusBarClockStyle"
+                android:key="clock_style_pref"
+                android:title="@string/status_bar_clock" />
+
     </PreferenceCategory>
 
     <!-- Navigation bar -->
diff --git a/res/xml/status_bar_clock_style.xml b/res/xml/status_bar_clock_style.xml
new file mode 100644
index 0000000..28f9062
--- /dev/null
+++ b/res/xml/status_bar_clock_style.xml
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (C) 2013 SlimRoms Project
+
+     Licensed under the Apache License, Version 2.0 (the "License");
+     you may not use this file except in compliance with the License.
+     You may obtain a copy of the License at
+
+          http://www.apache.org/licenses/LICENSE-2.0
+
+     Unless required by applicable law or agreed to in writing, software
+     distributed under the License is distributed on an "AS IS" BASIS,
+     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+     See the License for the specific language governing permissions and
+     limitations under the License.
+-->
+
+<PreferenceScreen
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    android:title="@string/status_bar_clock_title">
+
+       <CheckBoxPreference
+            android:key="status_bar_show_clock"
+            android:title="@string/status_bar_show_clock_title"
+            android:defaultValue="true"
+            android:persistent="false"/>
+
+        <ListPreference
+            android:key="clock_style"
+            android:entries="@array/clock_style_entries"
+            android:entryValues="@array/clock_style_values"
+            android:title="@string/clock_title_enable"
+            android:dependency="status_bar_show_clock"
+            android:persistent="false"/>
+
+        <ListPreference
+            android:key="status_bar_am_pm"
+            android:dialogTitle="@string/status_bar_am_pm_title"
+            android:title="@string/status_bar_am_pm_title"
+            android:entries="@array/entries_status_bar_am_pm"
+            android:entryValues="@array/values_status_bar_am_pm"
+            android:dependency="status_bar_show_clock"
+            android:persistent="false"/>
+
+        <ListPreference
+            android:key="clock_date_display"
+            android:title="@string/clock_date_display"
+            android:summary="@string/clock_date_display_summary"
+            android:entries="@array/clock_date_display_entries"
+            android:entryValues="@array/clock_date_display_values"
+            android:dependency="status_bar_show_clock"
+            android:persistent="false"/>
+
+        <ListPreference
+            android:key="clock_date_style"
+            android:title="@string/clock_date_style"
+            android:entries="@array/clock_date_style_entries"
+            android:entryValues="@array/clock_date_style_values"
+            android:dependency="status_bar_show_clock"
+            android:persistent="false"/>
+
+        <ListPreference
+            android:key="clock_date_format"
+            android:title="@string/clock_date_format"
+            android:entries="@array/clock_date_format_entries_values"
+            android:entryValues="@array/clock_date_format_entries_values"
+            android:dependency="status_bar_show_clock"
+            android:persistent="false"/>
+
+</PreferenceScreen>