Update the incompatible charging banner tip icon

Update the incompatible banner tip icon based on the UX update:
https://screenshot.googleplex.com/8ApTNJnsxRRufjQ

Fix: 246960554
Test: make test RunSettingsRoboTests ROBOTEST_FILTER=com.android.settings.fuelgauge
Change-Id: I060554c17b3825b38004fb643c0a0cdf5fdbed4d
This commit is contained in:
ykhung
2023-08-01 17:59:44 +08:00
committed by YK Hung
parent 99d99c1e0c
commit 69f46a72fc
4 changed files with 29 additions and 5 deletions

View File

@@ -0,0 +1,25 @@
<!--
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="48dp"
android:height="48dp"
android:viewportWidth="960"
android:viewportHeight="960">
<path
android:fillColor="?android:attr/colorAccent"
android:pathData="M442,780L518,780L518,698L660,542L660,351Q660,351 660,351Q660,351 660,351L300,351Q300,351 300,351Q300,351 300,351L300,542L442,697.7L442,780ZM382,840L382,722L240,566L240,351Q240,326.25 257.63,308.63Q275.25,291 300,291L372,291L342,321L342,120L402,120L402,291L558,291L558,120L618,120L618,321L588,291L660,291Q684.75,291 702.38,308.63Q720,326.25 720,351L720,566L578,722L578,840L382,840ZM480,565L480,565L480,565L480,565Q480,565 480,565Q480,565 480,565L480,565Q480,565 480,565Q480,565 480,565L480,565L480,565L480,565L480,565Z"/>
</vector>

View File

@@ -16,8 +16,8 @@
package com.android.settings.fuelgauge;
import android.content.ContentResolver;
import android.content.BroadcastReceiver;
import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.provider.Settings;
@@ -25,8 +25,6 @@ import android.util.Log;
import androidx.annotation.VisibleForTesting;
import com.android.settings.R;
import com.android.settings.fuelgauge.BatteryOptimizeHistoricalLogEntry;
import com.android.settings.fuelgauge.batterysaver.BatterySaverScheduleRadioButtonsController;
import com.android.settingslib.fuelgauge.BatterySaverUtils;
@@ -41,6 +39,7 @@ public final class BatterySettingsMigrateChecker extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
Log.d(TAG, "onReceive: " + intent + " owner: " + BatteryBackupHelper.isOwner());
if (intent != null
&& Intent.ACTION_BOOT_COMPLETED.equals(intent.getAction())
&& BatteryBackupHelper.isOwner()) {

View File

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

View File

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