Merge cherrypicks of [2504334, 2504429, 2504277, 2504391, 2505083, 2505102, 2505048, 2505084] into oc-dr1-release

Change-Id: If953fa9f52fccc40e90c7f667873b11260d54152
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 @@
                     }
                     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 ParcelFileDescriptor setWallpaper(String name) {
             return null;
         }