Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 220dec28 authored by Jeff Sharkey's avatar Jeff Sharkey
Browse files

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.
parent a6597440
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -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) {