title: android set the image I crop as wallpaper
body: <p>I just crop the image to get part of it. But Android set the returned image as the wallpaper. Why? I track the android code, and in Gallery3D application(com.cooliris), I found this:</p>
  
  <pre><code>    // TODO: A temporary file is NOT necessary
      // The CropImage intent should be able to set the wallpaper directly
      // without writing to a file, which we then need to read here to write
      // it again as the final wallpaper, this is silly
      mTempFile = getFileStreamPath("temp-wallpaper");
      mTempFile.getParentFile().mkdirs();
  
      int width = getWallpaperDesiredMinimumWidth();
      int height = getWallpaperDesiredMinimumHeight();
      intent.putExtra("outputX", width);
      intent.putExtra("outputY", height);
      intent.putExtra("aspectX", width);
      intent.putExtra("aspectY", height);
      intent.putExtra("scale", true);
      intent.putExtra("noFaceDetection", true);
      intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(mTempFile));
      intent.putExtra("outputFormat", Bitmap.CompressFormat.PNG.name());
      // TODO: we should have an extra called "setWallpaper" to ask CropImage
      // to set the cropped image as a wallpaper directly. This means the
      // SetWallpaperThread should be moved out of this class to CropImage
  </code></pre>
  
  <p>Please focus on the last lines, The TODO. It tells that the crop intent will do the setting job. Well, I don't need it at all. So, HOW TO CROP AN IMAGE WITHOUT SETTING THE WALLPAPER? Thanks!</p>