Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a3b0e3f0 authored by Bryce Lee's avatar Bryce Lee
Browse files

Remove all activities that do not successfully launch.

We previously were only removing activities that launched with
a fatal result code. Activities that do not start due to a
non-fatal error should also be removed.

Change-Id: I0b38eaaab7e38ed314c6022705170def38e10436
Fixes: 38021882
Test: cts-tradefed run cts-dev --module DevicePolicyManager --test com.android.cts.devicepolicy.DeviceOwnerTest#testLockTask_deviceOwnerUser
parent ba21a120
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -956,7 +956,7 @@ class ActivityStarter {
            // If we are not able to proceed, disassociate the activity from the task. Leaving an
            // activity in an incomplete state can lead to issues, such as performing operations
            // without a window container.
            if (ActivityManager.isStartResultFatalError(result)
            if (!ActivityManager.isStartResultSuccessful(result)
                    && mStartActivity.getTask() != null) {
                mStartActivity.getTask().removeActivity(mStartActivity);
            }