Don't cancel PendingIntents unless the stay_stopped flag is on.

This change should be accompanied by other enhancements needed
to harden the stopped state. So, only cancel PendingIntents for
stopped apps when the flag is enabled.

Bug: 332922400
Test: atest tests/app/src/android/app/cts/ForceStopTest.java
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:63d699245f19338d63f320d2b80b4a3bcbd7ae21)
Merged-In: I186f43ca0736072ab8f235e448deff304dda84cb
Change-Id: I186f43ca0736072ab8f235e448deff304dda84cb
1 file changed