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

Commit 6e721e11 authored by Jing Ji's avatar Jing Ji
Browse files

Fix spurious "Timeout waiting for provider"

There is a race that if two clients are acquiring the same
content provider at the same momment, the second one would
create a new ContentProviderRecord and then start a new process.

Bug: 148953992
Test: Manual
Change-Id: I3e95be32208a0869dc0b399da70f767abdd76fb4
parent 833a7855
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -7156,7 +7156,7 @@ public class ActivityManagerService extends IActivityManager.Stub
                    } finally {
                        Binder.restoreCallingIdentity(ident);
                    }
                } else if (dyingProc == cpr.proc) {
                } else if (dyingProc == cpr.proc && dyingProc != null) {
                    // The old stable connection's client should be killed during proc cleaning up,
                    // so do not re-use the old ContentProviderRecord, otherwise the new clients
                    // could get killed unexpectedly.