am 3e95341f: am 67640c0c: Workaround for crashing on rotation. (Bug 6611883)

* commit '3e95341fec02b877ee2b97eb03d4a10aa501efb1':
  Workaround for crashing on rotation. (Bug 6611883)
This commit is contained in:
Winson Chung
2012-06-05 16:06:29 -07:00
committed by Android Git Automerger
+2 -1
View File
@@ -704,7 +704,8 @@ public final class Launcher extends Activity
AppWidgetProviderInfo pInfo = lahv.getAppWidgetInfo();
// Remove the current widget which is inflated with the wrong orientation
getWorkspace().getParentCellLayoutForView(lahv).removeView(lahv);
CellLayout cl = getWorkspace().getParentCellLayoutForView(lahv);
if (cl != null) cl.removeView(lahv);
// Re-inflate the widget using the correct orientation
AppWidgetHostView widget = mAppWidgetHost.createView(this, info.appWidgetId, pInfo);