Wait for the dying app fully killed on getting content provider

If we are acquiring a content provider, but the hosting process
is dying, wait for its death notification come in, before
restart this process.

Bug: 141857656
Test: manual
Change-Id: Ib2a8014bb3f22485172d0574cfce14bc6895034b
diff --git a/services/core/java/com/android/server/am/ProcessRecord.java b/services/core/java/com/android/server/am/ProcessRecord.java
index 5db6ff7..867571a 100644
--- a/services/core/java/com/android/server/am/ProcessRecord.java
+++ b/services/core/java/com/android/server/am/ProcessRecord.java
@@ -329,6 +329,9 @@
 
     boolean mReachable; // Whether or not this process is reachable from given process
 
+    // A callback that should be executed on app died; after that it'll be set to null
+    Runnable mAppDiedCallback;
+
     void setStartParams(int startUid, HostingRecord hostingRecord, String seInfo,
             long startTime) {
         this.startUid = startUid;