OSDN Git Service

Follow updated wallpaper APIs.
authorDianne Hackborn <hackbod@google.com>
Sun, 9 Aug 2009 03:53:57 +0000 (20:53 -0700)
committerDianne Hackborn <hackbod@google.com>
Sun, 9 Aug 2009 04:01:31 +0000 (21:01 -0700)
src/com/android/launcher/Launcher.java
src/com/android/launcher/WallpaperChooser.java

index cf9bdbf..3f59618 100644 (file)
@@ -349,7 +349,7 @@ public final class Launcher extends Activity implements View.OnClickListener, On
 
         final int width = isPortrait ? display.getWidth() : display.getHeight();
         final int height = isPortrait ? display.getHeight() : display.getWidth();
-        wpm.setDimensionHints(width * WALLPAPER_SCREENS_SPAN, height);
+        wpm.suggestDesiredDimensions(width * WALLPAPER_SCREENS_SPAN, height);
     }
 
     @Override
index 4ee41f8..574ef96 100644 (file)
@@ -172,7 +172,7 @@ public class WallpaperChooser extends Activity implements AdapterView.OnItemSele
         try {
             WallpaperManager wpm = (WallpaperManager)getSystemService(
                     WALLPAPER_SERVICE);
-            wpm.set(mImages.get(position));
+            wpm.setResource(mImages.get(position));
             setResult(RESULT_OK);
             finish();
         } catch (IOException e) {