Merge changes from topic "cp-fingerprint" into qt-qpr1-dev
* changes: Don't mark terminal staged sessions as failed Add build fingerprint checks to APK sessions
This commit is contained in:
committed by
Android (Google) Code Review
commit
cc07b65678
@@ -259,6 +259,10 @@ public class PackageInstallerService extends IPackageInstaller.Stub implements
|
|||||||
// Don't hold mSessions lock when calling restoreSession, since it might trigger an APK
|
// Don't hold mSessions lock when calling restoreSession, since it might trigger an APK
|
||||||
// atomic install which needs to query sessions, which requires lock on mSessions.
|
// atomic install which needs to query sessions, which requires lock on mSessions.
|
||||||
for (PackageInstallerSession session : stagedSessionsToRestore) {
|
for (PackageInstallerSession session : stagedSessionsToRestore) {
|
||||||
|
if (mPm.isDeviceUpgrading() && !session.isStagedAndInTerminalState()) {
|
||||||
|
session.setStagedSessionFailed(SessionInfo.STAGED_SESSION_ACTIVATION_FAILED,
|
||||||
|
"Build fingerprint has changed");
|
||||||
|
}
|
||||||
mStagingManager.restoreSession(session);
|
mStagingManager.restoreSession(session);
|
||||||
}
|
}
|
||||||
// Broadcasts are not sent while we restore sessions on boot, since no processes would be
|
// Broadcasts are not sent while we restore sessions on boot, since no processes would be
|
||||||
|
|||||||
Reference in New Issue
Block a user