Don't crash the system if there is broken precondition.
Bug: 257403361 Fixes: 257403361 Test: presubmit Change-Id: Iabd2833fd590c8c5d49aeb6f8c0b538c0e2508c6
This commit is contained in:
@@ -3711,7 +3711,9 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub {
|
||||
private boolean dispatchPendingAbandonCallback() {
|
||||
final Runnable callback;
|
||||
synchronized (mLock) {
|
||||
Preconditions.checkState(mStageDirInUse);
|
||||
if (!mStageDirInUse) {
|
||||
return false;
|
||||
}
|
||||
mStageDirInUse = false;
|
||||
callback = mPendingAbandonCallback;
|
||||
mPendingAbandonCallback = null;
|
||||
|
||||
Reference in New Issue
Block a user