Remove MY_PACKAGE_REPLACED and MY_PACKAGE_SUSPEND for battery usage
Remove MY_PACKAGE_REPLACED and MY_PACKAGE_SUSPEND action since Settings is not store updatable, and it will reboot every time while updating. Originally, it is used on the store updatable extension engine. Test: presubmit Bug: 258576047 Change-Id: I9f2d58e3a822c4e4ebe182b03ace1b30f97d2340
This commit is contained in:
@@ -3119,8 +3119,6 @@
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.BOOT_COMPLETED"/>
|
||||
<action android:name="android.intent.action.MY_PACKAGE_REPLACED"/>
|
||||
<action android:name="android.intent.action.MY_PACKAGE_UNSUSPENDED"/>
|
||||
<action android:name="com.google.android.setupwizard.SETUP_WIZARD_FINISHED"/>
|
||||
<action android:name="com.android.settings.battery.action.PERIODIC_JOB_RECHECK"/>
|
||||
</intent-filter>
|
||||
|
@@ -61,8 +61,6 @@ public final class BootBroadcastReceiver extends BroadcastReceiver {
|
||||
|
||||
switch (action) {
|
||||
case Intent.ACTION_BOOT_COMPLETED:
|
||||
case Intent.ACTION_MY_PACKAGE_REPLACED:
|
||||
case Intent.ACTION_MY_PACKAGE_UNSUSPENDED:
|
||||
case ACTION_SETUP_WIZARD_FINISHED:
|
||||
case ACTION_PERIODIC_JOB_RECHECK:
|
||||
Log.d(TAG, "refresh periodic job from action=" + action);
|
||||
|
@@ -80,18 +80,6 @@ public final class BootBroadcastReceiverTest {
|
||||
assertThat(mShadowAlarmManager.peekNextScheduledAlarm()).isNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void onReceive_withMyPackageReplacedIntent_refreshesJob() {
|
||||
mReceiver.onReceive(mContext, new Intent(Intent.ACTION_MY_PACKAGE_REPLACED));
|
||||
assertThat(mShadowAlarmManager.peekNextScheduledAlarm()).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void onReceive_withMyPackageUnsuspendIntent_refreshesJob() {
|
||||
mReceiver.onReceive(mContext, new Intent(Intent.ACTION_MY_PACKAGE_UNSUSPENDED));
|
||||
assertThat(mShadowAlarmManager.peekNextScheduledAlarm()).isNotNull();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void onReceive_withBootCompletedIntent_refreshesJob() {
|
||||
mReceiver.onReceive(mContext, new Intent(Intent.ACTION_BOOT_COMPLETED));
|
||||
|
Reference in New Issue
Block a user