am bdb7aee0: Merge "Fix for crash when setting live wallpaper."

* commit 'bdb7aee0a4934eb138f7caaf921f6c86f350b4b7':
  Fix for crash when setting live wallpaper.
This commit is contained in:
Brad Fitzpatrick
2011-01-12 15:59:44 -08:00
committed by Android Git Automerger

View File

@@ -514,8 +514,11 @@ public abstract class WallpaperService extends Service {
mLayout.windowAnimations =
com.android.internal.R.style.Animation_Wallpaper;
mInputChannel = new InputChannel();
mSession.add(mWindow, mLayout, View.VISIBLE, mContentInsets,
mInputChannel);
if (mSession.add(mWindow, mLayout, View.VISIBLE, mContentInsets,
mInputChannel) < 0) {
Log.w(TAG, "Failed to add window while updating wallpaper surface.");
return;
}
mCreated = true;
InputQueue.registerInputChannel(mInputChannel, mInputHandler,