1 package com.android.wallpaperpicker.common; 2 3 import android.app.WallpaperManager; 4 import android.content.Context; 5 import android.graphics.Rect; 6 7 import java.io.IOException; 8 import java.io.InputStream; 9 10 public class WallpaperManagerCompatV16 extends WallpaperManagerCompat { 11 protected WallpaperManager mWallpaperManager; 12 WallpaperManagerCompatV16(Context context)13 public WallpaperManagerCompatV16(Context context) { 14 mWallpaperManager = WallpaperManager.getInstance(context.getApplicationContext()); 15 } 16 17 @Override setStream(InputStream data, Rect visibleCropHint, boolean allowBackup, int whichWallpaper)18 public void setStream(InputStream data, Rect visibleCropHint, boolean allowBackup, 19 int whichWallpaper) throws IOException { 20 mWallpaperManager.setStream(data); 21 } 22 23 @Override clear(int whichWallpaper)24 public void clear(int whichWallpaper) throws IOException { 25 mWallpaperManager.clear(); 26 } 27 } 28