Merge changes from topic "rename-updatable-pi-apis"
* changes: Use renamed APIs per API Council review Rename APIs per API Council review
This commit is contained in:
@@ -12202,7 +12202,6 @@ package android.content.pm {
|
||||
method @Nullable public String getInstallerAttributionTag();
|
||||
method @Nullable public String getInstallerPackageName();
|
||||
method public int getInstallerUid();
|
||||
method @NonNull public boolean getIsPreApprovalRequested();
|
||||
method public int getMode();
|
||||
method public int getOriginatingUid();
|
||||
method @Nullable public android.net.Uri getOriginatingUri();
|
||||
@@ -12222,6 +12221,7 @@ package android.content.pm {
|
||||
method public boolean isApplicationEnabledSettingPersistent();
|
||||
method public boolean isCommitted();
|
||||
method public boolean isMultiPackage();
|
||||
method public boolean isPreApprovalRequested();
|
||||
method public boolean isRequestUpdateOwnership();
|
||||
method public boolean isSealed();
|
||||
method public boolean isStaged();
|
||||
|
||||
@@ -3586,7 +3586,7 @@ package android.content.pm {
|
||||
}
|
||||
|
||||
public class PackageInstaller {
|
||||
method @NonNull public android.content.pm.PackageInstaller.InstallInfo getInstallInfo(@NonNull java.io.File, int) throws android.content.pm.PackageInstaller.PackageParsingException;
|
||||
method @NonNull public android.content.pm.PackageInstaller.InstallInfo readInstallInfo(@NonNull java.io.File, int) throws android.content.pm.PackageInstaller.PackageParsingException;
|
||||
method @RequiresPermission(android.Manifest.permission.INSTALL_PACKAGES) public void setPermissionsResult(int, boolean);
|
||||
field public static final String ACTION_CONFIRM_INSTALL = "android.content.pm.action.CONFIRM_INSTALL";
|
||||
field public static final String ACTION_CONFIRM_PRE_APPROVAL = "android.content.pm.action.CONFIRM_PRE_APPROVAL";
|
||||
|
||||
@@ -2042,7 +2042,7 @@ public class PackageInstaller {
|
||||
*/
|
||||
@SystemApi
|
||||
@NonNull
|
||||
public InstallInfo getInstallInfo(@NonNull File file, int flags)
|
||||
public InstallInfo readInstallInfo(@NonNull File file, int flags)
|
||||
throws PackageParsingException {
|
||||
final ParseTypeImpl input = ParseTypeImpl.forDefaultParsing();
|
||||
final ParseResult<PackageLite> result = ApkLiteParseUtils.parsePackageLite(
|
||||
@@ -3740,7 +3740,7 @@ public class PackageInstaller {
|
||||
/**
|
||||
* Returns whether this session has requested user pre-approval.
|
||||
*/
|
||||
public @NonNull boolean getIsPreApprovalRequested() {
|
||||
public boolean isPreApprovalRequested() {
|
||||
return isPreapprovalRequested;
|
||||
}
|
||||
|
||||
|
||||
2
packages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java
Executable file → Normal file
2
packages/PackageInstaller/src/com/android/packageinstaller/InstallInstalling.java
Executable file → Normal file
@@ -141,7 +141,7 @@ public class InstallInstalling extends AlertActivity {
|
||||
File file = new File(mPackageURI.getPath());
|
||||
try {
|
||||
final InstallInfo result = getPackageManager().getPackageInstaller()
|
||||
.getInstallInfo(file, 0);
|
||||
.readInstallInfo(file, 0);
|
||||
params.setAppPackageName(result.getPackageName());
|
||||
params.setInstallLocation(result.getInstallLocation());
|
||||
try {
|
||||
|
||||
@@ -392,7 +392,7 @@ public class PackageInstallerActivity extends AlertActivity {
|
||||
final int sessionId = intent.getIntExtra(PackageInstaller.EXTRA_SESSION_ID,
|
||||
-1 /* defaultValue */);
|
||||
final SessionInfo info = mInstaller.getSessionInfo(sessionId);
|
||||
if (info == null || !info.getIsPreApprovalRequested()) {
|
||||
if (info == null || !info.isPreApprovalRequested()) {
|
||||
Log.w(TAG, "Session " + mSessionId + " in funky state; ignoring");
|
||||
finish();
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user