summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_no_sims.xml2
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_signal_0.xml6
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_signal_0_fully.xml2
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_signal_1.xml8
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_signal_1_fully.xml4
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_signal_2.xml8
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_signal_2_fully.xml4
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_signal_3.xml8
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_signal_3_fully.xml4
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_signal_4.xml7
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_signal_4_fully.xml2
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_signal_null.xml2
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml6
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_wifi_signal_0_fully.xml2
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml8
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_wifi_signal_1_fully.xml4
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml8
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_wifi_signal_2_fully.xml4
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml8
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_wifi_signal_3_fully.xml4
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml6
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_wifi_signal_4_fully.xml2
-rw-r--r--packages/SystemUI/res/drawable/stat_sys_wifi_signal_null.xml2
-rw-r--r--packages/SystemUI/res/layout/mobile_signal_group.xml10
-rw-r--r--packages/SystemUI/res/layout/signal_cluster_view.xml33
-rw-r--r--packages/SystemUI/res/values/attrs.xml10
-rw-r--r--packages/SystemUI/res/values/colors.xml9
-rw-r--r--packages/SystemUI/res/values/styles.xml11
-rwxr-xr-xpackages/SystemUI/src/com/android/systemui/BatteryMeterView.java40
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java33
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java8
-rw-r--r--packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java49
32 files changed, 210 insertions, 104 deletions
diff --git a/packages/SystemUI/res/drawable/stat_sys_no_sims.xml b/packages/SystemUI/res/drawable/stat_sys_no_sims.xml
index 8bad226..2229c99 100644
--- a/packages/SystemUI/res/drawable/stat_sys_no_sims.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_no_sims.xml
@@ -20,6 +20,6 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="?attr/backgroundColor"
android:pathData="M19.0,5.0c0.0,-1.1 -0.9,-2.0 -2.0,-2.0l-7.0,0.0L7.7,5.3L19.0,16.7L19.0,5.0zM3.7,3.9L2.4,5.2L5.0,7.8L5.0,19.0c0.0,1.1 0.9,2.0 2.0,2.0l10.0,0.0c0.4,0.0 0.7,-0.1 1.0,-0.3l1.9,1.9l1.3,-1.3L3.7,3.9z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_0.xml b/packages/SystemUI/res/drawable/stat_sys_signal_0.xml
index e1e81fd..643c4f9 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_0.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_0.xml
@@ -20,12 +20,12 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/singleToneColor"
android:pathData="M19.700001,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/singleToneColor"
android:pathData="M19.700001,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/>
<path
android:pathData="M17.700001,8.000000l4.299999,0.000000 0.000000,-6.000000 -20.000000,20.000000 15.700001,0.000000z"
- android:fillColor="#4DFFFFFF"/>
+ android:fillColor="?attr/backgroundColor"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_0_fully.xml b/packages/SystemUI/res/drawable/stat_sys_signal_0_fully.xml
index c0dfcf4..e267d25 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_0_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_0_fully.xml
@@ -20,6 +20,6 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="?attr/backgroundColor"
android:pathData="M2.000000,22.000000l20.000000,0.000000 0.000000,-20.000000z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_1.xml b/packages/SystemUI/res/drawable/stat_sys_signal_1.xml
index d1124ee..64781c3 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_1.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_1.xml
@@ -20,15 +20,15 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/singleToneColor"
android:pathData="M19.7,20.0l2.0,0.0l0.0,2.0l-2.0,0.0z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/singleToneColor"
android:pathData="M19.7,10.0l2.0,0.0l0.0,8.1l-2.0,0.0z"/>
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="?attr/backgroundColor"
android:pathData="M17.7,8.0l4.299999,0.0 0.0,-6.0 -20.0,20.0 15.700001,0.0z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M10.1,13.9l-8.1,8.1 8.1,0.0z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_1_fully.xml b/packages/SystemUI/res/drawable/stat_sys_signal_1_fully.xml
index 29eda94..60822f4 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_1_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_1_fully.xml
@@ -20,9 +20,9 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="?attr/backgroundColor"
android:pathData="M2.0,22.0l20.0,0.0 0.0,-20.0z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M10.1,13.9l-8.1,8.1 8.1,0.0z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_2.xml b/packages/SystemUI/res/drawable/stat_sys_signal_2.xml
index 537c788..eb2be08 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_2.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_2.xml
@@ -20,15 +20,15 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/singleToneColor"
android:pathData="M19.700001,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/singleToneColor"
android:pathData="M19.700001,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M13.900000,10.000000l-11.900000,12.000000 11.900000,0.000000z"/>
<path
android:pathData="M17.700001,8.000000l4.299999,0.000000 0.000000,-6.000000 -20.000000,20.000000 15.700001,0.000000z"
- android:fillColor="#4DFFFFFF"/>
+ android:fillColor="?attr/backgroundColor"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_2_fully.xml b/packages/SystemUI/res/drawable/stat_sys_signal_2_fully.xml
index 7d9376e..5e68eed 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_2_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_2_fully.xml
@@ -20,9 +20,9 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="?attr/backgroundColor"
android:pathData="M2.000000,22.000000l20.000000,0.000000 0.000000,-20.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M14.000000,10.000000l-12.000000,12.000000 12.000000,0.000000z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_3.xml b/packages/SystemUI/res/drawable/stat_sys_signal_3.xml
index 09fe33a..22afad0 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_3.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_3.xml
@@ -20,15 +20,15 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/singleToneColor"
android:pathData="M19.700001,19.900000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/singleToneColor"
android:pathData="M19.700001,9.900000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M16.700001,7.200000l-14.700001,14.700000 14.700001,0.000000z"/>
<path
android:pathData="M17.700001,7.900000l4.299999,0.000000 0.000000,-6.000000 -20.000000,20.000000 15.700001,0.000000z"
- android:fillColor="#4DFFFFFF"/>
+ android:fillColor="?attr/backgroundColor"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_3_fully.xml b/packages/SystemUI/res/drawable/stat_sys_signal_3_fully.xml
index 8ec5500..599b34a 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_3_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_3_fully.xml
@@ -20,9 +20,9 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="?attr/backgroundColor"
android:pathData="M2.000000,22.000000l20.000000,0.000000 0.000000,-20.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M16.700001,7.300000l-14.700001,14.700000 14.700001,0.000000z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_4.xml b/packages/SystemUI/res/drawable/stat_sys_signal_4.xml
index bb98541..d1e866d 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_4.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_4.xml
@@ -19,13 +19,14 @@ Copyright (C) 2014 The Android Open Source Project
android:height="17dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
+
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/singleToneColor"
android:pathData="M19.700001,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/singleToneColor"
android:pathData="M19.700001,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/singleToneColor"
android:pathData="M2.000000,22.000000l15.700001,0.000000 0.000000,-14.000000 4.299999,0.000000 0.000000,-6.000000z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_4_fully.xml b/packages/SystemUI/res/drawable/stat_sys_signal_4_fully.xml
index a468410..b66d89a 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_4_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_4_fully.xml
@@ -20,6 +20,6 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/singleToneColor"
android:pathData="M2.000000,22.000000l20.000000,0.000000 0.000000,-20.000000z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_signal_null.xml b/packages/SystemUI/res/drawable/stat_sys_signal_null.xml
index d25fc1c..2b487f9 100644
--- a/packages/SystemUI/res/drawable/stat_sys_signal_null.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_signal_null.xml
@@ -20,6 +20,6 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="?attr/backgroundColor"
android:pathData="M2.000000,22.000000l20.000000,0.000000L22.000000,2.000000L2.000000,22.000000zM20.000000,20.000000L6.800000,20.000000L20.000000,6.800000L20.000000,20.000000z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml
index be930e8..7f1b715 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml
@@ -19,12 +19,12 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="?attr/backgroundColor"
android:pathData="M19.000000,8.000000l5.300000,0.000000l1.200000,-1.500000C25.100000,6.100000 20.299999,2.100000 13.000000,2.100000S0.900000,6.100000 0.400000,6.500000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,8.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M21.000000,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M21.000000,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0_fully.xml
index b2691f6..60f7eb6 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0_fully.xml
@@ -19,6 +19,6 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="?attr/backgroundColor"
android:pathData="M13.000000,22.000000L25.600000,6.500000C25.100000,6.100000 20.299999,2.100000 13.000000,2.100000S0.900000,6.100000 0.400000,6.500000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml
index dde781d..acd89be 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml
@@ -19,15 +19,15 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="?attr/backgroundColor"
android:pathData="M19.000000,8.000000l5.300000,0.000000l1.300000,-1.600000C25.100000,6.000000 20.299999,2.000000 13.000000,2.000000S0.900000,6.000000 0.400000,6.400000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,8.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M13.000000,22.000000l5.500000,-6.800000c-0.200000,-0.200000 -2.300000,-1.900000 -5.500000,-1.900000s-5.300000,1.800000 -5.500000,1.900000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M21.000000,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M21.000000,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1_fully.xml
index 65931f4..554350d 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1_fully.xml
@@ -19,9 +19,9 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="?attr/backgroundColor"
android:pathData="M13.100000,22.000000L25.600000,6.500000C25.100000,6.100000 20.299999,2.100000 13.000000,2.100000S0.900000,6.100000 0.500000,6.500000L13.100000,22.000000L13.100000,22.000000L13.100000,22.000000L13.100000,22.000000L13.100000,22.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M13.100000,22.000000l5.500000,-6.800000c-0.200000,-0.200000 -2.300000,-1.900000 -5.500000,-1.900000s-5.300000,1.800000 -5.500000,1.900000L13.100000,22.000000L13.100000,22.000000L13.100000,22.000000L13.100000,22.000000L13.100000,22.000000z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml
index 63d9dca..f33b25c 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml
@@ -19,15 +19,15 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="?attr/backgroundColor"
android:pathData="M19.000000,8.000000l5.300000,0.000000l1.300000,-1.600000C25.100000,6.000000 20.299999,2.000000 13.000000,2.000000S0.900000,6.000000 0.400000,6.400000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,8.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M19.000000,11.600000c-1.300000,-0.700000 -3.400000,-1.600000 -6.000000,-1.600000c-4.400000,0.000000 -7.300000,2.400000 -7.600000,2.700000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,11.600000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M21.000000,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M21.000000,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2_fully.xml
index 7ba4895..2c2465a 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2_fully.xml
@@ -19,9 +19,9 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="?attr/backgroundColor"
android:pathData="M13.000000,22.000000L25.600000,6.500000C25.100000,6.100000 20.299999,2.100000 13.000000,2.100000S0.900000,6.100000 0.400000,6.500000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M13.000000,22.000000l7.600000,-9.400000C20.299999,12.400000 17.400000,10.000000 13.000000,10.000000s-7.300000,2.400000 -7.600000,2.700000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml
index 7d393b4..09d2e50 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml
@@ -19,15 +19,15 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="?attr/backgroundColor"
android:pathData="M19.000000,8.000000l5.300000,0.000000l1.300000,-1.600000C25.100000,6.000000 20.299999,2.000000 13.000000,2.000000S0.900000,6.000000 0.400000,6.400000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,8.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M19.000000,8.600000c-1.600000,-0.700000 -3.600000,-1.300000 -6.000000,-1.300000c-5.300000,0.000000 -8.900000,3.000000 -9.200000,3.200000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,8.600000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M21.000000,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M21.000000,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3_fully.xml
index e2cde53..7d0f756 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3_fully.xml
@@ -19,9 +19,9 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="?attr/backgroundColor"
android:pathData="M13.000000,22.000000L25.600000,6.500000C25.100000,6.100000 20.299999,2.100000 13.000000,2.100000S0.900000,6.100000 0.400000,6.500000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/fillColor"
android:pathData="M13.000000,22.000000l9.200000,-11.400000c-0.400000,-0.300000 -3.900000,-3.200000 -9.200000,-3.200000s-8.900000,3.000000 -9.200000,3.200000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml
index ec8137f..fb1f584 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml
@@ -19,12 +19,12 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/singleToneColor"
android:pathData="M19.000000,8.000000l5.300000,0.000000l1.300000,-1.600000C25.100000,6.000000 20.299999,2.000000 13.000000,2.000000S0.900000,6.000000 0.400000,6.400000L13.000000,22.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l0.000000,0.000000l6.000000,-7.400000L19.000000,8.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/singleToneColor"
android:pathData="M21.000000,20.000000l2.000000,0.000000l0.000000,2.000000l-2.000000,0.000000z"/>
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/singleToneColor"
android:pathData="M21.000000,10.000000l2.000000,0.000000l0.000000,8.100000l-2.000000,0.000000z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4_fully.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4_fully.xml
index 9d02980..a7e213f 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4_fully.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4_fully.xml
@@ -19,6 +19,6 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#FFFFFFFF"
+ android:fillColor="?attr/singleToneColor"
android:pathData="M13.000000,22.000000L25.600000,6.500000C25.100000,6.100000 20.299999,2.100000 13.000000,2.100000S0.900000,6.100000 0.400000,6.500000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000L13.000000,22.000000z"/>
</vector>
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_null.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_null.xml
index 95c6531..5169de4 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_null.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_null.xml
@@ -19,6 +19,6 @@ Copyright (C) 2014 The Android Open Source Project
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
- android:fillColor="#4DFFFFFF"
+ android:fillColor="?attr/backgroundColor"
android:pathData="M13.000000,2.000000C7.700000,2.000000 3.700000,3.900000 0.400000,6.400000L13.000000,22.000000L25.600000,6.500000C22.299999,4.000000 18.299999,2.000000 13.000000,2.000000zM13.000000,18.600000L3.300000,7.000000l0.000000,0.000000l0.000000,0.000000C6.000000,5.300000 8.700000,4.000000 13.000000,4.000000s7.000000,1.400000 9.700000,3.000000l0.000000,0.000000l0.000000,0.000000L13.000000,18.600000z"/>
</vector>
diff --git a/packages/SystemUI/res/layout/mobile_signal_group.xml b/packages/SystemUI/res/layout/mobile_signal_group.xml
index 97697189..6a4ac2c 100644
--- a/packages/SystemUI/res/layout/mobile_signal_group.xml
+++ b/packages/SystemUI/res/layout/mobile_signal_group.xml
@@ -23,11 +23,19 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
>
- <ImageView
+ <com.android.systemui.statusbar.AlphaOptimizedImageView
+ android:theme="@style/DualToneLightTheme"
android:id="@+id/mobile_signal"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
/>
+ <com.android.systemui.statusbar.AlphaOptimizedImageView
+ android:theme="@style/DualToneDarkTheme"
+ android:id="@+id/mobile_signal_dark"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:alpha="0.0"
+ />
<ImageView
android:id="@+id/mobile_type"
android:layout_height="wrap_content"
diff --git a/packages/SystemUI/res/layout/signal_cluster_view.xml b/packages/SystemUI/res/layout/signal_cluster_view.xml
index 8fbd8f7..c9edef8 100644
--- a/packages/SystemUI/res/layout/signal_cluster_view.xml
+++ b/packages/SystemUI/res/layout/signal_cluster_view.xml
@@ -38,11 +38,19 @@
android:layout_height="wrap_content"
android:layout_width="wrap_content"
>
- <ImageView
+ <com.android.systemui.statusbar.AlphaOptimizedImageView
+ android:theme="@style/DualToneLightTheme"
android:id="@+id/wifi_signal"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
/>
+ <com.android.systemui.statusbar.AlphaOptimizedImageView
+ android:theme="@style/DualToneDarkTheme"
+ android:id="@+id/wifi_signal_dark"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:alpha="0.0"
+ />
</FrameLayout>
<View
android:id="@+id/wifi_signal_spacer"
@@ -56,12 +64,25 @@
android:layout_width="wrap_content"
>
</LinearLayout>
- <ImageView
- android:id="@+id/no_sims"
+ <FrameLayout
android:layout_height="wrap_content"
- android:layout_width="wrap_content"
- android:src="@drawable/stat_sys_no_sims"
- />
+ android:layout_width="wrap_content">
+ <com.android.systemui.statusbar.AlphaOptimizedImageView
+ android:theme="@style/DualToneLightTheme"
+ android:id="@+id/no_sims"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:src="@drawable/stat_sys_no_sims"
+ />
+ <com.android.systemui.statusbar.AlphaOptimizedImageView
+ android:theme="@style/DualToneDarkTheme"
+ android:id="@+id/no_sims_dark"
+ android:layout_height="wrap_content"
+ android:layout_width="wrap_content"
+ android:src="@drawable/stat_sys_no_sims"
+ android:alpha="0.0"
+ />
+ </FrameLayout>
<View
android:id="@+id/wifi_airplane_spacer"
android:layout_width="4dp"
diff --git a/packages/SystemUI/res/values/attrs.xml b/packages/SystemUI/res/values/attrs.xml
index 6ecdca3..24f92ef 100644
--- a/packages/SystemUI/res/values/attrs.xml
+++ b/packages/SystemUI/res/values/attrs.xml
@@ -72,5 +72,15 @@
<attr name="verticalSpacing" format="dimension" />
<attr name="horizontalSpacing" format="dimension" />
</declare-styleable>
+
+ <!-- Theme for icons in the status bar (light/dark). background/fillColor is used for dual tone
+ icons like wifi and signal, and singleToneColor is used for icons with only one tone.
+ Contract: Pixel with fillColor blended over backgroundColor blended over translucent should
+ equal to singleToneColor blended over translucent. -->
+ <declare-styleable name="TonedIcon">
+ <attr name="backgroundColor" format="integer" />
+ <attr name="fillColor" format="integer" />
+ <attr name="singleToneColor" format="integer" />
+ </declare-styleable>
</resources>
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index d4aeab6..b319344 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -130,5 +130,12 @@
<color name="segmented_button_selected">#FFFFFFFF</color>
<color name="segmented_button_unselected">#B3B0BEC5</color><!-- 70% blue grey 200 -->
<color name="volume_panel_divider">#1FFFFFFF</color><!-- 12% white -->
- <color name="light_mode_icon_color">#FF616161</color><!-- grey 700 -->
+
+ <color name="dark_mode_icon_color_single_tone">#99000000</color>
+ <color name="dark_mode_icon_color_dual_tone_background">#3d000000</color>
+ <color name="dark_mode_icon_color_dual_tone_fill">#7a000000</color>
+
+ <color name="light_mode_icon_color_single_tone">#ffffff</color>
+ <color name="light_mode_icon_color_dual_tone_background">#4dffffff</color>
+ <color name="light_mode_icon_color_dual_tone_fill">#ffffff</color>
</resources>
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 07fcb82..83dceae 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -265,4 +265,15 @@
<item name="android:backgroundDimEnabled">false</item>
<item name="android:alertDialogTheme">@style/Theme.SystemUI.Dialog.Alert</item>
</style>
+
+ <style name="DualToneLightTheme">
+ <item name="backgroundColor">@color/light_mode_icon_color_dual_tone_background</item>
+ <item name="fillColor">@color/light_mode_icon_color_dual_tone_fill</item>
+ <item name="singleToneColor">@color/light_mode_icon_color_single_tone</item>
+ </style>
+ <style name="DualToneDarkTheme">
+ <item name="backgroundColor">@color/dark_mode_icon_color_dual_tone_background</item>
+ <item name="fillColor">@color/dark_mode_icon_color_dual_tone_fill</item>
+ <item name="singleToneColor">@color/dark_mode_icon_color_single_tone</item>
+ </style>
</resources>
diff --git a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
index 2e95498..292c9c2 100755
--- a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
+++ b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
@@ -16,6 +16,7 @@
package com.android.systemui;
+import android.animation.ArgbEvaluator;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
@@ -80,6 +81,12 @@ public class BatteryMeterView extends View implements DemoMode,
private BatteryController mBatteryController;
private boolean mPowerSaveEnabled;
+ private int mDarkModeBackgroundColor;
+ private int mDarkModeFillColor;
+
+ private int mLightModeBackgroundColor;
+ private int mLightModeFillColor;
+
private class BatteryTracker extends BroadcastReceiver {
public static final int UNKNOWN_LEVEL = -1;
@@ -245,6 +252,13 @@ public class BatteryMeterView extends View implements DemoMode,
mBoltPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mBoltPaint.setColor(context.getColor(R.color.batterymeter_bolt_color));
mBoltPoints = loadBoltPoints(res);
+
+ mDarkModeBackgroundColor =
+ context.getColor(R.color.dark_mode_icon_color_dual_tone_background);
+ mDarkModeFillColor = context.getColor(R.color.dark_mode_icon_color_dual_tone_fill);
+ mLightModeBackgroundColor =
+ context.getColor(R.color.light_mode_icon_color_dual_tone_background);
+ mLightModeFillColor = context.getColor(R.color.light_mode_icon_color_dual_tone_fill);
}
public void setBatteryController(BatteryController batteryController) {
@@ -309,14 +323,30 @@ public class BatteryMeterView extends View implements DemoMode,
return color;
}
- public void setIconTint(int tint) {
- mIconTint = tint;
- mFramePaint.setColorFilter(new PorterDuffColorFilter(tint, PorterDuff.Mode.SRC_ATOP));
- mBoltPaint.setColor(tint);
- mChargeColor = tint;
+ public void setDarkIntensity(float darkIntensity) {
+ int backgroundColor = getBackgroundColor(darkIntensity);
+ int fillColor = getFillColor(darkIntensity);
+ mIconTint = fillColor;
+ mFramePaint.setColor(backgroundColor);
+ mBoltPaint.setColor(backgroundColor);
+ mChargeColor = fillColor;
invalidate();
}
+ private int getBackgroundColor(float darkIntensity) {
+ return getColorForDarkIntensity(
+ darkIntensity, mLightModeBackgroundColor, mDarkModeBackgroundColor);
+ }
+
+ private int getFillColor(float darkIntensity) {
+ return getColorForDarkIntensity(
+ darkIntensity, mLightModeFillColor, mDarkModeFillColor);
+ }
+
+ private int getColorForDarkIntensity(float darkIntensity, int lightColor, int darkColor) {
+ return (int) ArgbEvaluator.getInstance().evaluate(darkIntensity, lightColor, darkColor);
+ }
+
@Override
public void draw(Canvas c) {
BatteryTracker tracker = mDemoMode ? mDemoTracker : mTracker;
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
index 7286907..a82afcf 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/SignalClusterView.java
@@ -59,9 +59,10 @@ public class SignalClusterView
private String mWifiDescription;
private ArrayList<PhoneState> mPhoneStates = new ArrayList<PhoneState>();
private int mIconTint = Color.WHITE;
+ private float mDarkIntensity;
ViewGroup mWifiGroup;
- ImageView mVpn, mWifi, mAirplane, mNoSims;
+ ImageView mVpn, mWifi, mAirplane, mNoSims, mWifiDark, mNoSimsDark;
View mWifiAirplaneSpacer;
View mWifiSignalSpacer;
LinearLayout mMobileSignalGroup;
@@ -115,8 +116,10 @@ public class SignalClusterView
mVpn = (ImageView) findViewById(R.id.vpn);
mWifiGroup = (ViewGroup) findViewById(R.id.wifi_combo);
mWifi = (ImageView) findViewById(R.id.wifi_signal);
+ mWifiDark = (ImageView) findViewById(R.id.wifi_signal_dark);
mAirplane = (ImageView) findViewById(R.id.airplane);
mNoSims = (ImageView) findViewById(R.id.no_sims);
+ mNoSimsDark = (ImageView) findViewById(R.id.no_sims_dark);
mWifiAirplaneSpacer = findViewById(R.id.wifi_airplane_spacer);
mWifiSignalSpacer = findViewById(R.id.wifi_signal_spacer);
mMobileSignalGroup = (LinearLayout) findViewById(R.id.mobile_signal_group);
@@ -273,6 +276,7 @@ public class SignalClusterView
if (DEBUG) Log.d(TAG, String.format("vpn: %s", mVpnVisible ? "VISIBLE" : "GONE"));
if (mWifiVisible) {
mWifi.setImageResource(mWifiStrengthId);
+ mWifiDark.setImageResource(mWifiStrengthId);
mWifiGroup.setContentDescription(mWifiDescription);
mWifiGroup.setVisibility(View.VISIBLE);
} else {
@@ -317,15 +321,17 @@ public class SignalClusterView
}
mNoSims.setVisibility(mNoSimsVisible ? View.VISIBLE : View.GONE);
+ mNoSimsDark.setVisibility(mNoSimsVisible ? View.VISIBLE : View.GONE);
boolean anythingVisible = mNoSimsVisible || mWifiVisible || mIsAirplaneMode
|| anyMobileVisible || mVpnVisible;
setPaddingRelative(0, 0, anythingVisible ? mEndPadding : mEndPaddingNothingVisible, 0);
}
- public void setIconTint(int tint) {
- boolean changed = tint != mIconTint;
+ public void setIconTint(int tint, float darkIntensity) {
+ boolean changed = tint != mIconTint || darkIntensity != mDarkIntensity;
mIconTint = tint;
+ mDarkIntensity = darkIntensity;
if (changed && isAttachedToWindow()) {
applyIconTint();
}
@@ -333,14 +339,19 @@ public class SignalClusterView
private void applyIconTint() {
setTint(mVpn, mIconTint);
- setTint(mWifi, mIconTint);
- setTint(mNoSims, mIconTint);
setTint(mAirplane, mIconTint);
+ applyDarkIntensity(mDarkIntensity, mNoSims, mNoSimsDark);
+ applyDarkIntensity(mDarkIntensity, mWifi, mWifiDark);
for (int i = 0; i < mPhoneStates.size(); i++) {
- mPhoneStates.get(i).setIconTint(mIconTint);
+ mPhoneStates.get(i).setIconTint(mIconTint, mDarkIntensity);
}
}
+ private void applyDarkIntensity(float darkIntensity, View lightIcon, View darkIcon) {
+ lightIcon.setAlpha(1 - darkIntensity);
+ darkIcon.setAlpha(darkIntensity);
+ }
+
private void setTint(ImageView v, int tint) {
v.setImageTintMode(PorterDuff.Mode.SRC_ATOP);
v.setImageTintList(ColorStateList.valueOf(tint));
@@ -354,7 +365,7 @@ public class SignalClusterView
private String mMobileDescription, mMobileTypeDescription;
private ViewGroup mMobileGroup;
- private ImageView mMobile, mMobileType;
+ private ImageView mMobile, mMobileDark, mMobileType;
public PhoneState(int subId, Context context) {
ViewGroup root = (ViewGroup) LayoutInflater.from(context)
@@ -366,12 +377,14 @@ public class SignalClusterView
public void setViews(ViewGroup root) {
mMobileGroup = root;
mMobile = (ImageView) root.findViewById(R.id.mobile_signal);
+ mMobileDark = (ImageView) root.findViewById(R.id.mobile_signal_dark);
mMobileType = (ImageView) root.findViewById(R.id.mobile_type);
}
public boolean apply(boolean isSecondaryIcon) {
if (mMobileVisible && !mIsAirplaneMode) {
mMobile.setImageResource(mMobileStrengthId);
+ mMobileDark.setImageResource(mMobileStrengthId);
mMobileType.setImageResource(mMobileTypeId);
mMobileGroup.setContentDescription(mMobileTypeDescription
+ " " + mMobileDescription);
@@ -385,6 +398,8 @@ public class SignalClusterView
0, 0, 0);
mMobile.setPaddingRelative(mIsMobileTypeIconWide ? mWideTypeIconStartPadding : 0,
0, 0, 0);
+ mMobileDark.setPaddingRelative(mIsMobileTypeIconWide ? mWideTypeIconStartPadding : 0,
+ 0, 0, 0);
if (DEBUG) Log.d(TAG, String.format("mobile: %s sig=%d typ=%d",
(mMobileVisible ? "VISIBLE" : "GONE"), mMobileStrengthId, mMobileTypeId));
@@ -401,8 +416,8 @@ public class SignalClusterView
}
}
- public void setIconTint(int tint) {
- setTint(mMobile, tint);
+ public void setIconTint(int tint, float darkIntensity) {
+ applyDarkIntensity(darkIntensity, mMobile, mMobileDark);
setTint(mMobileType, tint);
}
}
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
index 2c389fb..f046c63 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PhoneStatusBar.java
@@ -49,7 +49,6 @@ import android.content.res.Resources;
import android.database.ContentObserver;
import android.graphics.Bitmap;
import android.graphics.Canvas;
-import android.graphics.Color;
import android.graphics.ColorFilter;
import android.graphics.PixelFormat;
import android.graphics.Point;
@@ -225,8 +224,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
/** Allow some time inbetween the long press for back and recents. */
private static final int LOCK_TO_APP_GESTURE_TOLERENCE = 200;
- private int mLightModeIconColor;
-
PhoneStatusBarPolicy mIconPolicy;
// These are no longer handled by the policy, because we need custom strategies for them
@@ -535,7 +532,6 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
updateDisplaySize();
mScrimSrcModeEnabled = mContext.getResources().getBoolean(
R.bool.config_status_bar_scrim_behind_use_src);
- mLightModeIconColor = mContext.getColor(R.color.light_mode_icon_color);
super.start(); // calls createAndAddWindows()
@@ -2324,9 +2320,7 @@ public class PhoneStatusBar extends BaseStatusBar implements DemoMode,
boolean allowLight = isTransparentBar && !mBatteryController.isPowerSave();
boolean light = (vis & View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR) != 0;
- mIconController.setIconTint(
- (allowLight && light) ? mLightModeIconColor : Color.WHITE);
-
+ mIconController.setIconsDark(allowLight && light);
}
// restore the recents bit
if (wasRecentsVisible) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java
index c49f620..45da297 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarIconController.java
@@ -16,11 +16,11 @@
package com.android.systemui.statusbar.phone;
+import android.animation.ArgbEvaluator;
import android.animation.ValueAnimator;
import android.content.Context;
import android.content.res.ColorStateList;
import android.graphics.Color;
-import android.graphics.PorterDuff;
import android.os.Bundle;
import android.os.Handler;
import android.os.SystemClock;
@@ -74,12 +74,16 @@ public class StatusBarIconController {
private int mIconHPadding;
private int mIconTint = Color.WHITE;
+ private float mDarkIntensity;
private boolean mTransitionPending;
private boolean mTintChangePending;
- private int mPendingIconTint;
+ private float mPendingDarkIntensity;
private ValueAnimator mTintAnimator;
+ private int mDarkModeIconColorSingleTone;
+ private int mLightModeIconColorSingleTone;
+
private final Handler mHandler;
private boolean mTransitionDeferring;
private long mTransitionDeferringStartTime;
@@ -111,6 +115,8 @@ public class StatusBarIconController {
android.R.interpolator.linear_out_slow_in);
mFastOutSlowIn = AnimationUtils.loadInterpolator(mContext,
android.R.interpolator.fast_out_slow_in);
+ mDarkModeIconColorSingleTone = context.getColor(R.color.dark_mode_icon_color_single_tone);
+ mLightModeIconColorSingleTone = context.getColor(R.color.light_mode_icon_color_single_tone);
mHandler = new Handler();
updateResources();
}
@@ -296,30 +302,31 @@ public class StatusBarIconController {
}
}
- public void setIconTint(int tint) {
+ public void setIconsDark(boolean dark) {
if (mTransitionPending) {
- deferIconTintChange(tint);
+ deferIconTintChange(dark ? 1.0f : 0.0f);
} else if (mTransitionDeferring) {
- animateIconTint(tint,
+ animateIconTint(dark ? 1.0f : 0.0f,
Math.max(0, mTransitionDeferringStartTime - SystemClock.uptimeMillis()),
mTransitionDeferringDuration);
} else {
- animateIconTint(tint, 0 /* delay */, DEFAULT_TINT_ANIMATION_DURATION);
+ animateIconTint(dark ? 1.0f : 0.0f, 0 /* delay */, DEFAULT_TINT_ANIMATION_DURATION);
}
}
- private void animateIconTint(int targetTint, long delay, long duration) {
+ private void animateIconTint(float targetDarkIntensity, long delay,
+ long duration) {
if (mTintAnimator != null) {
mTintAnimator.cancel();
}
- if (mIconTint == targetTint) {
+ if (mDarkIntensity == targetDarkIntensity) {
return;
}
- mTintAnimator = ValueAnimator.ofArgb(mIconTint, targetTint);
+ mTintAnimator = ValueAnimator.ofFloat(mDarkIntensity, targetDarkIntensity);
mTintAnimator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
- setIconTintInternal((Integer) animation.getAnimatedValue());
+ setIconTintInternal((Float) animation.getAnimatedValue());
}
});
mTintAnimator.setDuration(duration);
@@ -327,17 +334,20 @@ public class StatusBarIconController {
mTintAnimator.setInterpolator(mFastOutSlowIn);
mTintAnimator.start();
}
- private void setIconTintInternal(int tint) {
- mIconTint = tint;
+
+ private void setIconTintInternal(float darkIntensity) {
+ mDarkIntensity = darkIntensity;
+ mIconTint = (int) ArgbEvaluator.getInstance().evaluate(darkIntensity,
+ mLightModeIconColorSingleTone, mDarkModeIconColorSingleTone);
applyIconTint();
}
- private void deferIconTintChange(int tint) {
- if (mTintChangePending && tint == mPendingIconTint) {
+ private void deferIconTintChange(float darkIntensity) {
+ if (mTintChangePending && darkIntensity == mPendingDarkIntensity) {
return;
}
mTintChangePending = true;
- mPendingIconTint = tint;
+ mPendingDarkIntensity = darkIntensity;
}
private void applyIconTint() {
@@ -345,9 +355,9 @@ public class StatusBarIconController {
StatusBarIconView v = (StatusBarIconView) mStatusIcons.getChildAt(i);
v.setImageTintList(ColorStateList.valueOf(mIconTint));
}
- mSignalCluster.setIconTint(mIconTint);
+ mSignalCluster.setIconTint(mIconTint, mDarkIntensity);
mMoreIcon.setImageTintList(ColorStateList.valueOf(mIconTint));
- mBatteryMeterView.setIconTint(mIconTint);
+ mBatteryMeterView.setDarkIntensity(mDarkIntensity);
mClock.setTextColor(mIconTint);
applyNotificationIconsTint();
}
@@ -358,7 +368,6 @@ public class StatusBarIconController {
boolean isPreL = Boolean.TRUE.equals(v.getTag(R.id.icon_is_pre_L));
boolean colorize = !isPreL || isGrayscale(v);
if (colorize) {
- v.setImageTintMode(PorterDuff.Mode.SRC_ATOP);
v.setImageTintList(ColorStateList.valueOf(mIconTint));
}
}
@@ -381,7 +390,7 @@ public class StatusBarIconController {
public void appTransitionCancelled() {
if (mTransitionPending && mTintChangePending) {
mTintChangePending = false;
- animateIconTint(mPendingIconTint, 0 /* delay */, DEFAULT_TINT_ANIMATION_DURATION);
+ animateIconTint(mPendingDarkIntensity, 0 /* delay */, DEFAULT_TINT_ANIMATION_DURATION);
}
mTransitionPending = false;
}
@@ -389,7 +398,7 @@ public class StatusBarIconController {
public void appTransitionStarting(long startTime, long duration) {
if (mTransitionPending && mTintChangePending) {
mTintChangePending = false;
- animateIconTint(mPendingIconTint,
+ animateIconTint(mPendingDarkIntensity,
Math.max(0, startTime - SystemClock.uptimeMillis()),
duration);