Merge "Restore the creation of the remote context in sync inflation." into sc-v2-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
184c9eeb95
@@ -552,6 +552,10 @@ public class AppWidgetHostView extends FrameLayout {
|
|||||||
inflateAsync(rvToApply);
|
inflateAsync(rvToApply);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
// Prepare a local reference to the remote Context so we're ready to
|
||||||
|
// inflate any requested LayoutParams.
|
||||||
|
mRemoteContext = getRemoteContext();
|
||||||
|
|
||||||
int layoutId = rvToApply.getLayoutId();
|
int layoutId = rvToApply.getLayoutId();
|
||||||
if (rvToApply.canRecycleView(mView)) {
|
if (rvToApply.canRecycleView(mView)) {
|
||||||
try {
|
try {
|
||||||
@@ -727,6 +731,9 @@ public class AppWidgetHostView extends FrameLayout {
|
|||||||
} catch (NameNotFoundException e) {
|
} catch (NameNotFoundException e) {
|
||||||
Log.e(TAG, "Package name " + mInfo.providerInfo.packageName + " not found");
|
Log.e(TAG, "Package name " + mInfo.providerInfo.packageName + " not found");
|
||||||
return mContext;
|
return mContext;
|
||||||
|
} catch (NullPointerException e) {
|
||||||
|
Log.e(TAG, "Error trying to create the remote context.", e);
|
||||||
|
return mContext;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user