Removing dependency on wallpaper size settings from launcher
> Moving wallpaper desired width calculation to xml Bug: 14470153 Change-Id: I8803af158861507a40e5d55e9aa6d515be47eefa
This commit is contained in:
1 parent
1bc8fc3de2
commit
6f866095c0
5 files changed
+56
-22
No files matched your search
@@ -1382,17 +1382,17 @@ public class Workspace extends PagedView
|
||||
}
|
||||
|
||||
protected void setWallpaperDimension() {
|
||||
new AsyncTask<Void, Void, Void>() {
|
||||
public Void doInBackground(Void ... args) {
|
||||
if (Utilities.ATLEAST_KITKAT) {
|
||||
WallpaperUtils.suggestWallpaperDimension(mLauncher);
|
||||
} else {
|
||||
WallpaperUtils.suggestWallpaperDimensionPreK(mLauncher,
|
||||
mLauncher.overrideWallpaperDimensions());
|
||||
Utilities.THREAD_POOL_EXECUTOR.execute(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
final Point size = LauncherAppState.getInstance()
|
||||
.getInvariantDeviceProfile().defaultWallpaperSize;
|
||||
if (size.x != mWallpaperManager.getDesiredMinimumWidth()
|
||||
|| size.y != mWallpaperManager.getDesiredMinimumHeight()) {
|
||||
mWallpaperManager.suggestDesiredDimensions(size.x, size.y);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}.executeOnExecutor(Utilities.THREAD_POOL_EXECUTOR);
|
||||
});
|
||||
}
|
||||
|
||||
protected void snapToPage(int whichPage, Runnable r) {
|
||||
|
||||
Reference in new issue
Block a user