Remove one legacy install path

Also removed everything needed only for this path

Test: Installed app via package installer, adb, google play store
Bug: 65261282
Change-Id: Ia8a03fa5900687cd2adf844ba7e6c07e0537382e
This commit is contained in:
Philip P. Moltmann
2017-11-14 08:34:06 -08:00
parent 5209abad9b
commit b13f15332e
7 changed files with 114 additions and 223 deletions

View File

@@ -169,7 +169,6 @@ LOCAL_SRC_FILES += \
core/java/android/content/pm/IPackageDataObserver.aidl \
core/java/android/content/pm/IPackageDeleteObserver.aidl \
core/java/android/content/pm/IPackageDeleteObserver2.aidl \
core/java/android/content/pm/IPackageInstallObserver.aidl \
core/java/android/content/pm/IPackageInstallObserver2.aidl \
core/java/android/content/pm/IPackageInstaller.aidl \
core/java/android/content/pm/IPackageInstallerCallback.aidl \

View File

@@ -35,7 +35,6 @@ import android.content.pm.FeatureInfo;
import android.content.pm.IOnPermissionsChangeListener;
import android.content.pm.IPackageDataObserver;
import android.content.pm.IPackageDeleteObserver;
import android.content.pm.IPackageInstallObserver;
import android.content.pm.IPackageManager;
import android.content.pm.IPackageMoveObserver;
import android.content.pm.IPackageStatsObserver;
@@ -1681,21 +1680,8 @@ public class ApplicationPackageManager extends PackageManager {
}
@Override
public void installPackage(Uri packageURI, IPackageInstallObserver observer, int flags,
String installerPackageName) {
installCommon(packageURI, new LegacyPackageInstallObserver(observer), flags,
installerPackageName, mContext.getUserId());
}
@Override
public void installPackage(Uri packageURI, PackageInstallObserver observer,
int flags, String installerPackageName) {
installCommon(packageURI, observer, flags, installerPackageName, mContext.getUserId());
}
private void installCommon(Uri packageURI,
PackageInstallObserver observer, int flags, String installerPackageName,
int userId) {
public void installPackage(Uri packageURI,
PackageInstallObserver observer, int flags, String installerPackageName) {
if (!"file".equals(packageURI.getScheme())) {
throw new UnsupportedOperationException("Only file:// URIs are supported");
}
@@ -1703,7 +1689,7 @@ public class ApplicationPackageManager extends PackageManager {
final String originPath = packageURI.getPath();
try {
mPM.installPackageAsUser(originPath, observer.getBinder(), flags, installerPackageName,
userId);
mContext.getUserId());
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}

View File

@@ -1,27 +0,0 @@
/*
**
** Copyright 2007, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
package android.content.pm;
/**
* API for installation callbacks from the Package Manager.
* @hide
*/
oneway interface IPackageInstallObserver {
void packageInstalled(in String packageName, int returnCode);
}

View File

@@ -871,8 +871,8 @@ public abstract class PackageManager {
public static final int INSTALL_REASON_USER = 4;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} on success.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* on success.
*
* @hide
*/
@@ -880,8 +880,8 @@ public abstract class PackageManager {
public static final int INSTALL_SUCCEEDED = 1;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the package is already installed.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the package is already installed.
*
* @hide
*/
@@ -889,8 +889,8 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_ALREADY_EXISTS = -1;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the package archive file is invalid.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the package archive file is invalid.
*
* @hide
*/
@@ -898,8 +898,8 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_INVALID_APK = -2;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the URI passed in is invalid.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the URI passed in is invalid.
*
* @hide
*/
@@ -907,9 +907,9 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_INVALID_URI = -3;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the package manager service found that
* the device didn't have enough storage space to install the app.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the package manager service found that the device didn't have enough storage space to
* install the app.
*
* @hide
*/
@@ -917,9 +917,8 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_INSUFFICIENT_STORAGE = -4;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if a package is already installed with
* the same name.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if a package is already installed with the same name.
*
* @hide
*/
@@ -927,9 +926,8 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_DUPLICATE_PACKAGE = -5;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the requested shared user does not
* exist.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the requested shared user does not exist.
*
* @hide
*/
@@ -937,10 +935,9 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_NO_SHARED_USER = -6;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if a previously installed package of the
* same name has a different signature than the new package (and the old
* package's data was not removed).
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if a previously installed package of the same name has a different signature than the new
* package (and the old package's data was not removed).
*
* @hide
*/
@@ -948,10 +945,9 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_UPDATE_INCOMPATIBLE = -7;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the new package is requested a shared
* user which is already installed on the device and does not have matching
* signature.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the new package is requested a shared user which is already installed on the device and
* does not have matching signature.
*
* @hide
*/
@@ -959,9 +955,8 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_SHARED_USER_INCOMPATIBLE = -8;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the new package uses a shared library
* that is not available.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the new package uses a shared library that is not available.
*
* @hide
*/
@@ -969,9 +964,8 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_MISSING_SHARED_LIBRARY = -9;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the new package uses a shared library
* that is not available.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the new package uses a shared library that is not available.
*
* @hide
*/
@@ -979,10 +973,9 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_REPLACE_COULDNT_DELETE = -10;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the new package failed while
* optimizing and validating its dex files, either because there was not
* enough storage or the validation failed.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the new package failed while optimizing and validating its dex files, either because there
* was not enough storage or the validation failed.
*
* @hide
*/
@@ -990,9 +983,9 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_DEXOPT = -11;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the new package failed because the
* current SDK version is older than that required by the package.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the new package failed because the current SDK version is older than that required by the
* package.
*
* @hide
*/
@@ -1000,10 +993,9 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_OLDER_SDK = -12;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the new package failed because it
* contains a content provider with the same authority as a provider already
* installed in the system.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the new package failed because it contains a content provider with the same authority as a
* provider already installed in the system.
*
* @hide
*/
@@ -1011,9 +1003,9 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_CONFLICTING_PROVIDER = -13;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the new package failed because the
* current SDK version is newer than that required by the package.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the new package failed because the current SDK version is newer than that required by the
* package.
*
* @hide
*/
@@ -1021,10 +1013,9 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_NEWER_SDK = -14;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the new package failed because it has
* specified that it is a test-only package and the caller has not supplied
* the {@link #INSTALL_ALLOW_TEST} flag.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the new package failed because it has specified that it is a test-only package and the
* caller has not supplied the {@link #INSTALL_ALLOW_TEST} flag.
*
* @hide
*/
@@ -1032,9 +1023,9 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_TEST_ONLY = -15;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the package being installed contains
* native code, but none that is compatible with the device's CPU_ABI.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the package being installed contains native code, but none that is compatible with the
* device's CPU_ABI.
*
* @hide
*/
@@ -1042,9 +1033,8 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_CPU_ABI_INCOMPATIBLE = -16;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the new package uses a feature that is
* not available.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the new package uses a feature that is not available.
*
* @hide
*/
@@ -1053,9 +1043,9 @@ public abstract class PackageManager {
// ------ Errors related to sdcard
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if a secure container mount point
* couldn't be accessed on external media.
* Installation return code: this is passed in the
* {@link PackageInstaller#EXTRA_LEGACY_STATUS} if a secure container mount point couldn't be
* accessed on external media.
*
* @hide
*/
@@ -1063,9 +1053,8 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_CONTAINER_ERROR = -18;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the new package couldn't be installed
* in the specified install location.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the new package couldn't be installed in the specified install location.
*
* @hide
*/
@@ -1073,9 +1062,9 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_INVALID_INSTALL_LOCATION = -19;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the new package couldn't be installed
* in the specified install location because the media is not available.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the new package couldn't be installed in the specified install location because the media
* is not available.
*
* @hide
*/
@@ -1083,9 +1072,8 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_MEDIA_UNAVAILABLE = -20;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the new package couldn't be installed
* because the verification timed out.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the new package couldn't be installed because the verification timed out.
*
* @hide
*/
@@ -1093,9 +1081,8 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_VERIFICATION_TIMEOUT = -21;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the new package couldn't be installed
* because the verification did not succeed.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the new package couldn't be installed because the verification did not succeed.
*
* @hide
*/
@@ -1103,9 +1090,8 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_VERIFICATION_FAILURE = -22;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the package changed from what the
* calling program expected.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the package changed from what the calling program expected.
*
* @hide
*/
@@ -1113,28 +1099,25 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_PACKAGE_CHANGED = -23;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the new package is assigned a
* different UID than it previously held.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the new package is assigned a different UID than it previously held.
*
* @hide
*/
public static final int INSTALL_FAILED_UID_CHANGED = -24;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the new package has an older version
* code than the currently installed package.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the new package has an older version code than the currently installed package.
*
* @hide
*/
public static final int INSTALL_FAILED_VERSION_DOWNGRADE = -25;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the old package has target SDK high
* enough to support runtime permission and the new package has target SDK
* low enough to not support runtime permissions.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the old package has target SDK high enough to support runtime permission and the new
* package has target SDK low enough to not support runtime permissions.
*
* @hide
*/
@@ -1142,9 +1125,8 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_PERMISSION_MODEL_DOWNGRADE = -26;
/**
* Installation return code: this is passed to the
* {@link IPackageInstallObserver} if the new package attempts to downgrade the
* target sandbox version of the app.
* Installation return code: this is passed in the {@link PackageInstaller#EXTRA_LEGACY_STATUS}
* if the new package attempts to downgrade the target sandbox version of the app.
*
* @hide
*/
@@ -1152,9 +1134,9 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_SANDBOX_VERSION_DOWNGRADE = -27;
/**
* Installation parse return code: this is passed to the
* {@link IPackageInstallObserver} if the parser was given a path that is
* not a file, or does not end with the expected '.apk' extension.
* Installation parse return code: this is passed in the
* {@link PackageInstaller#EXTRA_LEGACY_STATUS} if the parser was given a path that is not a
* file, or does not end with the expected '.apk' extension.
*
* @hide
*/
@@ -1162,8 +1144,8 @@ public abstract class PackageManager {
public static final int INSTALL_PARSE_FAILED_NOT_APK = -100;
/**
* Installation parse return code: this is passed to the
* {@link IPackageInstallObserver} if the parser was unable to retrieve the
* Installation parse return code: this is passed in the
* {@link PackageInstaller#EXTRA_LEGACY_STATUS} if the parser was unable to retrieve the
* AndroidManifest.xml file.
*
* @hide
@@ -1172,8 +1154,8 @@ public abstract class PackageManager {
public static final int INSTALL_PARSE_FAILED_BAD_MANIFEST = -101;
/**
* Installation parse return code: this is passed to the
* {@link IPackageInstallObserver} if the parser encountered an unexpected
* Installation parse return code: this is passed in the
* {@link PackageInstaller#EXTRA_LEGACY_STATUS} if the parser encountered an unexpected
* exception.
*
* @hide
@@ -1182,9 +1164,9 @@ public abstract class PackageManager {
public static final int INSTALL_PARSE_FAILED_UNEXPECTED_EXCEPTION = -102;
/**
* Installation parse return code: this is passed to the
* {@link IPackageInstallObserver} if the parser did not find any
* certificates in the .apk.
* Installation parse return code: this is passed in the
* {@link PackageInstaller#EXTRA_LEGACY_STATUS} if the parser did not find any certificates in
* the .apk.
*
* @hide
*/
@@ -1192,9 +1174,9 @@ public abstract class PackageManager {
public static final int INSTALL_PARSE_FAILED_NO_CERTIFICATES = -103;
/**
* Installation parse return code: this is passed to the
* {@link IPackageInstallObserver} if the parser found inconsistent
* certificates on the files in the .apk.
* Installation parse return code: this is passed in the
* {@link PackageInstaller#EXTRA_LEGACY_STATUS} if the parser found inconsistent certificates on
* the files in the .apk.
*
* @hide
*/
@@ -1202,8 +1184,8 @@ public abstract class PackageManager {
public static final int INSTALL_PARSE_FAILED_INCONSISTENT_CERTIFICATES = -104;
/**
* Installation parse return code: this is passed to the
* {@link IPackageInstallObserver} if the parser encountered a
* Installation parse return code: this is passed in the
* {@link PackageInstaller#EXTRA_LEGACY_STATUS} if the parser encountered a
* CertificateEncodingException in one of the files in the .apk.
*
* @hide
@@ -1212,9 +1194,9 @@ public abstract class PackageManager {
public static final int INSTALL_PARSE_FAILED_CERTIFICATE_ENCODING = -105;
/**
* Installation parse return code: this is passed to the
* {@link IPackageInstallObserver} if the parser encountered a bad or
* missing package name in the manifest.
* Installation parse return code: this is passed in the
* {@link PackageInstaller#EXTRA_LEGACY_STATUS} if the parser encountered a bad or missing
* package name in the manifest.
*
* @hide
*/
@@ -1222,9 +1204,9 @@ public abstract class PackageManager {
public static final int INSTALL_PARSE_FAILED_BAD_PACKAGE_NAME = -106;
/**
* Installation parse return code: this is passed to the
* {@link IPackageInstallObserver} if the parser encountered a bad shared
* user id name in the manifest.
* Installation parse return code: tthis is passed in the
* {@link PackageInstaller#EXTRA_LEGACY_STATUS} if the parser encountered a bad shared user id
* name in the manifest.
*
* @hide
*/
@@ -1232,8 +1214,8 @@ public abstract class PackageManager {
public static final int INSTALL_PARSE_FAILED_BAD_SHARED_USER_ID = -107;
/**
* Installation parse return code: this is passed to the
* {@link IPackageInstallObserver} if the parser encountered some structural
* Installation parse return code: this is passed in the
* {@link PackageInstaller#EXTRA_LEGACY_STATUS} if the parser encountered some structural
* problem in the manifest.
*
* @hide
@@ -1242,9 +1224,9 @@ public abstract class PackageManager {
public static final int INSTALL_PARSE_FAILED_MANIFEST_MALFORMED = -108;
/**
* Installation parse return code: this is passed to the
* {@link IPackageInstallObserver} if the parser did not find any actionable
* tags (instrumentation or application) in the manifest.
* Installation parse return code: this is passed in the
* {@link PackageInstaller#EXTRA_LEGACY_STATUS} if the parser did not find any actionable tags
* (instrumentation or application) in the manifest.
*
* @hide
*/
@@ -1252,9 +1234,9 @@ public abstract class PackageManager {
public static final int INSTALL_PARSE_FAILED_MANIFEST_EMPTY = -109;
/**
* Installation failed return code: this is passed to the
* {@link IPackageInstallObserver} if the system failed to install the
* package because of system issues.
* Installation failed return code: this is passed in the
* {@link PackageInstaller#EXTRA_LEGACY_STATUS} if the system failed to install the package
* because of system issues.
*
* @hide
*/
@@ -1262,24 +1244,23 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_INTERNAL_ERROR = -110;
/**
* Installation failed return code: this is passed to the
* {@link IPackageInstallObserver} if the system failed to install the
* package because the user is restricted from installing apps.
* Installation failed return code: this is passed in the
* {@link PackageInstaller#EXTRA_LEGACY_STATUS} if the system failed to install the package
* because the user is restricted from installing apps.
*
* @hide
*/
public static final int INSTALL_FAILED_USER_RESTRICTED = -111;
/**
* Installation failed return code: this is passed to the
* {@link IPackageInstallObserver} if the system failed to install the
* package because it is attempting to define a permission that is already
* defined by some existing package.
* Installation failed return code: this is passed in the
* {@link PackageInstaller#EXTRA_LEGACY_STATUS} if the system failed to install the package
* because it is attempting to define a permission that is already defined by some existing
* package.
* <p>
* The package name of the app which has already defined the permission is
* passed to a {@link PackageInstallObserver}, if any, as the
* {@link #EXTRA_FAILURE_EXISTING_PACKAGE} string extra; and the name of the
* permission being redefined is passed in the
* The package name of the app which has already defined the permission is passed to a
* {@link PackageInstallObserver}, if any, as the {@link #EXTRA_FAILURE_EXISTING_PACKAGE} string
* extra; and the name of the permission being redefined is passed in the
* {@link #EXTRA_FAILURE_EXISTING_PERMISSION} string extra.
*
* @hide
@@ -1287,10 +1268,9 @@ public abstract class PackageManager {
public static final int INSTALL_FAILED_DUPLICATE_PERMISSION = -112;
/**
* Installation failed return code: this is passed to the
* {@link IPackageInstallObserver} if the system failed to install the
* package because its packaged native code did not match any of the ABIs
* supported by the system.
* Installation failed return code: this is passed in the
* {@link PackageInstaller#EXTRA_LEGACY_STATUS} if the system failed to install the package
* because its packaged native code did not match any of the ABIs supported by the system.
*
* @hide
*/
@@ -4711,16 +4691,6 @@ public abstract class PackageManager {
}
}
/**
* @deprecated replaced by {@link PackageInstaller}
* @hide
*/
@Deprecated
public abstract void installPackage(
Uri packageURI,
IPackageInstallObserver observer,
@InstallFlags int flags,
String installerPackageName);
/**
* @deprecated replaced by {@link PackageInstaller}
* @hide
@@ -5742,25 +5712,6 @@ public abstract class PackageManager {
}
}
/** {@hide} */
public static class LegacyPackageInstallObserver extends PackageInstallObserver {
private final IPackageInstallObserver mLegacy;
public LegacyPackageInstallObserver(IPackageInstallObserver legacy) {
mLegacy = legacy;
}
@Override
public void onPackageInstalled(String basePackageName, int returnCode, String msg,
Bundle extras) {
if (mLegacy == null) return;
try {
mLegacy.packageInstalled(basePackageName, returnCode);
} catch (RemoteException ignored) {
}
}
}
/** {@hide} */
public static class LegacyPackageDeleteObserver extends PackageDeleteObserver {
private final IPackageDeleteObserver mLegacy;

View File

@@ -11,7 +11,6 @@ import android.content.pm.ChangedPackages;
import android.content.pm.FeatureInfo;
import android.content.pm.IPackageDataObserver;
import android.content.pm.IPackageDeleteObserver;
import android.content.pm.IPackageInstallObserver;
import android.content.pm.IPackageStatsObserver;
import android.content.pm.InstantAppInfo;
import android.content.pm.InstrumentationInfo;
@@ -622,12 +621,6 @@ public class PackageManagerStub extends PackageManager {
return null;
}
@Override
public void installPackage(Uri packageURI, IPackageInstallObserver observer, int flags,
String installerPackageName) {
}
@Override
public void installPackage(Uri packageURI, PackageInstallObserver observer, int flags,
String installerPackageName) {

View File

@@ -344,7 +344,6 @@ package android.test.mock {
method public int installExistingPackage(java.lang.String) throws android.content.pm.PackageManager.NameNotFoundException;
method public int installExistingPackage(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
method public int installExistingPackageAsUser(java.lang.String, int) throws android.content.pm.PackageManager.NameNotFoundException;
method public void installPackage(android.net.Uri, android.content.pm.IPackageInstallObserver, int, java.lang.String);
method public void installPackage(android.net.Uri, android.app.PackageInstallObserver, int, java.lang.String);
method public boolean isInstantApp();
method public boolean isInstantApp(java.lang.String);

View File

@@ -26,12 +26,11 @@ import android.content.IntentSender;
import android.content.pm.ActivityInfo;
import android.content.pm.ApplicationInfo;
import android.content.pm.ChangedPackages;
import android.content.pm.InstantAppInfo;
import android.content.pm.FeatureInfo;
import android.content.pm.IPackageDataObserver;
import android.content.pm.IPackageDeleteObserver;
import android.content.pm.IPackageInstallObserver;
import android.content.pm.IPackageStatsObserver;
import android.content.pm.InstantAppInfo;
import android.content.pm.InstrumentationInfo;
import android.content.pm.IntentFilterVerificationInfo;
import android.content.pm.KeySet;
@@ -653,15 +652,6 @@ public class MockPackageManager extends PackageManager {
throw new UnsupportedOperationException();
}
/**
* @hide - to match hiding in superclass
*/
@Override
public void installPackage(Uri packageURI, IPackageInstallObserver observer,
int flags, String installerPackageName) {
throw new UnsupportedOperationException();
}
@Override
public void setInstallerPackageName(String targetPackage,
String installerPackageName) {