Run abandon() in the system server context
abandon() will call into StagingManager which might trigger external callbacks. The code should not run in the context of the calling uid. Bug: 267383992 Test: CtsStagedInstallHostTestCases Change-Id: Ib8a1b6bd48388e1dc2362b8f7cbe4c0d41ee3ebc
This commit is contained in:
@@ -3995,7 +3995,14 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
|
||||
return;
|
||||
}
|
||||
}
|
||||
r.run();
|
||||
|
||||
final long token = Binder.clearCallingIdentity();
|
||||
try {
|
||||
// This will call into StagingManager which might trigger external callbacks
|
||||
r.run();
|
||||
} finally {
|
||||
Binder.restoreCallingIdentity(token);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user