OSDN Git Service

Fix uncaught exception in WindowManager#setWallpaperOffsets (issue 5613241)
authorAdam Cohen <adamcohen@google.com>
Mon, 14 Nov 2011 21:28:50 +0000 (13:28 -0800)
committerAdam Cohen <adamcohen@google.com>
Mon, 14 Nov 2011 21:28:50 +0000 (13:28 -0800)
Change-Id: I4646095f4cde9514425be8ab2dbf805d9788aa5c

core/java/android/app/WallpaperManager.java

index 91398bc..b1c1f30 100644 (file)
@@ -635,6 +635,9 @@ public class WallpaperManager {
                     //Log.v(TAG, "...app returning after sending offsets!");
                 } catch (RemoteException e) {
                     // Ignore.
+                } catch (IllegalArgumentException e) {
+                    // Since this is being posted, it's possible that this windowToken is no longer
+                    // valid, for example, if setWallpaperOffsets is called just before rotation.
                 }
             }
         });