Merge "OBB API for PackageManager" into gingerbread

This commit is contained in:
Kenny Root
2010-07-07 18:14:25 -07:00
committed by Android (Google) Code Review
6 changed files with 75 additions and 0 deletions

View File

@@ -2657,6 +2657,15 @@ class ContextImpl extends Context {
return PackageManager.COMPONENT_ENABLED_STATE_DEFAULT;
}
@Override
public void setPackageObbPath(String packageName, String path) {
try {
mPM.setPackageObbPath(packageName, path);
} catch (RemoteException e) {
// Should never happen!
}
}
private final ContextImpl mContext;
private final IPackageManager mPM;

View File

@@ -319,4 +319,6 @@ interface IPackageManager {
boolean setInstallLocation(int loc);
int getInstallLocation();
void setPackageObbPath(String packageName, String path);
}

View File

@@ -2193,4 +2193,17 @@ public abstract class PackageManager {
*/
public abstract void movePackage(
String packageName, IPackageMoveObserver observer, int flags);
/**
* Sets the Opaque Binary Blob (OBB) file location.
* <p>
* NOTE: The existence or format of this file is not currently checked, but
* it may be in the future.
*
* @param packageName Name of the package with which to associate the .obb
* file
* @param path Path on the filesystem to the .obb file
* @hide
*/
public abstract void setPackageObbPath(String packageName, String path);
}