Skip to content

Commit ab63aa8

Browse files
author
Christopher Tate
committed
Use the new INSTALL_FROM_ADB Package Manager flag...
...when installing an apk in the course of an 'adb restore' operation. Fixes bug 5374597. Change-Id: I8ddce0e015e3bab79432e82709d841887667c346
1 parent 52edaa9 commit ab63aa8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

services/java/com/android/server/BackupManagerService.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3380,7 +3380,8 @@ boolean installApk(FileMetadata info, String installerPackage, InputStream instr
33803380
Uri packageUri = Uri.fromFile(apkFile);
33813381
mInstallObserver.reset();
33823382
mPackageManager.installPackage(packageUri, mInstallObserver,
3383-
PackageManager.INSTALL_REPLACE_EXISTING, installerPackage);
3383+
PackageManager.INSTALL_REPLACE_EXISTING | PackageManager.INSTALL_FROM_ADB,
3384+
installerPackage);
33843385
mInstallObserver.waitForCompletion();
33853386

33863387
if (mInstallObserver.getResult() != PackageManager.INSTALL_SUCCEEDED) {

0 commit comments

Comments
 (0)