Merge commit '821afa9aec8d3a4ffd2e72ce797d8097eaf13973' * commit '821afa9aec8d3a4ffd2e72ce797d8097eaf13973': Add OBB flags to support overlays
This commit is contained in:
@@ -25,6 +25,9 @@ import android.os.Parcelable;
|
||||
* @hide
|
||||
*/
|
||||
public class ObbInfo implements Parcelable {
|
||||
/** Flag noting that this OBB is an overlay patch for a base OBB. */
|
||||
public static final int OBB_OVERLAY = 1 << 0;
|
||||
|
||||
/**
|
||||
* The name of the package to which the OBB file belongs.
|
||||
*/
|
||||
@@ -35,13 +38,26 @@ public class ObbInfo implements Parcelable {
|
||||
*/
|
||||
public int version;
|
||||
|
||||
/**
|
||||
* The flags relating to the OBB.
|
||||
*/
|
||||
public int flags;
|
||||
|
||||
public ObbInfo() {
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "ObbInfo{"
|
||||
+ Integer.toHexString(System.identityHashCode(this))
|
||||
+ " packageName=" + packageName + ",version=" + version + "}";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append("ObbInfo{");
|
||||
sb.append(Integer.toHexString(System.identityHashCode(this)));
|
||||
sb.append(" packageName=");
|
||||
sb.append(packageName);
|
||||
sb.append(",version=");
|
||||
sb.append(version);
|
||||
sb.append(",flags=");
|
||||
sb.append(flags);
|
||||
sb.append('}');
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
public int describeContents() {
|
||||
@@ -51,6 +67,7 @@ public class ObbInfo implements Parcelable {
|
||||
public void writeToParcel(Parcel dest, int parcelableFlags) {
|
||||
dest.writeString(packageName);
|
||||
dest.writeInt(version);
|
||||
dest.writeInt(flags);
|
||||
}
|
||||
|
||||
public static final Parcelable.Creator<ObbInfo> CREATOR
|
||||
@@ -67,5 +84,6 @@ public class ObbInfo implements Parcelable {
|
||||
private ObbInfo(Parcel source) {
|
||||
packageName = source.readString();
|
||||
version = source.readInt();
|
||||
flags = source.readInt();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -295,6 +295,8 @@ public class StorageManager
|
||||
* file matches a package ID that is owned by the calling program's UID.
|
||||
* That is, shared UID applications can obtain access to any other
|
||||
* application's OBB that shares its UID.
|
||||
* <p>
|
||||
* STOPSHIP document more; discuss lack of guarantees of security
|
||||
*
|
||||
* @param filename the path to the OBB file
|
||||
* @param key decryption key
|
||||
@@ -319,6 +321,8 @@ public class StorageManager
|
||||
* file matches a package ID that is owned by the calling program's UID.
|
||||
* That is, shared UID applications can obtain access to any other
|
||||
* application's OBB that shares its UID.
|
||||
* <p>
|
||||
* STOPSHIP document more; discuss lack of guarantees of security
|
||||
*
|
||||
* @param filename path to the OBB file
|
||||
* @param force whether to kill any programs using this in order to unmount
|
||||
|
||||
Reference in New Issue
Block a user