Loading core/java/android/content/pm/PackageInstaller.java +5 −2 Original line number Diff line number Diff line Loading @@ -53,10 +53,12 @@ import android.os.SystemProperties; import android.os.UserHandle; import android.system.ErrnoException; import android.system.Os; import android.text.TextUtils; import android.util.ArraySet; import android.util.ExceptionUtils; import com.android.internal.util.IndentingPrintWriter; import com.android.internal.util.Preconditions; import com.android.internal.util.function.pooled.PooledLambda; import java.io.Closeable; Loading Loading @@ -1349,12 +1351,13 @@ public class PackageInstaller { * * @throws PackageManager.NameNotFoundException if the new owner could not be found. * @throws SecurityException if called after the session has been committed or abandoned. * @throws IllegalArgumentException if streams opened through * @throws IllegalStateException if streams opened through * {@link #openWrite(String, long, long) are still open. * @throws IllegalArgumentException if {@code packageName} is invalid. */ public void transfer(@NonNull String packageName) throws PackageManager.NameNotFoundException { Objects.requireNonNull(packageName); Preconditions.checkArgument(!TextUtils.isEmpty(packageName)); try { mSession.transfer(packageName); Loading services/core/java/com/android/server/pm/PackageInstallerSession.java +2 −2 Original line number Diff line number Diff line Loading @@ -1805,7 +1805,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { @Override public void transfer(String packageName) { Objects.requireNonNull(packageName); Preconditions.checkArgument(!TextUtils.isEmpty(packageName)); ApplicationInfo newOwnerAppInfo = mPm.getApplicationInfo(packageName, 0, userId); if (newOwnerAppInfo == null) { Loading @@ -1831,7 +1831,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { try { sealLocked(); } catch (PackageManagerException e) { throw new IllegalArgumentException("Package is not valid", e); throw new IllegalStateException("Package is not valid", e); } mInstallerUid = newOwnerAppInfo.uid; Loading Loading
core/java/android/content/pm/PackageInstaller.java +5 −2 Original line number Diff line number Diff line Loading @@ -53,10 +53,12 @@ import android.os.SystemProperties; import android.os.UserHandle; import android.system.ErrnoException; import android.system.Os; import android.text.TextUtils; import android.util.ArraySet; import android.util.ExceptionUtils; import com.android.internal.util.IndentingPrintWriter; import com.android.internal.util.Preconditions; import com.android.internal.util.function.pooled.PooledLambda; import java.io.Closeable; Loading Loading @@ -1349,12 +1351,13 @@ public class PackageInstaller { * * @throws PackageManager.NameNotFoundException if the new owner could not be found. * @throws SecurityException if called after the session has been committed or abandoned. * @throws IllegalArgumentException if streams opened through * @throws IllegalStateException if streams opened through * {@link #openWrite(String, long, long) are still open. * @throws IllegalArgumentException if {@code packageName} is invalid. */ public void transfer(@NonNull String packageName) throws PackageManager.NameNotFoundException { Objects.requireNonNull(packageName); Preconditions.checkArgument(!TextUtils.isEmpty(packageName)); try { mSession.transfer(packageName); Loading
services/core/java/com/android/server/pm/PackageInstallerSession.java +2 −2 Original line number Diff line number Diff line Loading @@ -1805,7 +1805,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { @Override public void transfer(String packageName) { Objects.requireNonNull(packageName); Preconditions.checkArgument(!TextUtils.isEmpty(packageName)); ApplicationInfo newOwnerAppInfo = mPm.getApplicationInfo(packageName, 0, userId); if (newOwnerAppInfo == null) { Loading @@ -1831,7 +1831,7 @@ public class PackageInstallerSession extends IPackageInstallerSession.Stub { try { sealLocked(); } catch (PackageManagerException e) { throw new IllegalArgumentException("Package is not valid", e); throw new IllegalStateException("Package is not valid", e); } mInstallerUid = newOwnerAppInfo.uid; Loading