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 committed 2017-01-11 12:52:03 -08:00
1 parent 4130705141
commit 87f784c285
34 files changed
+117 -126

No files matched your search

+1 -2
View File
@@ -1613,8 +1613,7 @@ public class Workspace extends PagedView
Utilities.THREAD_POOL_EXECUTOR.execute(new Runnable() {
@Override
public void run() {
final Point size = LauncherAppState.getInstance()
.getInvariantDeviceProfile().defaultWallpaperSize;
final Point size = LauncherAppState.getIDP(getContext()).defaultWallpaperSize;
if (size.x != mWallpaperManager.getDesiredMinimumWidth()
|| size.y != mWallpaperManager.getDesiredMinimumHeight()) {
mWallpaperManager.suggestDesiredDimensions(size.x, size.y);