summaryrefslogtreecommitdiffstats
path: root/packages/WallpaperCropper/src
diff options
context:
space:
mode:
authorMichael Jurka <mikejurka@google.com>2014-01-29 15:04:33 +0100
committerMichael Jurka <mikejurka@google.com>2014-01-29 15:04:59 +0100
commit01f7cc17c8359f5f2028bb7f22953d31bda02018 (patch)
tree3b90db8f76e9cc2f4bb3c41502e0fae5f3d8f53c /packages/WallpaperCropper/src
parent2b033dce9f252ae30ac88c9ba1569d18afaaf2cf (diff)
downloadframeworks_base-01f7cc17c8359f5f2028bb7f22953d31bda02018.zip
frameworks_base-01f7cc17c8359f5f2028bb7f22953d31bda02018.tar.gz
frameworks_base-01f7cc17c8359f5f2028bb7f22953d31bda02018.tar.bz2
Don't set suggested wallpaper dimensions in default wallpaper cropper
suggestWallpaperDimensions is deprecated/ignored now anyway Bug: 12118434
Diffstat (limited to 'packages/WallpaperCropper/src')
-rw-r--r--packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java36
1 files changed, 0 insertions, 36 deletions
diff --git a/packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java b/packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java
index cbf0c52..b9b87b1 100644
--- a/packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java
+++ b/packages/WallpaperCropper/src/com/android/wallpapercropper/WallpaperCropActivity.java
@@ -285,7 +285,6 @@ public class WallpaperCropActivity extends Activity {
final Point bounds = cropTask.getImageBounds();
Runnable onEndCrop = new Runnable() {
public void run() {
- updateWallpaperDimensions(bounds.x, bounds.y);
if (finishActivityWhenDone) {
setResult(Activity.RESULT_OK);
finish();
@@ -309,9 +308,6 @@ public class WallpaperCropActivity extends Activity {
inSize.x, inSize.y, outSize.x, outSize.y, false);
Runnable onEndCrop = new Runnable() {
public void run() {
- // Passing 0, 0 will cause launcher to revert to using the
- // default wallpaper size
- updateWallpaperDimensions(0, 0);
if (finishActivityWhenDone) {
setResult(Activity.RESULT_OK);
finish();
@@ -396,7 +392,6 @@ public class WallpaperCropActivity extends Activity {
Runnable onEndCrop = new Runnable() {
public void run() {
- updateWallpaperDimensions(outWidth, outHeight);
if (finishActivityWhenDone) {
setResult(Activity.RESULT_OK);
finish();
@@ -777,37 +772,6 @@ public class WallpaperCropActivity extends Activity {
}
}
- protected void updateWallpaperDimensions(int width, int height) {
- String spKey = getSharedPreferencesKey();
- SharedPreferences sp = getSharedPreferences(spKey, Context.MODE_MULTI_PROCESS);
- SharedPreferences.Editor editor = sp.edit();
- if (width != 0 && height != 0) {
- editor.putInt(WALLPAPER_WIDTH_KEY, width);
- editor.putInt(WALLPAPER_HEIGHT_KEY, height);
- } else {
- editor.remove(WALLPAPER_WIDTH_KEY);
- editor.remove(WALLPAPER_HEIGHT_KEY);
- }
- editor.commit();
-
- suggestWallpaperDimension(getResources(),
- sp, getWindowManager(), WallpaperManager.getInstance(this));
- }
-
- static public void suggestWallpaperDimension(Resources res,
- final SharedPreferences sharedPrefs,
- WindowManager windowManager,
- final WallpaperManager wallpaperManager) {
- final Point defaultWallpaperSize = getDefaultWallpaperSize(res, windowManager);
- // If we have saved a wallpaper width/height, use that instead
- int savedWidth = sharedPrefs.getInt(WALLPAPER_WIDTH_KEY, defaultWallpaperSize.x);
- int savedHeight = sharedPrefs.getInt(WALLPAPER_HEIGHT_KEY, defaultWallpaperSize.y);
- if (savedWidth != wallpaperManager.getDesiredMinimumWidth() ||
- savedHeight != wallpaperManager.getDesiredMinimumHeight()) {
- wallpaperManager.suggestDesiredDimensions(savedWidth, savedHeight);
- }
- }
-
protected static RectF getMaxCropRect(
int inWidth, int inHeight, int outWidth, int outHeight, boolean leftAligned) {
RectF cropRect = new RectF();