summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/ApplicationContext.java
diff options
context:
space:
mode:
authorJean-Baptiste Queru <jbq@google.com>2009-07-31 17:38:20 -0700
committerJean-Baptiste Queru <jbq@google.com>2009-07-31 17:38:20 -0700
commit5c1207be90fdf296c1b83034b7c68915e1749284 (patch)
treee5679f6183458d8179821d5615dabafcb959704d /core/java/android/app/ApplicationContext.java
parenta8675f67e33bc7337d148358783b0fd138b501ff (diff)
downloadframeworks_base-5c1207be90fdf296c1b83034b7c68915e1749284.zip
frameworks_base-5c1207be90fdf296c1b83034b7c68915e1749284.tar.gz
frameworks_base-5c1207be90fdf296c1b83034b7c68915e1749284.tar.bz2
donut snapshot
Diffstat (limited to 'core/java/android/app/ApplicationContext.java')
-rw-r--r--core/java/android/app/ApplicationContext.java17
1 files changed, 14 insertions, 3 deletions
diff --git a/core/java/android/app/ApplicationContext.java b/core/java/android/app/ApplicationContext.java
index afb2fe9..92929ea 100644
--- a/core/java/android/app/ApplicationContext.java
+++ b/core/java/android/app/ApplicationContext.java
@@ -541,7 +541,10 @@ class ApplicationContext extends Context {
if (fd != null) {
Bitmap bm = BitmapFactory.decodeFileDescriptor(fd.getFileDescriptor());
if (bm != null) {
- return new BitmapDrawable(bm);
+ // For now clear the density until we figure out how
+ // to deal with it for wallpapers.
+ bm.setDensity(0);
+ return new BitmapDrawable(getResources(), bm);
}
}
} catch (RemoteException e) {
@@ -1949,6 +1952,15 @@ class ApplicationContext extends Context {
try {
Resources r = getResourcesForApplication(appInfo);
dr = r.getDrawable(resid);
+ if (false) {
+ RuntimeException e = new RuntimeException("here");
+ e.fillInStackTrace();
+ Log.w(TAG, "Getting drawable 0x" + Integer.toHexString(resid)
+ + " from package " + packageName
+ + ": app scale=" + r.getCompatibilityInfo().applicationScale
+ + ", caller scale=" + mContext.getResources().getCompatibilityInfo().applicationScale,
+ e);
+ }
if (DEBUG_ICONS) Log.v(TAG, "Getting drawable 0x"
+ Integer.toHexString(resid) + " from " + r
+ ": " + dr);
@@ -2036,10 +2048,9 @@ class ApplicationContext extends Context {
if (app.packageName.equals("system")) {
return mContext.mMainThread.getSystemContext().getResources();
}
- ActivityThread.PackageInfo pi = mContext.mMainThread.getPackageInfoNoCheck(app);
Resources r = mContext.mMainThread.getTopLevelResources(
app.uid == Process.myUid() ? app.sourceDir
- : app.publicSourceDir, pi);
+ : app.publicSourceDir, mContext.mPackageInfo);
if (r != null) {
return r;
}