Resolve the deadlock caused by unfreezeProcess().

Restore unfreezeProcess() to previous "quick unfreeze" code, also add a
quick logging for REPORT_UNFREEZE_MSG.

Bug: 244113346
Test: statsd_testdrive 254
Change-Id: I30f0d969a7f540ea6f4a392a904b59692c7e4d72
This commit is contained in:
Hui Yu
2022-08-31 09:01:08 -07:00
parent 2e41fd7843
commit b4d82e7245

View File

@@ -1351,7 +1351,18 @@ public final class CachedAppOptimizer {
return;
}
Slog.d(TAG_AM, "quick sync unfreeze " + pid);
unfreezeAppLSP(app, reason);
try {
freezeBinder(pid, false);
} catch (RuntimeException e) {
Slog.e(TAG_AM, "Unable to quick unfreeze binder for " + pid);
return;
}
try {
Process.setProcessFrozen(pid, app.uid, false);
} catch (Exception e) {
Slog.e(TAG_AM, "Unable to quick unfreeze " + pid);
}
}
}