mirror of
https://github.com/LawnchairLauncher/lawnchair.git
synced 2026-03-02 17:06:49 +00:00
Removing static Context access using LauncherAppState
> This ensures that LauncherAppState is only accessed in the presence of a valid context Bug: 33032833 Change-Id: I955e5cb022f8bd6374681ae6c0720a2666d5b750
This commit is contained in:
@@ -87,7 +87,7 @@ public class WidgetsContainerView extends BaseContainerView
|
||||
mLauncher = Launcher.getLauncher(context);
|
||||
mDragController = mLauncher.getDragController();
|
||||
mAdapter = new WidgetsListAdapter(this, this, context);
|
||||
mIconCache = (LauncherAppState.getInstance()).getIconCache();
|
||||
mIconCache = LauncherAppState.getInstance(context).getIconCache();
|
||||
if (LOGD) {
|
||||
Log.d(TAG, "WidgetsContainerView constructor");
|
||||
}
|
||||
@@ -303,7 +303,7 @@ public class WidgetsContainerView extends BaseContainerView
|
||||
|
||||
private WidgetPreviewLoader getWidgetPreviewLoader() {
|
||||
if (mWidgetPreviewLoader == null) {
|
||||
mWidgetPreviewLoader = LauncherAppState.getInstance().getWidgetCache();
|
||||
mWidgetPreviewLoader = LauncherAppState.getInstance(getContext()).getWidgetCache();
|
||||
}
|
||||
return mWidgetPreviewLoader;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user