summaryrefslogtreecommitdiffstats
path: root/core/java/android/appwidget
diff options
context:
space:
mode:
authorJeff Sharkey <jsharkey@android.com>2009-08-19 09:31:51 -0700
committerJeff Sharkey <jsharkey@android.com>2009-08-19 09:31:51 -0700
commit220dec2897d739ecb627e46b4cafbd664f4ff762 (patch)
treef9e2a2a7b432b3ab5afc0456a33ce6e767abc04b /core/java/android/appwidget
parenta659744041d0b74b4243fdd448a5fa302a581278 (diff)
downloadframeworks_base-220dec2897d739ecb627e46b4cafbd664f4ff762.zip
frameworks_base-220dec2897d739ecb627e46b4cafbd664f4ff762.tar.gz
frameworks_base-220dec2897d739ecb627e46b4cafbd664f4ff762.tar.bz2
Use remote Context when inflating initialLayout, add debug.
To help track down http://b/2055197 this change adds back exception logging when inflating initialLayout. On a hunch, it also assigns the remote Context so generateLayoutParams() can inflate correctly.
Diffstat (limited to 'core/java/android/appwidget')
-rw-r--r--core/java/android/appwidget/AppWidgetHostView.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/java/android/appwidget/AppWidgetHostView.java b/core/java/android/appwidget/AppWidgetHostView.java
index cced338..a4c141e 100644
--- a/core/java/android/appwidget/AppWidgetHostView.java
+++ b/core/java/android/appwidget/AppWidgetHostView.java
@@ -322,6 +322,7 @@ public class AppWidgetHostView extends FrameLayout {
if (mInfo != null) {
Context theirContext = mContext.createPackageContext(
mInfo.provider.getPackageName(), Context.CONTEXT_RESTRICTED);
+ mRemoteContext = theirContext;
LayoutInflater inflater = (LayoutInflater)
theirContext.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
inflater = inflater.cloneInContext(theirContext);
@@ -336,8 +337,8 @@ public class AppWidgetHostView extends FrameLayout {
exception = e;
}
- if (exception != null && LOGD) {
- Log.w(TAG, "Error inflating AppWidget " + mInfo, exception);
+ if (exception != null) {
+ Log.w(TAG, "Error inflating AppWidget " + mInfo + ": " + exception.toString());
}
if (defaultView == null) {