public class com.android.internal.content.PackageHelper
minor version: 0
major version: 59
flags: flags: (0x0021) ACC_PUBLIC, ACC_SUPER
this_class: com.android.internal.content.PackageHelper
super_class: java.lang.Object
{
public static final int RECOMMEND_INSTALL_INTERNAL;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 1
public static final int RECOMMEND_INSTALL_EXTERNAL;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 2
public static final int RECOMMEND_INSTALL_EPHEMERAL;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 3
public static final int RECOMMEND_FAILED_INSUFFICIENT_STORAGE;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: -1
public static final int RECOMMEND_FAILED_INVALID_APK;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: -2
public static final int RECOMMEND_FAILED_INVALID_LOCATION;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: -3
public static final int RECOMMEND_FAILED_ALREADY_EXISTS;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: -4
public static final int RECOMMEND_MEDIA_UNAVAILABLE;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: -5
public static final int RECOMMEND_FAILED_INVALID_URI;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: -6
public static final int RECOMMEND_FAILED_VERSION_DOWNGRADE;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: -7
private static final java.lang.String TAG;
descriptor: Ljava/lang/String;
flags: (0x001a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL
ConstantValue: "PackageHelper"
public static final int APP_INSTALL_AUTO;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 0
public static final int APP_INSTALL_INTERNAL;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 1
public static final int APP_INSTALL_EXTERNAL;
descriptor: I
flags: (0x0019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL
ConstantValue: 2
private static com.android.internal.content.PackageHelper$TestableInterface sDefaultTestableInterface;
descriptor: Lcom/android/internal/content/PackageHelper$TestableInterface;
flags: (0x000a) ACC_PRIVATE, ACC_STATIC
static void <clinit>();
descriptor: ()V
flags: (0x0008) ACC_STATIC
Code:
stack=1, locals=0, args_size=0
0: aconst_null
putstatic com.android.internal.content.PackageHelper.sDefaultTestableInterface:Lcom/android/internal/content/PackageHelper$TestableInterface;
return
LocalVariableTable:
Start End Slot Name Signature
public void <init>();
descriptor: ()V
flags: (0x0001) ACC_PUBLIC
Code:
stack=1, locals=1, args_size=1
start local 0 0: aload 0
invokespecial java.lang.Object.<init>:()V
return
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 this Lcom/android/internal/content/PackageHelper;
public static android.os.storage.IStorageManager getStorageManager();
descriptor: ()Landroid/os/storage/IStorageManager;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=1, args_size=0
0: ldc "mount"
invokestatic android.os.ServiceManager.getService:(Ljava/lang/String;)Landroid/os/IBinder;
astore 0
start local 0 1: aload 0
ifnull 3
2: aload 0
invokestatic android.os.storage.IStorageManager$Stub.asInterface:(Landroid/os/IBinder;)Landroid/os/storage/IStorageManager;
areturn
3: StackMap locals: android.os.IBinder
StackMap stack:
ldc "PackageHelper"
ldc "Can't get storagemanager service"
invokestatic android.util.Log.e:(Ljava/lang/String;Ljava/lang/String;)I
pop
4: new android.os.RemoteException
dup
ldc "Could not contact storagemanager service"
invokespecial android.os.RemoteException.<init>:(Ljava/lang/String;)V
athrow
end local 0 LocalVariableTable:
Start End Slot Name Signature
1 5 0 service Landroid/os/IBinder;
Exceptions:
throws android.os.RemoteException
private static synchronized com.android.internal.content.PackageHelper$TestableInterface getDefaultTestableInterface();
descriptor: ()Lcom/android/internal/content/PackageHelper$TestableInterface;
flags: (0x002a) ACC_PRIVATE, ACC_STATIC, ACC_SYNCHRONIZED
Code:
stack=2, locals=0, args_size=0
0: getstatic com.android.internal.content.PackageHelper.sDefaultTestableInterface:Lcom/android/internal/content/PackageHelper$TestableInterface;
ifnonnull 2
1: new com.android.internal.content.PackageHelper$1
dup
invokespecial com.android.internal.content.PackageHelper$1.<init>:()V
putstatic com.android.internal.content.PackageHelper.sDefaultTestableInterface:Lcom/android/internal/content/PackageHelper$TestableInterface;
2: StackMap locals:
StackMap stack:
getstatic com.android.internal.content.PackageHelper.sDefaultTestableInterface:Lcom/android/internal/content/PackageHelper$TestableInterface;
areturn
LocalVariableTable:
Start End Slot Name Signature
public static java.lang.String resolveInstallVolume(android.content.Context, java.lang.String, int, long, com.android.internal.content.PackageHelper$TestableInterface);
descriptor: (Landroid/content/Context;Ljava/lang/String;IJLcom/android/internal/content/PackageHelper$TestableInterface;)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=7, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 5 0: new android.content.pm.PackageInstaller$SessionParams
dup
iconst_m1
invokespecial android.content.pm.PackageInstaller$SessionParams.<init>:(I)V
astore 6
start local 6 1: aload 6
aload 1
putfield android.content.pm.PackageInstaller$SessionParams.appPackageName:Ljava/lang/String;
2: aload 6
iload 2
putfield android.content.pm.PackageInstaller$SessionParams.installLocation:I
3: aload 6
lload 3
putfield android.content.pm.PackageInstaller$SessionParams.sizeBytes:J
4: aload 0
aload 6
aload 5
invokestatic com.android.internal.content.PackageHelper.resolveInstallVolume:(Landroid/content/Context;Landroid/content/pm/PackageInstaller$SessionParams;Lcom/android/internal/content/PackageHelper$TestableInterface;)Ljava/lang/String;
areturn
end local 6 end local 5 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 context Landroid/content/Context;
0 5 1 packageName Ljava/lang/String;
0 5 2 installLocation I
0 5 3 sizeBytes J
0 5 5 testInterface Lcom/android/internal/content/PackageHelper$TestableInterface;
1 5 6 params Landroid/content/pm/PackageInstaller$SessionParams;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
java.lang.Deprecated()
RuntimeInvisibleAnnotations:
com.android.internal.annotations.VisibleForTesting()
RuntimeInvisibleTypeAnnotations:
METHOD_RETURN
com.android.internal.annotations.VisibleForTesting()
MethodParameters:
Name Flags
context
packageName
installLocation
sizeBytes
testInterface
public static java.lang.String resolveInstallVolume(android.content.Context, android.content.pm.PackageInstaller$SessionParams);
descriptor: (Landroid/content/Context;Landroid/content/pm/PackageInstaller$SessionParams;)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=3, args_size=2
start local 0 start local 1 0: invokestatic com.android.internal.content.PackageHelper.getDefaultTestableInterface:()Lcom/android/internal/content/PackageHelper$TestableInterface;
astore 2
start local 2 1: aload 0
aload 1
getfield android.content.pm.PackageInstaller$SessionParams.appPackageName:Ljava/lang/String;
aload 1
getfield android.content.pm.PackageInstaller$SessionParams.installLocation:I
2: aload 1
getfield android.content.pm.PackageInstaller$SessionParams.sizeBytes:J
aload 2
3: invokestatic com.android.internal.content.PackageHelper.resolveInstallVolume:(Landroid/content/Context;Ljava/lang/String;IJLcom/android/internal/content/PackageHelper$TestableInterface;)Ljava/lang/String;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 4 0 context Landroid/content/Context;
0 4 1 params Landroid/content/pm/PackageInstaller$SessionParams;
1 4 2 testableInterface Lcom/android/internal/content/PackageHelper$TestableInterface;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
context
params
public static java.lang.String resolveInstallVolume(android.content.Context, android.content.pm.PackageInstaller$SessionParams, com.android.internal.content.PackageHelper$TestableInterface);
descriptor: (Landroid/content/Context;Landroid/content/pm/PackageInstaller$SessionParams;Lcom/android/internal/content/PackageHelper$TestableInterface;)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=18, args_size=3
start local 0 start local 1 start local 2 0: aload 2
aload 0
invokevirtual com.android.internal.content.PackageHelper$TestableInterface.getStorageManager:(Landroid/content/Context;)Landroid/os/storage/StorageManager;
astore 3
start local 3 1: aload 2
aload 0
invokevirtual com.android.internal.content.PackageHelper$TestableInterface.getForceAllowOnExternalSetting:(Landroid/content/Context;)Z
istore 4
start local 4 2: aload 2
aload 0
invokevirtual com.android.internal.content.PackageHelper$TestableInterface.getAllow3rdPartyOnInternalConfig:(Landroid/content/Context;)Z
3: istore 5
start local 5 4: aload 2
aload 0
5: aload 1
getfield android.content.pm.PackageInstaller$SessionParams.appPackageName:Ljava/lang/String;
6: invokevirtual com.android.internal.content.PackageHelper$TestableInterface.getExistingAppInfo:(Landroid/content/Context;Ljava/lang/String;)Landroid/content/pm/ApplicationInfo;
astore 6
start local 6 7: new android.util.ArraySet
dup
invokespecial android.util.ArraySet.<init>:()V
astore 7
start local 7 8: iconst_0
istore 8
start local 8 9: aconst_null
astore 9
start local 9 10: ldc -9223372036854775808
lstore 10
start local 10 11: aload 3
invokevirtual android.os.storage.StorageManager.getVolumes:()Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 13
goto 29
StackMap locals: android.content.Context android.content.pm.PackageInstaller$SessionParams com.android.internal.content.PackageHelper$TestableInterface android.os.storage.StorageManager int int android.content.pm.ApplicationInfo android.util.ArraySet int android.os.storage.VolumeInfo long top java.util.Iterator
StackMap stack:
12: aload 13
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast android.os.storage.VolumeInfo
astore 12
start local 12 13: aload 12
getfield android.os.storage.VolumeInfo.type:I
iconst_1
if_icmpne 29
aload 12
invokevirtual android.os.storage.VolumeInfo.isMountedWritable:()Z
ifeq 29
14: ldc "private"
aload 12
getfield android.os.storage.VolumeInfo.id:Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
istore 14
start local 14 15: aload 3
new java.io.File
dup
aload 12
getfield android.os.storage.VolumeInfo.path:Ljava/lang/String;
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
invokevirtual android.os.storage.StorageManager.getUuidForPath:(Ljava/io/File;)Ljava/util/UUID;
astore 15
start local 15 16: aload 3
aload 15
17: aload 1
getfield android.content.pm.PackageInstaller$SessionParams.installFlags:I
invokestatic com.android.internal.content.PackageHelper.translateAllocateFlags:(I)I
18: invokevirtual android.os.storage.StorageManager.getAllocatableBytes:(Ljava/util/UUID;I)J
lstore 16
start local 16 19: iload 14
ifeq 23
20: aload 1
getfield android.content.pm.PackageInstaller$SessionParams.sizeBytes:J
lload 16
lcmp
ifgt 21
iconst_1
goto 22
StackMap locals: android.content.Context android.content.pm.PackageInstaller$SessionParams com.android.internal.content.PackageHelper$TestableInterface android.os.storage.StorageManager int int android.content.pm.ApplicationInfo android.util.ArraySet int android.os.storage.VolumeInfo long android.os.storage.VolumeInfo java.util.Iterator int java.util.UUID long
StackMap stack:
21: iconst_0
StackMap locals:
StackMap stack: int
22: istore 8
23: StackMap locals:
StackMap stack:
iload 14
ifeq 24
iload 5
ifeq 29
24: StackMap locals:
StackMap stack:
lload 16
aload 1
getfield android.content.pm.PackageInstaller$SessionParams.sizeBytes:J
lcmp
iflt 26
25: aload 7
aload 12
getfield android.os.storage.VolumeInfo.fsUuid:Ljava/lang/String;
invokevirtual android.util.ArraySet.add:(Ljava/lang/Object;)Z
pop
26: StackMap locals:
StackMap stack:
lload 16
lload 10
lcmp
iflt 29
27: aload 12
astore 9
28: lload 16
lstore 10
end local 16 end local 15 end local 14 end local 12 29: StackMap locals: android.content.Context android.content.pm.PackageInstaller$SessionParams com.android.internal.content.PackageHelper$TestableInterface android.os.storage.StorageManager int int android.content.pm.ApplicationInfo android.util.ArraySet int android.os.storage.VolumeInfo long top java.util.Iterator
StackMap stack:
aload 13
invokeinterface java.util.Iterator.hasNext:()Z
ifne 12
30: aload 6
ifnull 37
aload 6
invokevirtual android.content.pm.ApplicationInfo.isSystemApp:()Z
ifeq 37
31: iload 8
ifeq 33
32: getstatic android.os.storage.StorageManager.UUID_PRIVATE_INTERNAL:Ljava/lang/String;
areturn
33: StackMap locals: android.content.Context android.content.pm.PackageInstaller$SessionParams com.android.internal.content.PackageHelper$TestableInterface android.os.storage.StorageManager int int android.content.pm.ApplicationInfo android.util.ArraySet int android.os.storage.VolumeInfo long
StackMap stack:
new java.io.IOException
dup
new java.lang.StringBuilder
dup
ldc "Not enough space on existing volume "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
34: aload 6
getfield android.content.pm.ApplicationInfo.volumeUuid:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " for system app "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 1
getfield android.content.pm.PackageInstaller$SessionParams.appPackageName:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
35: ldc " upgrade"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
36: invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
37: StackMap locals:
StackMap stack:
iload 4
ifne 51
38: aload 1
getfield android.content.pm.PackageInstaller$SessionParams.installLocation:I
iconst_1
if_icmpne 51
39: aload 6
ifnull 46
aload 6
getfield android.content.pm.ApplicationInfo.volumeUuid:Ljava/lang/String;
40: getstatic android.os.storage.StorageManager.UUID_PRIVATE_INTERNAL:Ljava/lang/String;
41: invokestatic java.util.Objects.equals:(Ljava/lang/Object;Ljava/lang/Object;)Z
42: ifne 46
43: new java.io.IOException
dup
new java.lang.StringBuilder
dup
ldc "Cannot automatically move "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 1
getfield android.content.pm.PackageInstaller$SessionParams.appPackageName:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
44: ldc " from "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 6
getfield android.content.pm.ApplicationInfo.volumeUuid:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " to internal storage"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
45: invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
46: StackMap locals:
StackMap stack:
iload 5
ifne 48
47: new java.io.IOException
dup
ldc "Not allowed to install non-system apps on internal storage"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
48: StackMap locals:
StackMap stack:
iload 8
ifeq 50
49: getstatic android.os.storage.StorageManager.UUID_PRIVATE_INTERNAL:Ljava/lang/String;
areturn
50: StackMap locals:
StackMap stack:
new java.io.IOException
dup
ldc "Requested internal only, but not enough space"
invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
51: StackMap locals:
StackMap stack:
aload 6
ifnull 60
52: aload 6
getfield android.content.pm.ApplicationInfo.volumeUuid:Ljava/lang/String;
getstatic android.os.storage.StorageManager.UUID_PRIVATE_INTERNAL:Ljava/lang/String;
invokestatic java.util.Objects.equals:(Ljava/lang/Object;Ljava/lang/Object;)Z
ifeq 55
53: iload 8
ifeq 55
54: getstatic android.os.storage.StorageManager.UUID_PRIVATE_INTERNAL:Ljava/lang/String;
areturn
55: StackMap locals:
StackMap stack:
aload 7
aload 6
getfield android.content.pm.ApplicationInfo.volumeUuid:Ljava/lang/String;
invokevirtual android.util.ArraySet.contains:(Ljava/lang/Object;)Z
ifeq 57
56: aload 6
getfield android.content.pm.ApplicationInfo.volumeUuid:Ljava/lang/String;
areturn
57: StackMap locals:
StackMap stack:
new java.io.IOException
dup
new java.lang.StringBuilder
dup
ldc "Not enough space on existing volume "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
58: aload 6
getfield android.content.pm.ApplicationInfo.volumeUuid:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " for "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 1
getfield android.content.pm.PackageInstaller$SessionParams.appPackageName:Ljava/lang/String;
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " upgrade"
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
59: invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
60: StackMap locals:
StackMap stack:
aload 9
ifnull 62
61: aload 9
getfield android.os.storage.VolumeInfo.fsUuid:Ljava/lang/String;
areturn
62: StackMap locals:
StackMap stack:
new java.io.IOException
dup
new java.lang.StringBuilder
dup
ldc "No special requests, but no room on allowed volumes. allow3rdPartyOnInternal? "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
63: iload 5
invokevirtual java.lang.StringBuilder.append:(Z)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
64: invokespecial java.io.IOException.<init>:(Ljava/lang/String;)V
athrow
end local 10 end local 9 end local 8 end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 65 0 context Landroid/content/Context;
0 65 1 params Landroid/content/pm/PackageInstaller$SessionParams;
0 65 2 testInterface Lcom/android/internal/content/PackageHelper$TestableInterface;
1 65 3 storageManager Landroid/os/storage/StorageManager;
2 65 4 forceAllowOnExternal Z
4 65 5 allow3rdPartyOnInternal Z
7 65 6 existingInfo Landroid/content/pm/ApplicationInfo;
8 65 7 allCandidates Landroid/util/ArraySet<Ljava/lang/String;>;
9 65 8 fitsOnInternal Z
10 65 9 bestCandidate Landroid/os/storage/VolumeInfo;
11 65 10 bestCandidateAvailBytes J
13 29 12 vol Landroid/os/storage/VolumeInfo;
15 29 14 isInternalStorage Z
16 29 15 target Ljava/util/UUID;
19 29 16 availBytes J
Exceptions:
throws java.io.IOException
RuntimeInvisibleAnnotations:
com.android.internal.annotations.VisibleForTesting()
RuntimeInvisibleTypeAnnotations:
METHOD_RETURN
com.android.internal.annotations.VisibleForTesting()
MethodParameters:
Name Flags
context
params
testInterface
public static boolean fitsOnInternal(android.content.Context, android.content.pm.PackageInstaller$SessionParams);
descriptor: (Landroid/content/Context;Landroid/content/pm/PackageInstaller$SessionParams;)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=5, locals=4, args_size=2
start local 0 start local 1 0: aload 0
ldc Landroid/os/storage/StorageManager;
invokevirtual android.content.Context.getSystemService:(Ljava/lang/Class;)Ljava/lang/Object;
checkcast android.os.storage.StorageManager
astore 2
start local 2 1: aload 2
invokestatic android.os.Environment.getDataDirectory:()Ljava/io/File;
invokevirtual android.os.storage.StorageManager.getUuidForPath:(Ljava/io/File;)Ljava/util/UUID;
astore 3
start local 3 2: aload 1
getfield android.content.pm.PackageInstaller$SessionParams.sizeBytes:J
aload 2
aload 3
3: aload 1
getfield android.content.pm.PackageInstaller$SessionParams.installFlags:I
invokestatic com.android.internal.content.PackageHelper.translateAllocateFlags:(I)I
4: invokevirtual android.os.storage.StorageManager.getAllocatableBytes:(Ljava/util/UUID;I)J
lcmp
ifgt 5
iconst_1
ireturn
StackMap locals: android.os.storage.StorageManager java.util.UUID
StackMap stack:
5: iconst_0
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 6 0 context Landroid/content/Context;
0 6 1 params Landroid/content/pm/PackageInstaller$SessionParams;
1 6 2 storage Landroid/os/storage/StorageManager;
2 6 3 target Ljava/util/UUID;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
context
params
public static boolean fitsOnExternal(android.content.Context, android.content.pm.PackageInstaller$SessionParams);
descriptor: (Landroid/content/Context;Landroid/content/pm/PackageInstaller$SessionParams;)Z
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=4, args_size=2
start local 0 start local 1 0: aload 0
ldc Landroid/os/storage/StorageManager;
invokevirtual android.content.Context.getSystemService:(Ljava/lang/Class;)Ljava/lang/Object;
checkcast android.os.storage.StorageManager
astore 2
start local 2 1: aload 2
invokevirtual android.os.storage.StorageManager.getPrimaryVolume:()Landroid/os/storage/StorageVolume;
astore 3
start local 3 2: aload 1
getfield android.content.pm.PackageInstaller$SessionParams.sizeBytes:J
lconst_0
lcmp
ifle 6
aload 3
invokevirtual android.os.storage.StorageVolume.isEmulated:()Z
ifne 6
3: ldc "mounted"
aload 3
invokevirtual android.os.storage.StorageVolume.getState:()Ljava/lang/String;
invokevirtual java.lang.String.equals:(Ljava/lang/Object;)Z
ifeq 6
4: aload 1
getfield android.content.pm.PackageInstaller$SessionParams.sizeBytes:J
aload 2
aload 3
invokevirtual android.os.storage.StorageVolume.getPathFile:()Ljava/io/File;
invokevirtual android.os.storage.StorageManager.getStorageBytesUntilLow:(Ljava/io/File;)J
5: lcmp
ifgt 6
iconst_1
ireturn
StackMap locals: android.os.storage.StorageManager android.os.storage.StorageVolume
StackMap stack:
6: iconst_0
ireturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 7 0 context Landroid/content/Context;
0 7 1 params Landroid/content/pm/PackageInstaller$SessionParams;
1 7 2 storage Landroid/os/storage/StorageManager;
2 7 3 primary Landroid/os/storage/StorageVolume;
MethodParameters:
Name Flags
context
params
public static int resolveInstallLocation(android.content.Context, java.lang.String, int, long, int);
descriptor: (Landroid/content/Context;Ljava/lang/String;IJI)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=8, args_size=5
start local 0 start local 1 start local 2 start local 3 start local 5 0: new android.content.pm.PackageInstaller$SessionParams
dup
iconst_m1
invokespecial android.content.pm.PackageInstaller$SessionParams.<init>:(I)V
astore 6
start local 6 1: aload 6
aload 1
putfield android.content.pm.PackageInstaller$SessionParams.appPackageName:Ljava/lang/String;
2: aload 6
iload 2
putfield android.content.pm.PackageInstaller$SessionParams.installLocation:I
3: aload 6
lload 3
putfield android.content.pm.PackageInstaller$SessionParams.sizeBytes:J
4: aload 6
iload 5
putfield android.content.pm.PackageInstaller$SessionParams.installFlags:I
5: aload 0
aload 6
invokestatic com.android.internal.content.PackageHelper.resolveInstallLocation:(Landroid/content/Context;Landroid/content/pm/PackageInstaller$SessionParams;)I
6: ireturn
7: StackMap locals: android.content.Context java.lang.String int long int android.content.pm.PackageInstaller$SessionParams
StackMap stack: java.io.IOException
astore 7
start local 7 8: new java.lang.IllegalStateException
dup
aload 7
invokespecial java.lang.IllegalStateException.<init>:(Ljava/lang/Throwable;)V
athrow
end local 7 end local 6 end local 5 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 context Landroid/content/Context;
0 9 1 packageName Ljava/lang/String;
0 9 2 installLocation I
0 9 3 sizeBytes J
0 9 5 installFlags I
1 9 6 params Landroid/content/pm/PackageInstaller$SessionParams;
8 9 7 e Ljava/io/IOException;
Exception table:
from to target type
5 6 7 Class java.io.IOException
RuntimeVisibleAnnotations:
java.lang.Deprecated()
MethodParameters:
Name Flags
context
packageName
installLocation
sizeBytes
installFlags
public static int resolveInstallLocation(android.content.Context, android.content.pm.PackageInstaller$SessionParams);
descriptor: (Landroid/content/Context;Landroid/content/pm/PackageInstaller$SessionParams;)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=8, args_size=2
start local 0 start local 1 0: aconst_null
astore 2
start local 2 1: aload 0
invokevirtual android.content.Context.getPackageManager:()Landroid/content/pm/PackageManager;
aload 1
getfield android.content.pm.PackageInstaller$SessionParams.appPackageName:Ljava/lang/String;
2: ldc 4194304
3: invokevirtual android.content.pm.PackageManager.getApplicationInfo:(Ljava/lang/String;I)Landroid/content/pm/ApplicationInfo;
astore 2
4: goto 6
StackMap locals: android.content.Context android.content.pm.PackageInstaller$SessionParams android.content.pm.ApplicationInfo
StackMap stack: android.content.pm.PackageManager$NameNotFoundException
5: pop
6: StackMap locals:
StackMap stack:
iconst_0
istore 5
start local 5 7: aload 1
getfield android.content.pm.PackageInstaller$SessionParams.installFlags:I
sipush 2048
iand
ifeq 12
8: iconst_1
istore 3
start local 3 9: iconst_1
istore 5
10: iconst_0
istore 4
start local 4 11: goto 40
end local 4 end local 3 StackMap locals: android.content.Context android.content.pm.PackageInstaller$SessionParams android.content.pm.ApplicationInfo top top int
StackMap stack:
12: aload 1
getfield android.content.pm.PackageInstaller$SessionParams.installFlags:I
bipush 16
iand
ifeq 16
13: iconst_1
istore 3
start local 3 14: iconst_0
istore 4
start local 4 15: goto 40
end local 4 end local 3 StackMap locals:
StackMap stack:
16: aload 1
getfield android.content.pm.PackageInstaller$SessionParams.installFlags:I
bipush 8
iand
ifeq 20
17: iconst_2
istore 3
start local 3 18: iconst_0
istore 4
start local 4 19: goto 40
end local 4 end local 3 StackMap locals:
StackMap stack:
20: aload 1
getfield android.content.pm.PackageInstaller$SessionParams.installLocation:I
iconst_1
if_icmpne 24
21: iconst_1
istore 3
start local 3 22: iconst_0
istore 4
start local 4 23: goto 40
end local 4 end local 3 StackMap locals:
StackMap stack:
24: aload 1
getfield android.content.pm.PackageInstaller$SessionParams.installLocation:I
iconst_2
if_icmpne 28
25: iconst_2
istore 3
start local 3 26: iconst_1
istore 4
start local 4 27: goto 40
end local 4 end local 3 StackMap locals:
StackMap stack:
28: aload 1
getfield android.content.pm.PackageInstaller$SessionParams.installLocation:I
ifne 38
29: aload 2
ifnull 35
30: aload 2
getfield android.content.pm.ApplicationInfo.flags:I
ldc 262144
iand
ifeq 33
31: iconst_2
istore 3
start local 3 32: goto 36
end local 3 33: StackMap locals:
StackMap stack:
iconst_1
istore 3
start local 3 34: goto 36
end local 3 35: StackMap locals:
StackMap stack:
iconst_1
istore 3
start local 3 36: StackMap locals: android.content.Context android.content.pm.PackageInstaller$SessionParams android.content.pm.ApplicationInfo int top int
StackMap stack:
iconst_1
istore 4
start local 4 37: goto 40
end local 4 end local 3 38: StackMap locals: android.content.Context android.content.pm.PackageInstaller$SessionParams android.content.pm.ApplicationInfo top top int
StackMap stack:
iconst_1
istore 3
start local 3 39: iconst_0
istore 4
start local 4 40: StackMap locals: android.content.Context android.content.pm.PackageInstaller$SessionParams android.content.pm.ApplicationInfo int int int
StackMap stack:
iconst_0
istore 6
start local 6 41: iload 4
ifne 42
iload 3
iconst_1
if_icmpne 43
42: StackMap locals: int
StackMap stack:
aload 0
aload 1
invokestatic com.android.internal.content.PackageHelper.fitsOnInternal:(Landroid/content/Context;Landroid/content/pm/PackageInstaller$SessionParams;)Z
istore 6
43: StackMap locals:
StackMap stack:
iconst_0
istore 7
start local 7 44: iload 4
ifne 45
iload 3
iconst_2
if_icmpne 46
45: StackMap locals: int
StackMap stack:
aload 0
aload 1
invokestatic com.android.internal.content.PackageHelper.fitsOnExternal:(Landroid/content/Context;Landroid/content/pm/PackageInstaller$SessionParams;)Z
istore 7
46: StackMap locals:
StackMap stack:
iload 3
iconst_1
if_icmpne 52
47: iload 6
ifeq 55
48: iload 5
ifeq 50
49: iconst_3
goto 51
50: StackMap locals:
StackMap stack:
iconst_1
51: StackMap locals:
StackMap stack: int
ireturn
52: StackMap locals:
StackMap stack:
iload 3
iconst_2
if_icmpne 55
53: iload 7
ifeq 55
54: iconst_2
ireturn
55: StackMap locals:
StackMap stack:
iload 4
ifeq 60
56: iload 6
ifeq 58
57: iconst_1
ireturn
58: StackMap locals:
StackMap stack:
iload 7
ifeq 60
59: iconst_2
ireturn
60: StackMap locals:
StackMap stack:
iconst_m1
ireturn
end local 7 end local 6 end local 5 end local 4 end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 61 0 context Landroid/content/Context;
0 61 1 params Landroid/content/pm/PackageInstaller$SessionParams;
1 61 2 existingInfo Landroid/content/pm/ApplicationInfo;
9 12 3 prefer I
14 16 3 prefer I
18 20 3 prefer I
22 24 3 prefer I
26 28 3 prefer I
32 33 3 prefer I
34 35 3 prefer I
36 38 3 prefer I
39 61 3 prefer I
11 12 4 checkBoth Z
15 16 4 checkBoth Z
19 20 4 checkBoth Z
23 24 4 checkBoth Z
27 28 4 checkBoth Z
37 38 4 checkBoth Z
40 61 4 checkBoth Z
7 61 5 ephemeral Z
41 61 6 fitsOnInternal Z
44 61 7 fitsOnExternal Z
Exception table:
from to target type
1 4 5 Class android.content.pm.PackageManager$NameNotFoundException
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
context
params
public static long calculateInstalledSize(android.content.pm.PackageParser$PackageLite, boolean, java.lang.String);
descriptor: (Landroid/content/pm/PackageParser$PackageLite;ZLjava/lang/String;)J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 2
invokestatic com.android.internal.content.PackageHelper.calculateInstalledSize:(Landroid/content/pm/PackageParser$PackageLite;Ljava/lang/String;)J
lreturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 pkg Landroid/content/pm/PackageParser$PackageLite;
0 1 1 isForwardLocked Z
0 1 2 abiOverride Ljava/lang/String;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
java.lang.Deprecated()
MethodParameters:
Name Flags
pkg
isForwardLocked
abiOverride
public static long calculateInstalledSize(android.content.pm.PackageParser$PackageLite, java.lang.String);
descriptor: (Landroid/content/pm/PackageParser$PackageLite;Ljava/lang/String;)J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=2, args_size=2
start local 0 start local 1 0: aload 0
aload 1
aconst_null
invokestatic com.android.internal.content.PackageHelper.calculateInstalledSize:(Landroid/content/pm/PackageParser$PackageLite;Ljava/lang/String;Ljava/io/FileDescriptor;)J
lreturn
end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 pkg Landroid/content/pm/PackageParser$PackageLite;
0 1 1 abiOverride Ljava/lang/String;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
pkg
abiOverride
public static long calculateInstalledSize(android.content.pm.PackageParser$PackageLite, java.lang.String, java.io.FileDescriptor);
descriptor: (Landroid/content/pm/PackageParser$PackageLite;Ljava/lang/String;Ljava/io/FileDescriptor;)J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=3, args_size=3
0: new java.lang.Error
dup
ldc "Unresolved compilation problem: \n\tIoUtils cannot be resolved\n"
invokespecial java.lang.Error.<init>:(Ljava/lang/String;)V
athrow
LocalVariableTable:
Start End Slot Name Signature
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
pkg
abiOverride
fd
public static long calculateInstalledSize(android.content.pm.PackageParser$PackageLite, boolean, com.android.internal.content.NativeLibraryHelper$Handle, java.lang.String);
descriptor: (Landroid/content/pm/PackageParser$PackageLite;ZLcom/android/internal/content/NativeLibraryHelper$Handle;Ljava/lang/String;)J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=3, locals=4, args_size=4
start local 0 start local 1 start local 2 start local 3 0: aload 0
aload 2
aload 3
invokestatic com.android.internal.content.PackageHelper.calculateInstalledSize:(Landroid/content/pm/PackageParser$PackageLite;Lcom/android/internal/content/NativeLibraryHelper$Handle;Ljava/lang/String;)J
lreturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 1 0 pkg Landroid/content/pm/PackageParser$PackageLite;
0 1 1 isForwardLocked Z
0 1 2 handle Lcom/android/internal/content/NativeLibraryHelper$Handle;
0 1 3 abiOverride Ljava/lang/String;
Exceptions:
throws java.io.IOException
RuntimeVisibleAnnotations:
java.lang.Deprecated()
MethodParameters:
Name Flags
pkg
isForwardLocked
handle
abiOverride
public static long calculateInstalledSize(android.content.pm.PackageParser$PackageLite, com.android.internal.content.NativeLibraryHelper$Handle, java.lang.String);
descriptor: (Landroid/content/pm/PackageParser$PackageLite;Lcom/android/internal/content/NativeLibraryHelper$Handle;Ljava/lang/String;)J
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=4, locals=8, args_size=3
start local 0 start local 1 start local 2 0: lconst_0
lstore 3
start local 3 1: aload 0
invokevirtual android.content.pm.PackageParser$PackageLite.getAllCodePaths:()Ljava/util/List;
invokeinterface java.util.List.iterator:()Ljava/util/Iterator;
astore 6
goto 5
StackMap locals: android.content.pm.PackageParser$PackageLite com.android.internal.content.NativeLibraryHelper$Handle java.lang.String long top java.util.Iterator
StackMap stack:
2: aload 6
invokeinterface java.util.Iterator.next:()Ljava/lang/Object;
checkcast java.lang.String
astore 5
start local 5 3: new java.io.File
dup
aload 5
invokespecial java.io.File.<init>:(Ljava/lang/String;)V
astore 7
start local 7 4: lload 3
aload 7
invokevirtual java.io.File.length:()J
ladd
lstore 3
end local 7 end local 5 5: StackMap locals:
StackMap stack:
aload 6
invokeinterface java.util.Iterator.hasNext:()Z
ifne 2
6: lload 3
aload 0
invokestatic android.content.pm.dex.DexMetadataHelper.getPackageDexMetadataSize:(Landroid/content/pm/PackageParser$PackageLite;)J
ladd
lstore 3
7: lload 3
aload 1
aload 2
invokestatic com.android.internal.content.NativeLibraryHelper.sumNativeBinariesWithOverride:(Lcom/android/internal/content/NativeLibraryHelper$Handle;Ljava/lang/String;)J
ladd
lstore 3
8: lload 3
lreturn
end local 3 end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 9 0 pkg Landroid/content/pm/PackageParser$PackageLite;
0 9 1 handle Lcom/android/internal/content/NativeLibraryHelper$Handle;
0 9 2 abiOverride Ljava/lang/String;
1 9 3 sizeBytes J
3 5 5 codePath Ljava/lang/String;
4 5 7 codeFile Ljava/io/File;
Exceptions:
throws java.io.IOException
MethodParameters:
Name Flags
pkg
handle
abiOverride
public static java.lang.String replaceEnd(java.lang.String, java.lang.String, java.lang.String);
descriptor: (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=6, locals=3, args_size=3
start local 0 start local 1 start local 2 0: aload 0
aload 1
invokevirtual java.lang.String.endsWith:(Ljava/lang/String;)Z
ifne 4
1: new java.lang.IllegalArgumentException
dup
2: new java.lang.StringBuilder
dup
ldc "Expected "
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 0
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
ldc " to end with "
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
aload 1
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
3: invokespecial java.lang.IllegalArgumentException.<init>:(Ljava/lang/String;)V
athrow
4: StackMap locals:
StackMap stack:
new java.lang.StringBuilder
dup
aload 0
iconst_0
aload 0
invokevirtual java.lang.String.length:()I
aload 1
invokevirtual java.lang.String.length:()I
isub
invokevirtual java.lang.String.substring:(II)Ljava/lang/String;
invokestatic java.lang.String.valueOf:(Ljava/lang/Object;)Ljava/lang/String;
invokespecial java.lang.StringBuilder.<init>:(Ljava/lang/String;)V
aload 2
invokevirtual java.lang.StringBuilder.append:(Ljava/lang/String;)Ljava/lang/StringBuilder;
invokevirtual java.lang.StringBuilder.toString:()Ljava/lang/String;
areturn
end local 2 end local 1 end local 0 LocalVariableTable:
Start End Slot Name Signature
0 5 0 str Ljava/lang/String;
0 5 1 before Ljava/lang/String;
0 5 2 after Ljava/lang/String;
MethodParameters:
Name Flags
str
before
after
public static int translateAllocateFlags(int);
descriptor: (I)I
flags: (0x0009) ACC_PUBLIC, ACC_STATIC
Code:
stack=2, locals=1, args_size=1
start local 0 0: iload 0
ldc 32768
iand
ifeq 2
1: iconst_1
ireturn
2: StackMap locals:
StackMap stack:
iconst_0
ireturn
end local 0 LocalVariableTable:
Start End Slot Name Signature
0 3 0 installFlags I
MethodParameters:
Name Flags
installFlags
}
SourceFile: "PackageHelper.java"
NestMembers:
com.android.internal.content.PackageHelper$1 com.android.internal.content.PackageHelper$TestableInterface
InnerClasses:
public SessionParams = android.content.pm.PackageInstaller$SessionParams of android.content.pm.PackageInstaller
public NameNotFoundException = android.content.pm.PackageManager$NameNotFoundException of android.content.pm.PackageManager
public PackageLite = android.content.pm.PackageParser$PackageLite of android.content.pm.PackageParser
public abstract Stub = android.os.storage.IStorageManager$Stub of android.os.storage.IStorageManager
public Handle = com.android.internal.content.NativeLibraryHelper$Handle of com.android.internal.content.NativeLibraryHelper
com.android.internal.content.PackageHelper$1
public abstract TestableInterface = com.android.internal.content.PackageHelper$TestableInterface of com.android.internal.content.PackageHelper