Remove MY_PACKAGE_REPLACED and MY_PACKAGE_SUSPEND for battery usage am: 3bc2805914

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

Change-Id: Ic684279afe45e945399a30ab3565e2570296aac6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
ykhung
2023-03-26 04:58:46 +00:00
committed by Automerger Merge Worker
3 changed files with 0 additions and 16 deletions

View File

@@ -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>

View File

@@ -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);

View File

@@ -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));