diff --git a/res/drawable/ic_battery_defender_tip_shield.xml b/res/drawable/ic_battery_defender_tip_shield.xml
new file mode 100644
index 00000000000..1f1f73a609b
--- /dev/null
+++ b/res/drawable/ic_battery_defender_tip_shield.xml
@@ -0,0 +1,9 @@
+
+
+
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 45305ece4f6..746dbf51f36 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -5679,8 +5679,8 @@
Remove
Cancel
-
- Charge to full
+
+ Override
Check charging accessory
diff --git a/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetail.java b/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetail.java
index 3df6b1a9ef7..6b04d3ce4f4 100644
--- a/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetail.java
+++ b/src/com/android/settings/fuelgauge/AdvancedPowerUsageDetail.java
@@ -266,18 +266,6 @@ public class AdvancedPowerUsageDetail extends DashboardFragment
initHeader();
mOptimizationMode = mBatteryOptimizeUtils.getAppOptimizationMode();
initFooter();
- mExecutor.execute(
- () -> {
- final String packageName =
- BatteryUtils.getLoggingPackageName(
- getContext(), mBatteryOptimizeUtils.getPackageName());
- FeatureFactory.getFeatureFactory()
- .getMetricsFeatureProvider()
- .action(
- getContext(),
- SettingsEnums.OPEN_APP_BATTERY_USAGE,
- packageName);
- });
mLogStringBuilder = new StringBuilder("onResume mode = ").append(mOptimizationMode);
}
diff --git a/src/com/android/settings/fuelgauge/PowerBackgroundUsageDetail.java b/src/com/android/settings/fuelgauge/PowerBackgroundUsageDetail.java
index 2bf4d96fe52..206745647c6 100644
--- a/src/com/android/settings/fuelgauge/PowerBackgroundUsageDetail.java
+++ b/src/com/android/settings/fuelgauge/PowerBackgroundUsageDetail.java
@@ -110,18 +110,6 @@ public class PowerBackgroundUsageDetail extends DashboardFragment
initHeader();
mOptimizationMode = mBatteryOptimizeUtils.getAppOptimizationMode();
initFooter();
- mExecutor.execute(
- () -> {
- String packageName =
- BatteryUtils.getLoggingPackageName(
- getContext(), mBatteryOptimizeUtils.getPackageName());
- FeatureFactory.getFeatureFactory()
- .getMetricsFeatureProvider()
- .action(
- getContext(),
- SettingsEnums.OPEN_POWER_USAGE_MANAGE_BACKGROUND,
- packageName);
- });
mLogStringBuilder = new StringBuilder("onResume mode = ").append(mOptimizationMode);
}
diff --git a/src/com/android/settings/fuelgauge/RestrictAppPreferenceController.java b/src/com/android/settings/fuelgauge/RestrictAppPreferenceController.java
index ea59afa0a8e..9969f2467e7 100644
--- a/src/com/android/settings/fuelgauge/RestrictAppPreferenceController.java
+++ b/src/com/android/settings/fuelgauge/RestrictAppPreferenceController.java
@@ -84,7 +84,7 @@ public class RestrictAppPreferenceController extends BasePreferenceController {
RestrictedAppDetails.startRestrictedAppDetails(mPreferenceFragment, mAppInfos);
FeatureFactory.getFeatureFactory()
.getMetricsFeatureProvider()
- .action(mContext, SettingsEnums.OPEN_APP_RESTRICTED_LIST);
+ .action(mContext, SettingsEnums.ACTION_APP_RESTRICTED_LIST_MANAGED);
return true;
}
diff --git a/src/com/android/settings/fuelgauge/batterytip/tips/BatteryDefenderTip.java b/src/com/android/settings/fuelgauge/batterytip/tips/BatteryDefenderTip.java
index 319ba7a16c8..37162448b1b 100644
--- a/src/com/android/settings/fuelgauge/batterytip/tips/BatteryDefenderTip.java
+++ b/src/com/android/settings/fuelgauge/batterytip/tips/BatteryDefenderTip.java
@@ -62,7 +62,7 @@ public class BatteryDefenderTip extends BatteryTip {
@Override
public int getIconId() {
- return R.drawable.ic_battery_status_good_theme;
+ return R.drawable.ic_battery_defender_tip_shield;
}
@Override
diff --git a/src/com/android/settings/fuelgauge/batterytip/tips/IncompatibleChargerTip.java b/src/com/android/settings/fuelgauge/batterytip/tips/IncompatibleChargerTip.java
index c9ff8641ceb..72c710c023f 100644
--- a/src/com/android/settings/fuelgauge/batterytip/tips/IncompatibleChargerTip.java
+++ b/src/com/android/settings/fuelgauge/batterytip/tips/IncompatibleChargerTip.java
@@ -81,6 +81,7 @@ public final class IncompatibleChargerTip extends BatteryTip {
}
cardPreference.setSelectable(false);
+ cardPreference.enableDismiss(false);
cardPreference.setIconResId(getIconId());
cardPreference.setPrimaryButtonText(context.getString(R.string.learn_more));
cardPreference.setPrimaryButtonAction(
diff --git a/src/com/android/settings/localepicker/TermsOfAddressFeminineController.java b/src/com/android/settings/localepicker/TermsOfAddressFeminineController.java
index fdc4589cf5d..2227297c1a4 100644
--- a/src/com/android/settings/localepicker/TermsOfAddressFeminineController.java
+++ b/src/com/android/settings/localepicker/TermsOfAddressFeminineController.java
@@ -35,7 +35,7 @@ public class TermsOfAddressFeminineController extends TermsOfAddressBaseControll
@Override
protected int getMetricsActionKey() {
- return 0;
+ return SettingsEnums.ACTION_TERMS_OF_ADDRESS_SPECIFIED;
}
@Override
diff --git a/src/com/android/settings/localepicker/TermsOfAddressMasculineController.java b/src/com/android/settings/localepicker/TermsOfAddressMasculineController.java
index 86011136e10..1548be2a90a 100644
--- a/src/com/android/settings/localepicker/TermsOfAddressMasculineController.java
+++ b/src/com/android/settings/localepicker/TermsOfAddressMasculineController.java
@@ -35,7 +35,7 @@ public class TermsOfAddressMasculineController extends TermsOfAddressBaseControl
@Override
protected int getMetricsActionKey() {
- return 0;
+ return SettingsEnums.ACTION_TERMS_OF_ADDRESS_SPECIFIED;
}
@Override
diff --git a/src/com/android/settings/localepicker/TermsOfAddressNeutralController.java b/src/com/android/settings/localepicker/TermsOfAddressNeutralController.java
index e67bd4d12d8..0863c4fa682 100644
--- a/src/com/android/settings/localepicker/TermsOfAddressNeutralController.java
+++ b/src/com/android/settings/localepicker/TermsOfAddressNeutralController.java
@@ -35,7 +35,7 @@ public class TermsOfAddressNeutralController extends TermsOfAddressBaseControlle
@Override
protected int getMetricsActionKey() {
- return 0;
+ return SettingsEnums.ACTION_TERMS_OF_ADDRESS_SPECIFIED;
}
@Override
diff --git a/tests/unit/src/com/android/settings/localepicker/TermsOfAddressFeminineControllerTest.java b/tests/unit/src/com/android/settings/localepicker/TermsOfAddressFeminineControllerTest.java
index d1e30784e13..c04e5f92a63 100644
--- a/tests/unit/src/com/android/settings/localepicker/TermsOfAddressFeminineControllerTest.java
+++ b/tests/unit/src/com/android/settings/localepicker/TermsOfAddressFeminineControllerTest.java
@@ -97,6 +97,7 @@ public class TermsOfAddressFeminineControllerTest {
selectedPreference.performClick();
+ assertThat(selectedPreference.getKey()).isEqualTo(KEY_FEMININE);
assertThat(selectedPreference.isSelected()).isTrue();
assertThat(pref.isSelected()).isFalse();
}
diff --git a/tests/unit/src/com/android/settings/localepicker/TermsOfAddressMasculineControllerTest.java b/tests/unit/src/com/android/settings/localepicker/TermsOfAddressMasculineControllerTest.java
index 5bf30731295..c2298be6faf 100644
--- a/tests/unit/src/com/android/settings/localepicker/TermsOfAddressMasculineControllerTest.java
+++ b/tests/unit/src/com/android/settings/localepicker/TermsOfAddressMasculineControllerTest.java
@@ -97,6 +97,7 @@ public class TermsOfAddressMasculineControllerTest {
selectedPreference.performClick();
+ assertThat(selectedPreference.getKey()).isEqualTo(KEY_MASCULINE);
assertThat(selectedPreference.isSelected()).isTrue();
assertThat(pref.isSelected()).isFalse();
}
diff --git a/tests/unit/src/com/android/settings/localepicker/TermsOfAddressNeutralControllerTest.java b/tests/unit/src/com/android/settings/localepicker/TermsOfAddressNeutralControllerTest.java
index e83f3cdfcd8..fb207fc8cfe 100644
--- a/tests/unit/src/com/android/settings/localepicker/TermsOfAddressNeutralControllerTest.java
+++ b/tests/unit/src/com/android/settings/localepicker/TermsOfAddressNeutralControllerTest.java
@@ -97,6 +97,7 @@ public class TermsOfAddressNeutralControllerTest {
selectedPreference.performClick();
+ assertThat(selectedPreference.getKey()).isEqualTo(KEY_NEUTRAL);
assertThat(selectedPreference.isSelected()).isTrue();
assertThat(pref.isSelected()).isFalse();
}