summaryrefslogtreecommitdiffstats
path: root/core/java/android/app/ApplicationContext.java
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-07-29 14:10:12 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-07-29 14:10:12 -0700
commitafa7d85b43c6c2058cbde61ff287ff5776d76d2a (patch)
tree2d57b589a728a3f836aa2f0bc70fa124f3a75861 /core/java/android/app/ApplicationContext.java
parent1c3f760dcd4a4934e5197a23b76b296310f2259a (diff)
parent9bb8fd77c8dc177aab9ac96bed4f55972dcda70a (diff)
downloadframeworks_base-afa7d85b43c6c2058cbde61ff287ff5776d76d2a.zip
frameworks_base-afa7d85b43c6c2058cbde61ff287ff5776d76d2a.tar.gz
frameworks_base-afa7d85b43c6c2058cbde61ff287ff5776d76d2a.tar.bz2
Merge change 9008
* changes: Only restore the bits for wallpapers that aren't built in.
Diffstat (limited to 'core/java/android/app/ApplicationContext.java')
-rw-r--r--core/java/android/app/ApplicationContext.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/core/java/android/app/ApplicationContext.java b/core/java/android/app/ApplicationContext.java
index 1e4ab68..b095e30 100644
--- a/core/java/android/app/ApplicationContext.java
+++ b/core/java/android/app/ApplicationContext.java
@@ -578,7 +578,7 @@ class ApplicationContext extends Context {
@Override
public void setWallpaper(Bitmap bitmap) throws IOException {
try {
- ParcelFileDescriptor fd = getWallpaperService().setWallpaper();
+ ParcelFileDescriptor fd = getWallpaperService().setWallpaper(null);
if (fd == null) {
return;
}
@@ -598,7 +598,7 @@ class ApplicationContext extends Context {
@Override
public void setWallpaper(InputStream data) throws IOException {
try {
- ParcelFileDescriptor fd = getWallpaperService().setWallpaper();
+ ParcelFileDescriptor fd = getWallpaperService().setWallpaper(null);
if (fd == null) {
return;
}
@@ -627,13 +627,16 @@ class ApplicationContext extends Context {
@Override
public void clearWallpaper() throws IOException {
try {
+ Resources resources = getResources();
/* Set the wallpaper to the default values */
- ParcelFileDescriptor fd = getWallpaperService().setWallpaper();
+ ParcelFileDescriptor fd = getWallpaperService().setWallpaper(
+ "res:" + resources.getResourceName(
+ com.android.internal.R.drawable.default_wallpaper));
if (fd != null) {
FileOutputStream fos = null;
try {
fos = new ParcelFileDescriptor.AutoCloseOutputStream(fd);
- setWallpaper(getResources().openRawResource(
+ setWallpaper(resources.openRawResource(
com.android.internal.R.drawable.default_wallpaper),
fos);
} finally {