summaryrefslogtreecommitdiffstats
path: root/core/java/android/content/ContextWrapper.java
diff options
context:
space:
mode:
authorDianne Hackborn <hackbod@google.com>2009-06-18 17:10:57 -0700
committerDianne Hackborn <hackbod@google.com>2009-06-18 17:10:57 -0700
commit5c1e00b14d2ef10ec76abf3e951fa8003a67f558 (patch)
treefa723a6f96f5b977dfdfdc08b5b8aab98c20d500 /core/java/android/content/ContextWrapper.java
parente748161ca89867e8c57d4e71c780486d4de8039c (diff)
downloadframeworks_base-5c1e00b14d2ef10ec76abf3e951fa8003a67f558.zip
frameworks_base-5c1e00b14d2ef10ec76abf3e951fa8003a67f558.tar.gz
frameworks_base-5c1e00b14d2ef10ec76abf3e951fa8003a67f558.tar.bz2
Fix targetSdkVersion, make resize mode a flag, delayed dexopt, easy ApplicationInfo.
- Fix a bug where targetSdkVersion could not be set if minSdkVersion. Stupid, stupid. Also make sure to fail if minSdkVersion is for a code name. Really stupid. - Change the API for resize compatibility mode to be a bit in the flags field, instead of a separate boolean. - Implement delayed dexopting, to avoid the looong full dexopt during boot. This is only enabled for "eng" builds. When in this mode, the activity manager will make sure that a dexopt has been done before loading an .apk into a process, and will try to avoid displaying ANRs if they are due to the dexopt causing some operation to take longer than it normally would (though I make no guarantees about this totally working). - Add API to Context to get the ApplicationInfo for its package, for easy access to things like targetSdkVersion.
Diffstat (limited to 'core/java/android/content/ContextWrapper.java')
-rw-r--r--core/java/android/content/ContextWrapper.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/java/android/content/ContextWrapper.java b/core/java/android/content/ContextWrapper.java
index 262204e..7513b3b 100644
--- a/core/java/android/content/ContextWrapper.java
+++ b/core/java/android/content/ContextWrapper.java
@@ -16,6 +16,7 @@
package android.content;
+import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.res.AssetManager;
import android.content.res.Resources;
@@ -120,6 +121,11 @@ public class ContextWrapper extends Context {
}
@Override
+ public ApplicationInfo getApplicationInfo() {
+ return mBase.getApplicationInfo();
+ }
+
+ @Override
public String getPackageResourcePath() {
return mBase.getPackageResourcePath();
}