summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLucas Dupin <dupin@google.com>2017-06-26 19:19:12 (GMT)
committerandroid-build-team Robot <android-build-team-robot@google.com>2017-07-07 01:33:34 (GMT)
commit2fecb6b4c275c634fa87e1e4fb33804757009493 (patch)
tree28c52dbf554491f88981694bcc963e0e36813dfb
parentad704f7ec2466125431c97b50ad8839175e9407b (diff)
downloadandroid_packages_wallpapers_LivePicker-2fecb6b4c275c634fa87e1e4fb33804757009493.zip
android_packages_wallpapers_LivePicker-2fecb6b4c275c634fa87e1e4fb33804757009493.tar.gz
android_packages_wallpapers_LivePicker-2fecb6b4c275c634fa87e1e4fb33804757009493.tar.bz2
Avoid crash when unbinding wallpaper
A wallpaper service might have crashed before we try to unbind it, in this case a runtime exception will be thrown. Let's just ignore it since there is nothing else to be done. Bug: 62828614 Test: manually set Windy wallpaper and resize it Change-Id: If9882ea27aaf3c92d2069ae6c8ef409c6ae2fa91 (cherry picked from commit b989a5e9de2d0300c578e79705f670c2b7ffe199)
-rw-r--r--src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java b/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java
index baaa13c..6dab5c6 100644
--- a/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java
+++ b/src/com/android/wallpaper/livepicker/LiveWallpaperPreview.java
@@ -439,7 +439,12 @@ public class LiveWallpaperPreview extends Activity {
}
mEngine = null;
}
- unbindService(this);
+ try {
+ unbindService(this);
+ } catch (IllegalArgumentException e) {
+ Log.w(LOG_TAG, "Can't unbind wallpaper service. "
+ + "It might have crashed, just ignoring.", e);
+ }
mService = null;
}
}
@@ -485,7 +490,7 @@ public class LiveWallpaperPreview extends Activity {
}
}
}
-
+
public ParcelFileDescriptor setWallpaper(String name) {
return null;
}