Status bar icons 15 dp
Shrink all status bar icons by 2dp. This means setting a scale factor on
anything that is a StatusBarIconView, and manually scaling down wifi and
mobile data groups.
Also fix the padding between the mobile data view and the battery
Also snuck in a fix for the battery saver icon clipping on QS
Change-Id: I5f5430d9e9c66f5c2794dcf4974cf18aa3bff061
Test: visual
Fixes: 74985733
Fixes: 79967193
Bug: 77822905
diff --git a/packages/SystemUI/res/drawable/ic_1x_mobiledata.xml b/packages/SystemUI/res/drawable/ic_1x_mobiledata.xml
index c0e0e59..5213519 100644
--- a/packages/SystemUI/res/drawable/ic_1x_mobiledata.xml
+++ b/packages/SystemUI/res/drawable/ic_1x_mobiledata.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="14dp"
- android:height="17dp"
+ android:width="12.35dp"
+ android:height="15dp"
android:viewportWidth="14"
android:viewportHeight="17">
diff --git a/packages/SystemUI/res/drawable/ic_3g_mobiledata.xml b/packages/SystemUI/res/drawable/ic_3g_mobiledata.xml
index e4a5bf8..0c942bd 100644
--- a/packages/SystemUI/res/drawable/ic_3g_mobiledata.xml
+++ b/packages/SystemUI/res/drawable/ic_3g_mobiledata.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="14dp"
- android:height="17dp"
+ android:width="12.35dp"
+ android:height="15dp"
android:viewportWidth="14"
android:viewportHeight="17">
diff --git a/packages/SystemUI/res/drawable/ic_4g_mobiledata.xml b/packages/SystemUI/res/drawable/ic_4g_mobiledata.xml
index e98560b..535f358 100644
--- a/packages/SystemUI/res/drawable/ic_4g_mobiledata.xml
+++ b/packages/SystemUI/res/drawable/ic_4g_mobiledata.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="14dp"
- android:height="17dp"
+ android:width="12.35dp"
+ android:height="15dp"
android:viewportWidth="14"
android:viewportHeight="17">
diff --git a/packages/SystemUI/res/drawable/ic_4g_plus_mobiledata.xml b/packages/SystemUI/res/drawable/ic_4g_plus_mobiledata.xml
index bf39ea2..1d048ae 100644
--- a/packages/SystemUI/res/drawable/ic_4g_plus_mobiledata.xml
+++ b/packages/SystemUI/res/drawable/ic_4g_plus_mobiledata.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="22dp"
- android:height="17dp"
+ android:width="19.41dp"
+ android:height="15dp"
android:viewportWidth="22"
android:viewportHeight="17">
diff --git a/packages/SystemUI/res/drawable/ic_activity_down.xml b/packages/SystemUI/res/drawable/ic_activity_down.xml
index 526c987..1bd9731 100644
--- a/packages/SystemUI/res/drawable/ic_activity_down.xml
+++ b/packages/SystemUI/res/drawable/ic_activity_down.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="5dp"
- android:height="17.0dp"
+ android:width="4.44dp"
+ android:height="15.0dp"
android:viewportWidth="7.1"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/ic_activity_up.xml b/packages/SystemUI/res/drawable/ic_activity_up.xml
index 8d18beb..d29722e 100644
--- a/packages/SystemUI/res/drawable/ic_activity_up.xml
+++ b/packages/SystemUI/res/drawable/ic_activity_up.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="5dp"
- android:height="17.0dp"
+ android:width="4.44dp"
+ android:height="15.0dp"
android:viewportWidth="7.1"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/ic_e_mobiledata.xml b/packages/SystemUI/res/drawable/ic_e_mobiledata.xml
index ca601d6..b360e3d 100644
--- a/packages/SystemUI/res/drawable/ic_e_mobiledata.xml
+++ b/packages/SystemUI/res/drawable/ic_e_mobiledata.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="6dp"
- android:height="17dp"
+ android:width="5.29dp"
+ android:height="15dp"
android:viewportWidth="6"
android:viewportHeight="17">
diff --git a/packages/SystemUI/res/drawable/ic_g_mobiledata.xml b/packages/SystemUI/res/drawable/ic_g_mobiledata.xml
index 8ff6d7a..82c8e18 100644
--- a/packages/SystemUI/res/drawable/ic_g_mobiledata.xml
+++ b/packages/SystemUI/res/drawable/ic_g_mobiledata.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="7dp"
- android:height="17dp"
+ android:width="6.18dp"
+ android:height="15dp"
android:viewportWidth="7"
android:viewportHeight="17">
diff --git a/packages/SystemUI/res/drawable/ic_h_mobiledata.xml b/packages/SystemUI/res/drawable/ic_h_mobiledata.xml
index 68ea58e..f31ec78 100644
--- a/packages/SystemUI/res/drawable/ic_h_mobiledata.xml
+++ b/packages/SystemUI/res/drawable/ic_h_mobiledata.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="7dp"
- android:height="17dp"
+ android:width="6.18dp"
+ android:height="15dp"
android:viewportWidth="7"
android:viewportHeight="17">
diff --git a/packages/SystemUI/res/drawable/ic_h_plus_mobiledata.xml b/packages/SystemUI/res/drawable/ic_h_plus_mobiledata.xml
index 42128002..b6ed876 100644
--- a/packages/SystemUI/res/drawable/ic_h_plus_mobiledata.xml
+++ b/packages/SystemUI/res/drawable/ic_h_plus_mobiledata.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="15dp"
- android:height="17dp"
+ android:width="13.24dp"
+ android:height="15dp"
android:viewportWidth="15"
android:viewportHeight="17">
diff --git a/packages/SystemUI/res/drawable/ic_lte_mobiledata.xml b/packages/SystemUI/res/drawable/ic_lte_mobiledata.xml
index 7536f51..e6b4fb6 100644
--- a/packages/SystemUI/res/drawable/ic_lte_mobiledata.xml
+++ b/packages/SystemUI/res/drawable/ic_lte_mobiledata.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="18dp"
- android:height="17dp"
+ android:width="15.88dp"
+ android:height="15dp"
android:viewportWidth="18"
android:viewportHeight="17">
diff --git a/packages/SystemUI/res/drawable/ic_lte_plus_mobiledata.xml b/packages/SystemUI/res/drawable/ic_lte_plus_mobiledata.xml
index 302e3bd..e5cdff3 100644
--- a/packages/SystemUI/res/drawable/ic_lte_plus_mobiledata.xml
+++ b/packages/SystemUI/res/drawable/ic_lte_plus_mobiledata.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="26dp"
- android:height="17dp"
+ android:width="22.94dp"
+ android:height="15dp"
android:viewportWidth="26"
android:viewportHeight="17">
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_in.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_in.xml
index 666127b..ba3d4e6 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_in.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_in.xml
@@ -16,8 +16,8 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:autoMirrored="true"
- android:width="18.41dp"
- android:height="17dp"
+ android:width="16.25dp"
+ android:height="15dp"
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_inout.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_inout.xml
index eeba030..1f3b68f 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_inout.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_inout.xml
@@ -16,8 +16,8 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:autoMirrored="true"
- android:width="18.41dp"
- android:height="17dp"
+ android:width="16.25dp"
+ android:height="15dp"
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
diff --git a/packages/SystemUI/res/drawable/stat_sys_wifi_out.xml b/packages/SystemUI/res/drawable/stat_sys_wifi_out.xml
index d577d1a..24c6b1e 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_out.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_out.xml
@@ -16,8 +16,8 @@
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:autoMirrored="true"
- android:width="18.41dp"
- android:height="17dp"
+ android:width="16.25dp"
+ android:height="15dp"
android:viewportWidth="26.0"
android:viewportHeight="24.0">
<path
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 b3cd455..56ca422 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_0.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="18.41dp"
- android:height="18.41dp"
+ android:width="16.41dp"
+ android:height="16.41dp"
android:viewportWidth="21.2"
android:viewportHeight="21.2">
<group
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 6c0fad8..737d5a0 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
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="18.41dp"
- android:height="17dp"
+ android:width="16.25dp"
+ android:height="15dp"
android:viewportWidth="21.66"
android:viewportHeight="20">
<group
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 2ebbaf2..e5b0d1a 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_1.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="18.41dp"
- android:height="18.41dp"
+ android:width="16.41dp"
+ android:height="16.41dp"
android:viewportWidth="21.7"
android:viewportHeight="21.7">
<group
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 eaead9b..5d64570 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
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="18.41dp"
- android:height="17dp"
+ android:width="16.25dp"
+ android:height="15dp"
android:viewportWidth="21.66"
android:viewportHeight="20.0">
<group
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 809147c..b3ee86e 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_2.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="18.41dp"
- android:height="18.41dp"
+ android:width="16.41dp"
+ android:height="16.41dp"
android:viewportWidth="21.7"
android:viewportHeight="21.7">
<group
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 6d4fb77..012e742 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
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
-android:width="18.41dp"
-android:height="17dp"
+android:width="16.24dp"
+android:height="15dp"
android:viewportWidth="21.86"
android:viewportHeight="20.19">
<group
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 4c479c0..9b919c1 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_3.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="18.41dp"
- android:height="18.41dp"
+ android:width="16.41dp"
+ android:height="16.41dp"
android:viewportWidth="21.7"
android:viewportHeight="21.7">
<group
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 6c96300..5a61d2a 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
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="18.41dp"
- android:height="17dp"
+ android:width="16.27dp"
+ android:height="15dp"
android:viewportWidth="21.80"
android:viewportHeight="20.1">
<group
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 8fb7a7b..144af5a 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_4.xml
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="18.41dp"
- android:height="18.41dp"
+ android:width="16.41dp"
+ android:height="16.41dp"
android:viewportWidth="21.95"
android:viewportHeight="21.65">
<group
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 bc3fdb5..6c9f983 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
@@ -14,8 +14,8 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="18.41dp"
- android:height="17dp"
+ android:width="16.31dp"
+ android:height="15dp"
android:viewportWidth="21.75"
android:viewportHeight="20.0">
<group
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 5169de4..330daa4 100644
--- a/packages/SystemUI/res/drawable/stat_sys_wifi_signal_null.xml
+++ b/packages/SystemUI/res/drawable/stat_sys_wifi_signal_null.xml
@@ -14,7 +14,7 @@
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
- android:width="18.41dp"
+ android:width="16.25dp"
android:height="17dp"
android:viewportWidth="26.0"
android:viewportHeight="24.0">
diff --git a/packages/SystemUI/res/layout/system_icons.xml b/packages/SystemUI/res/layout/system_icons.xml
index 9237477..9de46d8 100644
--- a/packages/SystemUI/res/layout/system_icons.xml
+++ b/packages/SystemUI/res/layout/system_icons.xml
@@ -24,7 +24,7 @@
android:layout_width="0dp"
android:layout_weight="1"
android:layout_height="match_parent"
- android:paddingEnd="4dp"
+ android:paddingEnd="@dimen/signal_cluster_battery_padding"
android:gravity="center_vertical"
android:orientation="horizontal"/>
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index 8c3cc42..c1458b2 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -186,7 +186,7 @@
<dimen name="snooze_option_padding">8dp</dimen>
<!-- size at which Notification icons will be drawn in the status bar -->
- <dimen name="status_bar_icon_drawing_size">17dp</dimen>
+ <dimen name="status_bar_icon_drawing_size">15dp</dimen>
<!-- size at which Notification icons will be drawn on Ambient Display -->
<dimen name="status_bar_icon_drawing_size_dark">@*android:dimen/notification_header_icon_size_ambient</dimen>
diff --git a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
index 0683514..59501f0 100644
--- a/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
+++ b/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
@@ -141,6 +141,9 @@
newUserId);
}
};
+
+ setClipChildren(false);
+ setClipToPadding(false);
}
public void setForceShowPercent(boolean show) {
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
index 4fc18ad..8d2c934 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/StatusBarIconView.java
@@ -67,6 +67,12 @@
* everything above 30% to 50%, making it appear on 1bit color depths.
*/
private static final float DARK_ALPHA_BOOST = 0.67f;
+ /**
+ * Status icons are currently drawn with the intention of being 17dp tall, but we
+ * want to scale them (in a way that doesn't require an asset dump) down 2dp. So
+ * 17dp * (15 / 17) = 15dp, the new height.
+ */
+ private static final float SYSTEM_ICON_SCALE = 15.f / 17.f;
private final int ANIMATION_DURATION_FAST = 100;
public static final int STATE_ICON = 0;
@@ -178,11 +184,13 @@
// We do not resize and scale system icons (on the right), only notification icons (on the
// left).
if (mNotification != null || mAlwaysScaleIcon) {
- updateIconScale();
+ updateIconScaleForNotifications();
+ } else {
+ updateIconScaleForSystemIcons();
}
}
- private void updateIconScale() {
+ private void updateIconScaleForNotifications() {
final float imageBounds = NotificationUtils.interpolate(
mStatusBarIconDrawingSize,
mStatusBarIconDrawingSizeDark,
@@ -191,6 +199,10 @@
mIconScale = (float)imageBounds / (float)outerBounds;
}
+ private void updateIconScaleForSystemIcons() {
+ mIconScale = SYSTEM_ICON_SCALE;
+ }
+
public float getIconScaleFullyDark() {
return (float) mStatusBarIconDrawingSizeDark / mStatusBarIconDrawingSize;
}
@@ -238,7 +250,7 @@
mBlocked = false;
mAlwaysScaleIcon = true;
reloadDimens();
- updateIconScale();
+ updateIconScaleForNotifications();
mDensity = context.getResources().getDisplayMetrics().densityDpi;
}
@@ -802,7 +814,7 @@
public void setDark(boolean dark, boolean fade, long delay) {
mDozer.setIntensityDark(f -> {
mDarkAmount = f;
- updateIconScale();
+ updateIconScaleForNotifications();
updateDecorColor();
updateIconColor();
updateAllowAnimation();