| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
package android.content.res; |
| 18 |
|
| 19 |
import android.compat.annotation.UnsupportedAppUsage; |
| 20 |
import android.os.Build; |
| 21 |
import android.os.Parcel; |
| 22 |
import android.os.Parcelable; |
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
public class ObbInfo implements Parcelable { |
| 30 |
|
| 31 |
public static final int OBB_OVERLAY = 1 << 0; |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
public String filename; |
| 37 |
|
| 38 |
|
| 39 |
|
| 40 |
|
| 41 |
public String packageName; |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
public int version; |
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
public int flags; |
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
@UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 170729553) |
| 59 |
public byte[] salt; |
| 60 |
|
| 61 |
|
| 62 |
ObbInfo() { |
| 63 |
} |
| 64 |
|
| 65 |
public String toString() { |
| 66 |
StringBuilder sb = new StringBuilder(); |
| 67 |
sb.append("ObbInfo{"); |
| 68 |
sb.append(Integer.toHexString(System.identityHashCode(this))); |
| 69 |
sb.append(" packageName="); |
| 70 |
sb.append(packageName); |
| 71 |
sb.append(",version="); |
| 72 |
sb.append(version); |
| 73 |
sb.append(",flags="); |
| 74 |
sb.append(flags); |
| 75 |
sb.append('}'); |
| 76 |
return sb.toString(); |
| 77 |
} |
| 78 |
|
| 79 |
public int describeContents() { |
| 80 |
return 0; |
| 81 |
} |
| 82 |
|
| 83 |
public void writeToParcel(Parcel dest, int parcelableFlags) { |
| 84 |
|
| 85 |
dest.writeString(filename); |
| 86 |
dest.writeString(packageName); |
| 87 |
dest.writeInt(version); |
| 88 |
dest.writeInt(flags); |
| 89 |
dest.writeByteArray(salt); |
| 90 |
} |
| 91 |
|
| 92 |
public static final @android.annotation.NonNull Parcelable.Creator<ObbInfo> CREATOR |
| 93 |
= new Parcelable.Creator<ObbInfo>() { |
| 94 |
public ObbInfo createFromParcel(Parcel source) { |
| 95 |
return new ObbInfo(source); |
| 96 |
} |
| 97 |
|
| 98 |
public ObbInfo[] newArray(int size) { |
| 99 |
return new ObbInfo[size]; |
| 100 |
} |
| 101 |
}; |
| 102 |
|
| 103 |
private ObbInfo(Parcel source) { |
| 104 |
filename = source.readString(); |
| 105 |
packageName = source.readString(); |
| 106 |
version = source.readInt(); |
| 107 |
flags = source.readInt(); |
| 108 |
salt = source.createByteArray(); |
| 109 |
} |
| 110 |
} |