Remove incorrect assumption.
The initial assumption was that PACKAGE_RESTARTED meant that the app would be put into the stopped state and be kept in the stopped state until the PACKAGE_UNSTOPPED broadcast was sent. However, there are cases where the PACKAGE_RESTARTED broadcast is sent but the app is not put and kept in the stopped state (eg. clearing app data). Change the logic to no longer assume that PACKAGE_RESTARTED means the app is put and kept in the stopped state. Bug: 315171674 Test: atest android.permissionui.cts.SafetyLabelChangesJobServiceTest#runNotificationJob_packageSourceUnspecified_updatesSafetyLabelHistoryForApps Test: atest FrameworksMockingServicesTests:BackgroundJobsControllerTest Change-Id: I23efa966b4963ca1777bdac58bbdad2f250c4984
Loading
Please register or sign in to comment