Update battery tip main icon into materiel theme design am: ff65a02ff8

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22746582

Change-Id: I994b044a35bf08864cf944698809881a3c0468d0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
ykhung
2023-04-20 20:10:30 +00:00
committed by Automerger Merge Worker
12 changed files with 48 additions and 33 deletions

View File

@@ -1,7 +1,7 @@
<!--
Copyright (C) 2017 The Android Open Source Project
Copyright (C) 2023 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
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
@@ -13,20 +13,15 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0"
android:tint="?android:attr/colorError">
android:viewportHeight="24.0">
<path
android:fillColor="#FF000000"
android:pathData="M11,7h2v2h-2z"/>
android:fillColor="?android:attr/colorAccent"
android:pathData="M13,17h-2v-2h2V17zM13,13h-2V8h2V13z"/>
<path
android:fillColor="#FF000000"
android:pathData="M11,11h2v6h-2z"/>
<path
android:fillColor="#FF000000"
android:pathData="M17,1.01L7,1C5.9,1 5,1.9 5,3v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3C19,1.9 18.1,1.01 17,1.01zM17,21H7l0,-1h10V21zM17,18H7V6h10V18zM7,4V3h10v1H7z"/>
android:fillColor="?android:attr/colorAccent"
android:pathData="M16.2,22.5H7.8c-1.3,0 -2.3,-1 -2.3,-2.3V5.8c0,-1.3 1,-2.3 2.3,-2.3h0.7v-2h7v2h0.7c1.3,0 2.3,1.1 2.3,2.3v14.3C18.5,21.5 17.5,22.5 16.2,22.5zM7.8,5.5c-0.2,0 -0.3,0.2 -0.3,0.3v14.3c0,0.2 0.2,0.3 0.3,0.3h8.3c0.2,0 0.3,-0.1 0.3,-0.3V5.8c0,-0.2 -0.1,-0.3 -0.3,-0.3h-2.7v-2h-3v2H7.8z"/>
</vector>

View File

@@ -0,0 +1,27 @@
<!--
Copyright (C) 2023 The Android Open Source 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.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="?android:attr/colorAccent"
android:pathData="M16.2,22.5H7.8c-1.3,0 -2.3,-1 -2.3,-2.3V5.8c0,-1.3 1,-2.3 2.3,-2.3h0.7v-2h7v2h0.7c1.3,0 2.3,1.1 2.3,2.3v14.3C18.5,21.5 17.5,22.5 16.2,22.5zM7.8,5.5c-0.2,0 -0.3,0.2 -0.3,0.3v14.3c0,0.2 0.2,0.3 0.3,0.3h8.3c0.2,0 0.3,-0.1 0.3,-0.3V5.8c0,-0.2 -0.1,-0.3 -0.3,-0.3h-2.7v-2h-3v2H7.8z"/>
<path
android:fillColor="?android:attr/colorAccent"
android:pathData="M16.1,11.1l-1.4,-1.5l-3.9,3.9l-1.5,-1.4l-1.4,1.4l2.9,2.9z"/>
</vector>

View File

@@ -1,5 +1,5 @@
<!--
Copyright (C) 2018 The Android Open Source Project
Copyright (C) 2023 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -13,19 +13,18 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#0F9D58"
android:fillColor="?android:attr/colorAccent"
android:pathData="M11,7h2v2h-2z"/>
<path
android:fillColor="#0F9D58"
android:fillColor="?android:attr/colorAccent"
android:pathData="M11,11h2v6h-2z"/>
<path
android:fillColor="#0F9D58"
android:fillColor="?android:attr/colorAccent"
android:pathData="M17,1.01L7,1C5.9,1 5,1.9 5,3v18c0,1.1 0.9,2 2,2h10c1.1,0 2,-0.9 2,-2V3C19,1.9 18.1,1.01 17,1.01zM17,21H7l0,-1h10V21zM17,18H7V6h10V18zM7,4V3h10v1H7z"/>
</vector>

View File

@@ -55,7 +55,7 @@ public class BatteryDefenderTip extends BatteryTip {
@Override
public int getIconId() {
return R.drawable.ic_battery_status_good_24dp;
return R.drawable.ic_battery_status_good_theme;
}
@Override

View File

@@ -71,7 +71,7 @@ public class HighUsageTip extends BatteryTip {
@Override
public int getIconId() {
return R.drawable.ic_perm_device_information_red_24dp;
return R.drawable.ic_perm_device_information_theme;
}
@Override

View File

@@ -48,7 +48,7 @@ public final class IncompatibleChargerTip extends BatteryTip {
@Override
public int getIconId() {
return R.drawable.ic_battery_alert_24dp;
return R.drawable.ic_battery_alert_theme;
}
@Override

View File

@@ -51,12 +51,7 @@ public class LowBatteryTip extends BatteryTip {
@Override
public int getIconId() {
return mState = R.drawable.ic_battery_status_bad_24dp;
}
@Override
public int getIconTintColorId() {
return mState = R.color.battery_bad_color_light;
return mState = R.drawable.ic_battery_saver_accent_24dp;
}
@Override

View File

@@ -93,8 +93,8 @@ public class RestrictAppTip extends BatteryTip {
@Override
public int getIconId() {
return mState == StateType.HANDLED
? R.drawable.ic_perm_device_information_green_24dp
: R.drawable.ic_battery_alert_24dp;
? R.drawable.ic_perm_device_information_theme
: R.drawable.ic_battery_alert_theme;
}
@Override

View File

@@ -48,7 +48,7 @@ public class SmartBatteryTip extends BatteryTip {
@Override
public int getIconId() {
return R.drawable.ic_perm_device_information_red_24dp;
return R.drawable.ic_perm_device_information_theme;
}
@Override

View File

@@ -85,7 +85,7 @@ public class BatteryDefenderTipTest {
@Test
public void getIcon_showIcon() {
assertThat(mBatteryDefenderTip.getIconId())
.isEqualTo(R.drawable.ic_battery_status_good_24dp);
.isEqualTo(R.drawable.ic_battery_status_good_theme);
}
@Test

View File

@@ -85,7 +85,7 @@ public final class IncompatibleChargerTipTest {
@Test
public void getIcon_showIcon() {
assertThat(mIncompatibleChargerTip.getIconId())
.isEqualTo(R.drawable.ic_battery_alert_24dp);
.isEqualTo(R.drawable.ic_battery_alert_theme);
}
@Test

View File

@@ -70,8 +70,7 @@ public class LowBatteryTipTest {
mContext.getString(R.string.battery_tip_low_battery_title));
assertThat(mLowBatteryTip.getSummary(mContext)).isEqualTo(
mContext.getString(R.string.battery_tip_low_battery_summary));
assertThat(mLowBatteryTip.getIconId()).isEqualTo(R.drawable.ic_battery_status_bad_24dp);
assertThat(mLowBatteryTip.getIconTintColorId()).isEqualTo(R.color.battery_bad_color_light);
assertThat(mLowBatteryTip.getIconId()).isEqualTo(R.drawable.ic_battery_saver_accent_24dp);
}
@Test