Catch exceptions when setting wallpaper offsets
Bug: 10514504
This commit is contained in:
1 parent
c58497ee61
commit
1bd90b0ed3
1 file changed
+8
-4
@@ -1013,10 +1013,14 @@ public class Workspace extends SmoothPagedView
|
||||
private void updateOffset(boolean force) {
|
||||
if (mWaitingForUpdate || force) {
|
||||
mWaitingForUpdate = false;
|
||||
if (computeScrollOffset()) {
|
||||
mWallpaperManager.setWallpaperOffsets(mWindowToken,
|
||||
mWallpaperOffset.getCurrX(), 0.5f);
|
||||
setWallpaperOffsetSteps();
|
||||
if (computeScrollOffset() && mWindowToken != null) {
|
||||
try {
|
||||
mWallpaperManager.setWallpaperOffsets(mWindowToken,
|
||||
mWallpaperOffset.getCurrX(), 0.5f);
|
||||
setWallpaperOffsetSteps();
|
||||
} catch (IllegalArgumentException e) {
|
||||
Log.e(TAG, "Error updating wallpaper offset: " + e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user