summaryrefslogtreecommitdiffstats
path: root/core/java/android/app
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2011-01-16 18:30:29 -0800
committerDianne Hackborn <hackbod@google.com>2011-01-16 18:43:04 -0800
commit805fd7ee0e5dc2939e85c84f78d9890a51982bc0 (patch)
treee2487cd3d7917fa6a126463e2cc5771295544627 /core/java/android/app
parentcf18c4788af740773c9b2720a1c4ed5f45454b8e (diff)
downloadframeworks_base-805fd7ee0e5dc2939e85c84f78d9890a51982bc0.zip
frameworks_base-805fd7ee0e5dc2939e85c84f78d9890a51982bc0.tar.gz
frameworks_base-805fd7ee0e5dc2939e85c84f78d9890a51982bc0.tar.bz2
Add API to get path to OBBs.
Also hide the bitmap thumbnail stuff, we can't support it in its current form. And fix some bugs with propagating paths to native code. Yikes! Change-Id: I13ab37ddbdba5c073489cba5eab035117d3c1574
Diffstat (limited to 'core/java/android/app')
-rw-r--r--core/java/android/app/ActivityManager.java10
-rw-r--r--core/java/android/app/ContextImpl.java12
-rw-r--r--core/java/android/app/NativeActivity.java4
3 files changed, 20 insertions, 6 deletions
diff --git a/core/java/android/app/ActivityManager.java b/core/java/android/app/ActivityManager.java
index 4eae14b..d5aa961 100644
--- a/core/java/android/app/ActivityManager.java
+++ b/core/java/android/app/ActivityManager.java
@@ -122,6 +122,8 @@ public class ActivityManager {
/**
* Thumbnail representation of the task's last state. Must
* use {@link ActivityManager#TASKS_GET_THUMBNAILS} to have this set.
+ * @hide -- this is not scalable, need to have a separate API to get
+ * the bitmap.
*/
public Bitmap thumbnail;
@@ -203,6 +205,7 @@ public class ActivityManager {
/**
* Flag for use with {@link #getRecentTasks}: also return the thumbnail
* bitmap (if available) for each recent task.
+ * @hide
*/
public static final int TASKS_GET_THUMBNAILS = 0x0001000;
@@ -214,8 +217,7 @@ public class ActivityManager {
* actual number returned may be smaller, depending on how many tasks the
* user has started and the maximum number the system can remember.
* @param flags Information about what to return. May be any combination
- * of {@link #RECENT_WITH_EXCLUDED}, {@link #RECENT_IGNORE_UNAVAILABLE},
- * and {@link #TASKS_GET_THUMBNAILS}.
+ * of {@link #RECENT_WITH_EXCLUDED} and {@link #RECENT_IGNORE_UNAVAILABLE}.
*
* @return Returns a list of RecentTaskInfo records describing each of
* the recent tasks.
@@ -261,8 +263,8 @@ public class ActivityManager {
public ComponentName topActivity;
/**
- * Thumbnail representation of the task's current state. Must
- * use {@link ActivityManager#TASKS_GET_THUMBNAILS} to have this set.
+ * Thumbnail representation of the task's current state. Currently
+ * always null.
*/
public Bitmap thumbnail;
diff --git a/core/java/android/app/ContextImpl.java b/core/java/android/app/ContextImpl.java
index e133ea0..6f63990 100644
--- a/core/java/android/app/ContextImpl.java
+++ b/core/java/android/app/ContextImpl.java
@@ -153,6 +153,7 @@ class ContextImpl extends Context {
private File mPreferencesDir;
private File mFilesDir;
private File mCacheDir;
+ private File mObbDir;
private File mExternalFilesDir;
private File mExternalCacheDir;
@@ -647,6 +648,17 @@ class ContextImpl extends Context {
}
@Override
+ public File getObbDir() {
+ synchronized (mSync) {
+ if (mObbDir == null) {
+ mObbDir = Environment.getExternalStorageAppObbDirectory(
+ getPackageName());
+ }
+ return mObbDir;
+ }
+ }
+
+ @Override
public File getCacheDir() {
synchronized (mSync) {
if (mCacheDir == null) {
diff --git a/core/java/android/app/NativeActivity.java b/core/java/android/app/NativeActivity.java
index a5c49ec..35cc324 100644
--- a/core/java/android/app/NativeActivity.java
+++ b/core/java/android/app/NativeActivity.java
@@ -84,7 +84,7 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback2,
private boolean mDestroyed;
private native int loadNativeCode(String path, String funcname, MessageQueue queue,
- String internalDataPath, String externalDataPath, int sdkVersion,
+ String internalDataPath, String obbPath, String externalDataPath, int sdkVersion,
AssetManager assetMgr, byte[] savedState);
private native void unloadNativeCode(int handle);
@@ -191,7 +191,7 @@ public class NativeActivity extends Activity implements SurfaceHolder.Callback2,
? savedInstanceState.getByteArray(KEY_NATIVE_SAVED_STATE) : null;
mNativeHandle = loadNativeCode(path, funcname, Looper.myQueue(),
- getFilesDir().toString(),
+ getFilesDir().toString(), getObbDir().toString(),
Environment.getExternalStorageAppFilesDirectory(ai.packageName).toString(),
Build.VERSION.SDK_INT, getAssets(), nativeSavedState);