Merge "Status bar icons 15 dp" into pi-dev
am: 97abc762cc
Change-Id: I9d33e4b766952a29ef67fabc17a2ed47ba9114ef
This commit is contained in:
@@ -88,7 +88,7 @@
|
|||||||
<dimen name="zen_mode_condition_detail_bottom_padding">4dp</dimen>
|
<dimen name="zen_mode_condition_detail_bottom_padding">4dp</dimen>
|
||||||
|
|
||||||
<!-- SignalDrawable -->
|
<!-- SignalDrawable -->
|
||||||
<dimen name="signal_icon_size">17dp</dimen>
|
<dimen name="signal_icon_size">15dp</dimen>
|
||||||
<!-- How far to inset the rounded edges -->
|
<!-- How far to inset the rounded edges -->
|
||||||
<dimen name="stat_sys_mobile_signal_circle_inset">0.9dp</dimen>
|
<dimen name="stat_sys_mobile_signal_circle_inset">0.9dp</dimen>
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="14dp"
|
android:width="12.35dp"
|
||||||
android:height="17dp"
|
android:height="15dp"
|
||||||
android:viewportWidth="14"
|
android:viewportWidth="14"
|
||||||
android:viewportHeight="17">
|
android:viewportHeight="17">
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="14dp"
|
android:width="12.35dp"
|
||||||
android:height="17dp"
|
android:height="15dp"
|
||||||
android:viewportWidth="14"
|
android:viewportWidth="14"
|
||||||
android:viewportHeight="17">
|
android:viewportHeight="17">
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="14dp"
|
android:width="12.35dp"
|
||||||
android:height="17dp"
|
android:height="15dp"
|
||||||
android:viewportWidth="14"
|
android:viewportWidth="14"
|
||||||
android:viewportHeight="17">
|
android:viewportHeight="17">
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="22dp"
|
android:width="19.41dp"
|
||||||
android:height="17dp"
|
android:height="15dp"
|
||||||
android:viewportWidth="22"
|
android:viewportWidth="22"
|
||||||
android:viewportHeight="17">
|
android:viewportHeight="17">
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="5dp"
|
android:width="4.44dp"
|
||||||
android:height="17.0dp"
|
android:height="15.0dp"
|
||||||
android:viewportWidth="7.1"
|
android:viewportWidth="7.1"
|
||||||
android:viewportHeight="24.0">
|
android:viewportHeight="24.0">
|
||||||
<path
|
<path
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="5dp"
|
android:width="4.44dp"
|
||||||
android:height="17.0dp"
|
android:height="15.0dp"
|
||||||
android:viewportWidth="7.1"
|
android:viewportWidth="7.1"
|
||||||
android:viewportHeight="24.0">
|
android:viewportHeight="24.0">
|
||||||
<path
|
<path
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="6dp"
|
android:width="5.29dp"
|
||||||
android:height="17dp"
|
android:height="15dp"
|
||||||
android:viewportWidth="6"
|
android:viewportWidth="6"
|
||||||
android:viewportHeight="17">
|
android:viewportHeight="17">
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="7dp"
|
android:width="6.18dp"
|
||||||
android:height="17dp"
|
android:height="15dp"
|
||||||
android:viewportWidth="7"
|
android:viewportWidth="7"
|
||||||
android:viewportHeight="17">
|
android:viewportHeight="17">
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="7dp"
|
android:width="6.18dp"
|
||||||
android:height="17dp"
|
android:height="15dp"
|
||||||
android:viewportWidth="7"
|
android:viewportWidth="7"
|
||||||
android:viewportHeight="17">
|
android:viewportHeight="17">
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="15dp"
|
android:width="13.24dp"
|
||||||
android:height="17dp"
|
android:height="15dp"
|
||||||
android:viewportWidth="15"
|
android:viewportWidth="15"
|
||||||
android:viewportHeight="17">
|
android:viewportHeight="17">
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="18dp"
|
android:width="15.88dp"
|
||||||
android:height="17dp"
|
android:height="15dp"
|
||||||
android:viewportWidth="18"
|
android:viewportWidth="18"
|
||||||
android:viewportHeight="17">
|
android:viewportHeight="17">
|
||||||
|
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="26dp"
|
android:width="22.94dp"
|
||||||
android:height="17dp"
|
android:height="15dp"
|
||||||
android:viewportWidth="26"
|
android:viewportWidth="26"
|
||||||
android:viewportHeight="17">
|
android:viewportHeight="17">
|
||||||
|
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:autoMirrored="true"
|
android:autoMirrored="true"
|
||||||
android:width="18.41dp"
|
android:width="16.25dp"
|
||||||
android:height="17dp"
|
android:height="15dp"
|
||||||
android:viewportWidth="26.0"
|
android:viewportWidth="26.0"
|
||||||
android:viewportHeight="24.0">
|
android:viewportHeight="24.0">
|
||||||
<path
|
<path
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:autoMirrored="true"
|
android:autoMirrored="true"
|
||||||
android:width="18.41dp"
|
android:width="16.25dp"
|
||||||
android:height="17dp"
|
android:height="15dp"
|
||||||
android:viewportWidth="26.0"
|
android:viewportWidth="26.0"
|
||||||
android:viewportHeight="24.0">
|
android:viewportHeight="24.0">
|
||||||
<path
|
<path
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:autoMirrored="true"
|
android:autoMirrored="true"
|
||||||
android:width="18.41dp"
|
android:width="16.25dp"
|
||||||
android:height="17dp"
|
android:height="15dp"
|
||||||
android:viewportWidth="26.0"
|
android:viewportWidth="26.0"
|
||||||
android:viewportHeight="24.0">
|
android:viewportHeight="24.0">
|
||||||
<path
|
<path
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="18.41dp"
|
android:width="16.41dp"
|
||||||
android:height="18.41dp"
|
android:height="16.41dp"
|
||||||
android:viewportWidth="21.2"
|
android:viewportWidth="21.2"
|
||||||
android:viewportHeight="21.2">
|
android:viewportHeight="21.2">
|
||||||
<group
|
<group
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ Copyright (C) 2017 The Android Open Source Project
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="18.41dp"
|
android:width="16.25dp"
|
||||||
android:height="17dp"
|
android:height="15dp"
|
||||||
android:viewportWidth="21.66"
|
android:viewportWidth="21.66"
|
||||||
android:viewportHeight="20">
|
android:viewportHeight="20">
|
||||||
<group
|
<group
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="18.41dp"
|
android:width="16.41dp"
|
||||||
android:height="18.41dp"
|
android:height="16.41dp"
|
||||||
android:viewportWidth="21.7"
|
android:viewportWidth="21.7"
|
||||||
android:viewportHeight="21.7">
|
android:viewportHeight="21.7">
|
||||||
<group
|
<group
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ Copyright (C) 2017 The Android Open Source Project
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="18.41dp"
|
android:width="16.25dp"
|
||||||
android:height="17dp"
|
android:height="15dp"
|
||||||
android:viewportWidth="21.66"
|
android:viewportWidth="21.66"
|
||||||
android:viewportHeight="20.0">
|
android:viewportHeight="20.0">
|
||||||
<group
|
<group
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="18.41dp"
|
android:width="16.41dp"
|
||||||
android:height="18.41dp"
|
android:height="16.41dp"
|
||||||
android:viewportWidth="21.7"
|
android:viewportWidth="21.7"
|
||||||
android:viewportHeight="21.7">
|
android:viewportHeight="21.7">
|
||||||
<group
|
<group
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ Copyright (C) 2017 The Android Open Source Project
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="18.41dp"
|
android:width="16.24dp"
|
||||||
android:height="17dp"
|
android:height="15dp"
|
||||||
android:viewportWidth="21.86"
|
android:viewportWidth="21.86"
|
||||||
android:viewportHeight="20.19">
|
android:viewportHeight="20.19">
|
||||||
<group
|
<group
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="18.41dp"
|
android:width="16.41dp"
|
||||||
android:height="18.41dp"
|
android:height="16.41dp"
|
||||||
android:viewportWidth="21.7"
|
android:viewportWidth="21.7"
|
||||||
android:viewportHeight="21.7">
|
android:viewportHeight="21.7">
|
||||||
<group
|
<group
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ Copyright (C) 2017 The Android Open Source Project
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="18.41dp"
|
android:width="16.27dp"
|
||||||
android:height="17dp"
|
android:height="15dp"
|
||||||
android:viewportWidth="21.80"
|
android:viewportWidth="21.80"
|
||||||
android:viewportHeight="20.1">
|
android:viewportHeight="20.1">
|
||||||
<group
|
<group
|
||||||
|
|||||||
@@ -14,8 +14,8 @@
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="18.41dp"
|
android:width="16.41dp"
|
||||||
android:height="18.41dp"
|
android:height="16.41dp"
|
||||||
android:viewportWidth="21.95"
|
android:viewportWidth="21.95"
|
||||||
android:viewportHeight="21.65">
|
android:viewportHeight="21.65">
|
||||||
<group
|
<group
|
||||||
|
|||||||
@@ -14,8 +14,8 @@ Copyright (C) 2017 The Android Open Source Project
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="18.41dp"
|
android:width="16.31dp"
|
||||||
android:height="17dp"
|
android:height="15dp"
|
||||||
android:viewportWidth="21.75"
|
android:viewportWidth="21.75"
|
||||||
android:viewportHeight="20.0">
|
android:viewportHeight="20.0">
|
||||||
<group
|
<group
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ Copyright (C) 2014 The Android Open Source Project
|
|||||||
limitations under the License.
|
limitations under the License.
|
||||||
-->
|
-->
|
||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:width="18.41dp"
|
android:width="16.25dp"
|
||||||
android:height="17dp"
|
android:height="17dp"
|
||||||
android:viewportWidth="26.0"
|
android:viewportWidth="26.0"
|
||||||
android:viewportHeight="24.0">
|
android:viewportHeight="24.0">
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:paddingEnd="4dp"
|
android:paddingEnd="@dimen/signal_cluster_battery_padding"
|
||||||
android:gravity="center_vertical"
|
android:gravity="center_vertical"
|
||||||
android:orientation="horizontal"/>
|
android:orientation="horizontal"/>
|
||||||
|
|
||||||
|
|||||||
@@ -186,7 +186,7 @@
|
|||||||
<dimen name="snooze_option_padding">8dp</dimen>
|
<dimen name="snooze_option_padding">8dp</dimen>
|
||||||
|
|
||||||
<!-- size at which Notification icons will be drawn in the status bar -->
|
<!-- 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 -->
|
<!-- 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>
|
<dimen name="status_bar_icon_drawing_size_dark">@*android:dimen/notification_header_icon_size_ambient</dimen>
|
||||||
|
|||||||
@@ -141,6 +141,9 @@ public class BatteryMeterView extends LinearLayout implements
|
|||||||
newUserId);
|
newUserId);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
setClipChildren(false);
|
||||||
|
setClipToPadding(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setForceShowPercent(boolean show) {
|
public void setForceShowPercent(boolean show) {
|
||||||
|
|||||||
@@ -67,6 +67,12 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
|
|||||||
* everything above 30% to 50%, making it appear on 1bit color depths.
|
* everything above 30% to 50%, making it appear on 1bit color depths.
|
||||||
*/
|
*/
|
||||||
private static final float DARK_ALPHA_BOOST = 0.67f;
|
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;
|
private final int ANIMATION_DURATION_FAST = 100;
|
||||||
|
|
||||||
public static final int STATE_ICON = 0;
|
public static final int STATE_ICON = 0;
|
||||||
@@ -178,11 +184,13 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
|
|||||||
// We do not resize and scale system icons (on the right), only notification icons (on the
|
// We do not resize and scale system icons (on the right), only notification icons (on the
|
||||||
// left).
|
// left).
|
||||||
if (mNotification != null || mAlwaysScaleIcon) {
|
if (mNotification != null || mAlwaysScaleIcon) {
|
||||||
updateIconScale();
|
updateIconScaleForNotifications();
|
||||||
|
} else {
|
||||||
|
updateIconScaleForSystemIcons();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateIconScale() {
|
private void updateIconScaleForNotifications() {
|
||||||
final float imageBounds = NotificationUtils.interpolate(
|
final float imageBounds = NotificationUtils.interpolate(
|
||||||
mStatusBarIconDrawingSize,
|
mStatusBarIconDrawingSize,
|
||||||
mStatusBarIconDrawingSizeDark,
|
mStatusBarIconDrawingSizeDark,
|
||||||
@@ -191,6 +199,10 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
|
|||||||
mIconScale = (float)imageBounds / (float)outerBounds;
|
mIconScale = (float)imageBounds / (float)outerBounds;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void updateIconScaleForSystemIcons() {
|
||||||
|
mIconScale = SYSTEM_ICON_SCALE;
|
||||||
|
}
|
||||||
|
|
||||||
public float getIconScaleFullyDark() {
|
public float getIconScaleFullyDark() {
|
||||||
return (float) mStatusBarIconDrawingSizeDark / mStatusBarIconDrawingSize;
|
return (float) mStatusBarIconDrawingSizeDark / mStatusBarIconDrawingSize;
|
||||||
}
|
}
|
||||||
@@ -238,7 +250,7 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
|
|||||||
mBlocked = false;
|
mBlocked = false;
|
||||||
mAlwaysScaleIcon = true;
|
mAlwaysScaleIcon = true;
|
||||||
reloadDimens();
|
reloadDimens();
|
||||||
updateIconScale();
|
updateIconScaleForNotifications();
|
||||||
mDensity = context.getResources().getDisplayMetrics().densityDpi;
|
mDensity = context.getResources().getDisplayMetrics().densityDpi;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -802,7 +814,7 @@ public class StatusBarIconView extends AnimatedImageView implements StatusIconDi
|
|||||||
public void setDark(boolean dark, boolean fade, long delay) {
|
public void setDark(boolean dark, boolean fade, long delay) {
|
||||||
mDozer.setIntensityDark(f -> {
|
mDozer.setIntensityDark(f -> {
|
||||||
mDarkAmount = f;
|
mDarkAmount = f;
|
||||||
updateIconScale();
|
updateIconScaleForNotifications();
|
||||||
updateDecorColor();
|
updateDecorColor();
|
||||||
updateIconColor();
|
updateIconColor();
|
||||||
updateAllowAnimation();
|
updateAllowAnimation();
|
||||||
|
|||||||
Reference in New Issue
Block a user