Merge "Debugging wallpaper stuff on production device (to be reverted once built)" into ub-now-nova

This commit is contained in:
Adam Cohen
2014-05-21 23:00:01 +00:00
committed by Android (Google) Code Review
2 changed files with 7 additions and 3 deletions
+4
View File
@@ -2443,11 +2443,15 @@ public class Launcher extends Activity
*/ */
protected void onClickAllAppsButton(View v) { protected void onClickAllAppsButton(View v) {
if (LOGD) Log.d(TAG, "onClickAllAppsButton"); if (LOGD) Log.d(TAG, "onClickAllAppsButton");
mWorkspace.setWallpaperDimension();
/*
if (isAllAppsVisible()) { if (isAllAppsVisible()) {
showWorkspace(true); showWorkspace(true);
} else { } else {
showAllApps(true, AppsCustomizePagedView.ContentType.Applications, false); showAllApps(true, AppsCustomizePagedView.ContentType.Applications, false);
} }
*/
} }
/** /**
+3 -3
View File
@@ -460,7 +460,7 @@ public class Workspace extends SmoothPagedView
mFlingThresholdVelocity = (int) (FLING_THRESHOLD_VELOCITY * mDensity); mFlingThresholdVelocity = (int) (FLING_THRESHOLD_VELOCITY * mDensity);
// Set the wallpaper dimensions when Launcher starts up // Set the wallpaper dimensions when Launcher starts up
setWallpaperDimension(); //setWallpaperDimension();
} }
private void setupLayoutTransition() { private void setupLayoutTransition() {
@@ -1269,7 +1269,7 @@ public class Workspace extends SmoothPagedView
return mCustomContentCallbacks; return mCustomContentCallbacks;
} }
protected void setWallpaperDimension() { public void setWallpaperDimension() {
new AsyncTask<Void, Void, Void>() { new AsyncTask<Void, Void, Void>() {
public Void doInBackground(Void ... args) { public Void doInBackground(Void ... args) {
String spKey = WallpaperCropActivity.getSharedPreferencesKey(); String spKey = WallpaperCropActivity.getSharedPreferencesKey();
@@ -1764,7 +1764,7 @@ public class Workspace extends SmoothPagedView
// Update wallpaper dimensions if they were changed since last onResume // Update wallpaper dimensions if they were changed since last onResume
// (we also always set the wallpaper dimensions in the constructor) // (we also always set the wallpaper dimensions in the constructor)
if (LauncherAppState.getInstance().hasWallpaperChangedSinceLastCheck()) { if (LauncherAppState.getInstance().hasWallpaperChangedSinceLastCheck()) {
setWallpaperDimension(); //setWallpaperDimension();
} }
mWallpaperIsLiveWallpaper = mWallpaperManager.getWallpaperInfo() != null; mWallpaperIsLiveWallpaper = mWallpaperManager.getWallpaperInfo() != null;
// Force the wallpaper offset steps to be set again, because another app might have changed // Force the wallpaper offset steps to be set again, because another app might have changed