Snap for 11469542 from 3f52a6c47d to 24Q2-release
Change-Id: Ifbfe3f0959e94c60eca4e003601a1ce4ad487c8b
This commit is contained in:
9
res/drawable/ic_battery_defender_tip_shield.xml
Normal file
9
res/drawable/ic_battery_defender_tip_shield.xml
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24">
|
||||||
|
<path
|
||||||
|
android:pathData="M20,5.64L12,2L4,5.64V11.09C4,16.14 7.41,20.85 12,22C16.59,20.85 20,16.14 20,11.09V5.64Z"
|
||||||
|
android:fillColor="?android:attr/colorAccent"/>
|
||||||
|
</vector>
|
||||||
@@ -5679,8 +5679,8 @@
|
|||||||
<string name="battery_tip_unrestrict_app_dialog_ok">Remove</string>
|
<string name="battery_tip_unrestrict_app_dialog_ok">Remove</string>
|
||||||
<!-- CANCEL button for dialog to remove restriction for app [CHAR LIMIT=NONE] -->
|
<!-- CANCEL button for dialog to remove restriction for app [CHAR LIMIT=NONE] -->
|
||||||
<string name="battery_tip_unrestrict_app_dialog_cancel">Cancel</string>
|
<string name="battery_tip_unrestrict_app_dialog_cancel">Cancel</string>
|
||||||
<!-- Charge to full button for battery defender tips [CHAR LIMIT=NONE] -->
|
<!-- Override button for Battery Defender Tip to start charging [CHAR LIMIT=NONE] -->
|
||||||
<string name="battery_tip_charge_to_full_button">Charge to full</string>
|
<string name="battery_tip_charge_to_full_button">Override</string>
|
||||||
<!-- Title of incompatible charging battery tip [CHAR LIMIT=NONE] -->
|
<!-- Title of incompatible charging battery tip [CHAR LIMIT=NONE] -->
|
||||||
<string name="battery_tip_incompatible_charging_title">Check charging accessory</string>
|
<string name="battery_tip_incompatible_charging_title">Check charging accessory</string>
|
||||||
<!-- Content description for the incompatible charging battery tip button [CHAR LIMIT=NONE] -->
|
<!-- Content description for the incompatible charging battery tip button [CHAR LIMIT=NONE] -->
|
||||||
|
|||||||
@@ -266,18 +266,6 @@ public class AdvancedPowerUsageDetail extends DashboardFragment
|
|||||||
initHeader();
|
initHeader();
|
||||||
mOptimizationMode = mBatteryOptimizeUtils.getAppOptimizationMode();
|
mOptimizationMode = mBatteryOptimizeUtils.getAppOptimizationMode();
|
||||||
initFooter();
|
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);
|
mLogStringBuilder = new StringBuilder("onResume mode = ").append(mOptimizationMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -110,18 +110,6 @@ public class PowerBackgroundUsageDetail extends DashboardFragment
|
|||||||
initHeader();
|
initHeader();
|
||||||
mOptimizationMode = mBatteryOptimizeUtils.getAppOptimizationMode();
|
mOptimizationMode = mBatteryOptimizeUtils.getAppOptimizationMode();
|
||||||
initFooter();
|
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);
|
mLogStringBuilder = new StringBuilder("onResume mode = ").append(mOptimizationMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public class RestrictAppPreferenceController extends BasePreferenceController {
|
|||||||
RestrictedAppDetails.startRestrictedAppDetails(mPreferenceFragment, mAppInfos);
|
RestrictedAppDetails.startRestrictedAppDetails(mPreferenceFragment, mAppInfos);
|
||||||
FeatureFactory.getFeatureFactory()
|
FeatureFactory.getFeatureFactory()
|
||||||
.getMetricsFeatureProvider()
|
.getMetricsFeatureProvider()
|
||||||
.action(mContext, SettingsEnums.OPEN_APP_RESTRICTED_LIST);
|
.action(mContext, SettingsEnums.ACTION_APP_RESTRICTED_LIST_MANAGED);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ public class BatteryDefenderTip extends BatteryTip {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getIconId() {
|
public int getIconId() {
|
||||||
return R.drawable.ic_battery_status_good_theme;
|
return R.drawable.ic_battery_defender_tip_shield;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -81,6 +81,7 @@ public final class IncompatibleChargerTip extends BatteryTip {
|
|||||||
}
|
}
|
||||||
|
|
||||||
cardPreference.setSelectable(false);
|
cardPreference.setSelectable(false);
|
||||||
|
cardPreference.enableDismiss(false);
|
||||||
cardPreference.setIconResId(getIconId());
|
cardPreference.setIconResId(getIconId());
|
||||||
cardPreference.setPrimaryButtonText(context.getString(R.string.learn_more));
|
cardPreference.setPrimaryButtonText(context.getString(R.string.learn_more));
|
||||||
cardPreference.setPrimaryButtonAction(
|
cardPreference.setPrimaryButtonAction(
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class TermsOfAddressFeminineController extends TermsOfAddressBaseControll
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getMetricsActionKey() {
|
protected int getMetricsActionKey() {
|
||||||
return 0;
|
return SettingsEnums.ACTION_TERMS_OF_ADDRESS_SPECIFIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class TermsOfAddressMasculineController extends TermsOfAddressBaseControl
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getMetricsActionKey() {
|
protected int getMetricsActionKey() {
|
||||||
return 0;
|
return SettingsEnums.ACTION_TERMS_OF_ADDRESS_SPECIFIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ public class TermsOfAddressNeutralController extends TermsOfAddressBaseControlle
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected int getMetricsActionKey() {
|
protected int getMetricsActionKey() {
|
||||||
return 0;
|
return SettingsEnums.ACTION_TERMS_OF_ADDRESS_SPECIFIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ public class TermsOfAddressFeminineControllerTest {
|
|||||||
|
|
||||||
selectedPreference.performClick();
|
selectedPreference.performClick();
|
||||||
|
|
||||||
|
assertThat(selectedPreference.getKey()).isEqualTo(KEY_FEMININE);
|
||||||
assertThat(selectedPreference.isSelected()).isTrue();
|
assertThat(selectedPreference.isSelected()).isTrue();
|
||||||
assertThat(pref.isSelected()).isFalse();
|
assertThat(pref.isSelected()).isFalse();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ public class TermsOfAddressMasculineControllerTest {
|
|||||||
|
|
||||||
selectedPreference.performClick();
|
selectedPreference.performClick();
|
||||||
|
|
||||||
|
assertThat(selectedPreference.getKey()).isEqualTo(KEY_MASCULINE);
|
||||||
assertThat(selectedPreference.isSelected()).isTrue();
|
assertThat(selectedPreference.isSelected()).isTrue();
|
||||||
assertThat(pref.isSelected()).isFalse();
|
assertThat(pref.isSelected()).isFalse();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -97,6 +97,7 @@ public class TermsOfAddressNeutralControllerTest {
|
|||||||
|
|
||||||
selectedPreference.performClick();
|
selectedPreference.performClick();
|
||||||
|
|
||||||
|
assertThat(selectedPreference.getKey()).isEqualTo(KEY_NEUTRAL);
|
||||||
assertThat(selectedPreference.isSelected()).isTrue();
|
assertThat(selectedPreference.isSelected()).isTrue();
|
||||||
assertThat(pref.isSelected()).isFalse();
|
assertThat(pref.isSelected()).isFalse();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user