Loading packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -330,7 +330,8 @@ public class PackageInstallerActivity extends Activity { // data we still want to count it as "installed". mAppInfo = mPm.getApplicationInfo(pkgName, PackageManager.MATCH_UNINSTALLED_PACKAGES); if ((mAppInfo.flags&ApplicationInfo.FLAG_INSTALLED) == 0) { // If the package is archived, treat it as update case. if (!mAppInfo.isArchived && (mAppInfo.flags & ApplicationInfo.FLAG_INSTALLED) == 0) { mAppInfo = null; } } catch (NameNotFoundException e) { Loading services/core/java/com/android/server/pm/PackageInstallerSession.java +4 −1 Original line number Diff line number Diff line Loading @@ -1060,7 +1060,10 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { final boolean isInstallDpcPackagesPermissionGranted = (snapshot.checkUidPermission( android.Manifest.permission.INSTALL_DPC_PACKAGES, mInstallerUid) == PackageManager.PERMISSION_GRANTED); final int targetPackageUid = snapshot.getPackageUid(packageName, 0, userId); // Also query the package uid for archived packages, so that the user confirmation // dialog can be displayed for updating archived apps. final int targetPackageUid = snapshot.getPackageUid(packageName, PackageManager.MATCH_ARCHIVED_PACKAGES, userId); final boolean isUpdate = targetPackageUid != -1 || isApexSession(); final InstallSourceInfo existingInstallSourceInfo = isUpdate ? snapshot.getInstallSourceInfo(packageName, userId) Loading Loading
packages/PackageInstaller/src/com/android/packageinstaller/PackageInstallerActivity.java +2 −1 Original line number Diff line number Diff line Loading @@ -330,7 +330,8 @@ public class PackageInstallerActivity extends Activity { // data we still want to count it as "installed". mAppInfo = mPm.getApplicationInfo(pkgName, PackageManager.MATCH_UNINSTALLED_PACKAGES); if ((mAppInfo.flags&ApplicationInfo.FLAG_INSTALLED) == 0) { // If the package is archived, treat it as update case. if (!mAppInfo.isArchived && (mAppInfo.flags & ApplicationInfo.FLAG_INSTALLED) == 0) { mAppInfo = null; } } catch (NameNotFoundException e) { Loading
services/core/java/com/android/server/pm/PackageInstallerSession.java +4 −1 Original line number Diff line number Diff line Loading @@ -1060,7 +1060,10 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { final boolean isInstallDpcPackagesPermissionGranted = (snapshot.checkUidPermission( android.Manifest.permission.INSTALL_DPC_PACKAGES, mInstallerUid) == PackageManager.PERMISSION_GRANTED); final int targetPackageUid = snapshot.getPackageUid(packageName, 0, userId); // Also query the package uid for archived packages, so that the user confirmation // dialog can be displayed for updating archived apps. final int targetPackageUid = snapshot.getPackageUid(packageName, PackageManager.MATCH_ARCHIVED_PACKAGES, userId); final boolean isUpdate = targetPackageUid != -1 || isApexSession(); final InstallSourceInfo existingInstallSourceInfo = isUpdate ? snapshot.getInstallSourceInfo(packageName, userId) Loading