Merge "Access process fields only when valid"

This commit is contained in:
TreeHugger Robot
2021-09-14 19:53:31 +00:00
committed by Android (Google) Code Review

View File

@@ -947,9 +947,9 @@ final class ServiceRecord extends Binder implements ComponentName.WithComponentN
}
public void postNotification() {
final int appUid = appInfo.uid;
final int appPid = app.getPid();
if (isForeground && foregroundNoti != null) {
final int appUid = appInfo.uid;
final int appPid = app.getPid();
// Do asynchronous communication with notification manager to
// avoid deadlocks.
final String localPackageName = packageName;