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

Commit 2ff60c46 authored by Jing Ji's avatar Jing Ji Committed by Android (Google) Code Review
Browse files

Merge "Wait for persisting data into the dropbox if system_server crashes" into main

parents dc3ba8da 581a6313
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -9543,6 +9543,14 @@ public class ActivityManagerService extends IActivityManager.Stub
            }
        } else {
            worker.start();
            if (process != null && process.mPid == MY_PID && "crash".equals(eventType)) {
                // We're actually crashing, let's wait for up to 2 seconds before killing ourselves,
                // so the data could be persisted into the dropbox.
                try {
                    worker.join(2000);
                } catch (InterruptedException ignored) {
                }
            }
        }
    }