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

Commit 553fec22 authored by lumark's avatar lumark Committed by Ming-Shin Lu
Browse files

Fix system crash during RWC#resumeHomeActivity called.

Add global lock when calling RWC#resumeHomeActivity to
fix the CL[1] that calling method by post runnable,
system may crash due to race condition during force-stop
launcher package.

[1]: I243fab507268f81df0a8067883157d63f0f79c22

Fix: 129352498
Test: atest TaplTestsLauncher3 without system crash.

Change-Id: I2d63ee43f8ca832d3f1c5e49b518af712ac6e0d3
parent 356c5dfd
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -3059,7 +3059,11 @@ class ActivityStack extends ConfigurationContainer {
            // activity in home stack.
            // See {@link #mInResumeTopActivity}.
            mService.mH.post(
                    () -> mRootActivityContainer.resumeHomeActivity(prev, reason, mDisplayId));
                    () -> {
                        synchronized (mService.mGlobalLock) {
                            mRootActivityContainer.resumeHomeActivity(prev, reason, mDisplayId);
                        }
                    });
            return true;
        } else {
            return mRootActivityContainer.resumeHomeActivity(prev, reason, mDisplayId);