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:
Sunny Goyal
2017-01-11 10:48:34 -08:00
parent 4130705141
commit 87f784c285
34 changed files with 117 additions and 126 deletions

View File

@@ -96,9 +96,7 @@ public class FolderPagedView extends PagedView {
public FolderPagedView(Context context, AttributeSet attrs) {
super(context, attrs);
LauncherAppState app = LauncherAppState.getInstance();
InvariantDeviceProfile profile = app.getInvariantDeviceProfile();
InvariantDeviceProfile profile = LauncherAppState.getIDP(context);
mMaxCountX = profile.numFolderColumns;
mMaxCountY = profile.numFolderRows;