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

* commit 'b841fa63026803093c093ad25ab0ccbd4c49e45b':
  Fix for crash when setting live wallpaper.
This commit is contained in:
Brad Fitzpatrick
2011-01-13 10:32:20 -08:00
committed by Android Git Automerger

View File

@@ -517,8 +517,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,