summaryrefslogtreecommitdiffstats
path: root/packages/SystemUI
diff options
context:
space:
mode:
authorAdrian Roos <roosa@google.com>2014-04-10 23:43:21 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2014-04-10 23:43:22 +0000
commit58aae511026c7fbc9b863122a349131c5a7659ff (patch)
treef910ef6ba2bd6142a261e54b6631c53ba0da690c /packages/SystemUI
parent55e41ea6dfbf7b96b5e59932e10b09d16c5b45fb (diff)
parent070a0b61cd416b9d54d57bf52ba6583f9b111ee6 (diff)
downloadframeworks_base-58aae511026c7fbc9b863122a349131c5a7659ff.zip
frameworks_base-58aae511026c7fbc9b863122a349131c5a7659ff.tar.gz
frameworks_base-58aae511026c7fbc9b863122a349131c5a7659ff.tar.bz2
Merge "Set a dark theme for SystemUI." into master-lockscreen-dev
Diffstat (limited to 'packages/SystemUI')
-rw-r--r--packages/SystemUI/AndroidManifest.xml6
-rw-r--r--packages/SystemUI/res/values/styles.xml4
-rw-r--r--packages/SystemUI/src/com/android/systemui/SystemUIApplication.java9
3 files changed, 17 insertions, 2 deletions
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index 14cc8ad..d371d70 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -110,7 +110,11 @@
android:label="@string/app_label"
android:icon="@*android:drawable/platlogo"
android:process="com.android.systemui"
- android:supportsRtl="true">
+ android:supportsRtl="true"
+ android:theme="@style/systemui_theme">
+ <!-- Keep theme in sync with SystemUIApplication.onCreate().
+ Setting the theme on the application does not affect views inflated by services.
+ The application theme is set again from onCreate to take effect for those views. -->
<!-- Broadcast receiver that gets the broadcast at boot time and starts
up everything else.
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 76cadd7..c2d584b 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -169,5 +169,7 @@
<!-- Note: must be dp to fit in status bar -->
<item name="android:textSize">14dp</item>
</style>
-
+
+ <style name="systemui_theme" parent="@android:style/Theme.DeviceDefault" />
+
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
index 4494bb7..0f55683 100644
--- a/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
+++ b/packages/SystemUI/src/com/android/systemui/SystemUIApplication.java
@@ -51,6 +51,15 @@ public class SystemUIApplication extends Application {
private boolean mServicesStarted;
private final Map<Class<?>, Object> mComponents = new HashMap<Class<?>, Object>();
+ @Override
+ public void onCreate() {
+ super.onCreate();
+ // Set the application theme that is inherited by all services. Note that setting the
+ // application theme in the manifest does only work for activities. Keep this in sync with
+ // the theme set there.
+ setTheme(R.style.systemui_theme);
+ }
+
/**
* Makes sure that all the SystemUI services are running. If they are already running, this is a
* no-op. This is needed to conditinally start all the services, as we only need to have it in