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

Commit bdb91832 authored by yuanhuihui's avatar yuanhuihui Committed by Joey Rizzoli
Browse files

fix foreground process will be mistakenly killed when it uses content provider.

process hosting ContentProvider is normally to be killed by AMS when empty processes over limit.
foregroup processs send ContentProvider request to the process before system server received  binderDied(),
then set up a connection with the killByAm process.
at this time, system server execute binderDied(), then will kill foregroup process, depends on provider.
in getContentProviderImpl(), need add condition whether process is killedByAm.

https://code.google.com/p/android/issues/detail?id=220800



Change-Id: I227abc20cd4d2f72d3f2f4dcdce11ede7927e843
Signed-off-by: default avataryuanhuihui <yuanhuihui@xiaomi.com>
parent 400822e6
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10979,7 +10979,7 @@ public final class ActivityManagerService extends ActivityManagerNative
                // pending on the process even though we managed to update its
                // adj level.  Not sure what to do about this, but at least
                // the race is now smaller.
                if (!success) {
                if (!success || cpr.proc.killedByAm) {
                    // Uh oh...  it looks like the provider's process
                    // has been killed on us.  We need to wait for a new
                    // process to be started, and make sure its death