Make image wallpaper use a big surface.

Change-Id: I119f2bfee5fde08040520bd0da8574194a893ab5
This commit is contained in:
Dianne Hackborn
2011-02-01 15:21:09 -08:00
parent 22ad6243d7
commit f185552f63
2 changed files with 5 additions and 7 deletions

View File

@@ -204,12 +204,6 @@ public abstract class WallpaperService extends Service {
return mIsCreating;
}
@Override
public void setFixedSize(int width, int height) {
throw new UnsupportedOperationException(
"Wallpapers currently only support sizing from layout");
}
public void setKeepScreenOn(boolean screenOn) {
throw new UnsupportedOperationException(
"Wallpapers do not support keep screen on");

View File

@@ -117,7 +117,11 @@ public class ImageWallpaper extends WallpaperService {
synchronized (mLock) {
updateWallpaperLocked();
}
surfaceHolder.setSizeFromLayout();
surfaceHolder.setFixedSize(getDesiredMinimumWidth(), getDesiredMinimumHeight());
// Used a fixed size surface, because we are special. We can do
// this because we know the current design of window animations doesn't
// cause this to break.
//surfaceHolder.setSizeFromLayout();
}
@Override