From ab962b75eeb9f956ac2eb1b00e66f6cca492010e Mon Sep 17 00:00:00 2001 From: Patrick Dubroy Date: Mon, 26 Jul 2010 12:10:10 -0700 Subject: [PATCH] fix 2869807: Crash on boot on trygon-userdebug Change-Id: I59f0d653e498a69bd240232b8bb89884aa0c324d --- src/com/android/launcher2/Launcher.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java index 43b12ed4e9..f846b516c3 100644 --- a/src/com/android/launcher2/Launcher.java +++ b/src/com/android/launcher2/Launcher.java @@ -621,6 +621,8 @@ public final class Launcher extends Activity // Some launcher layouts don't have a previous and next view if (mPreviousView != null) { dismissPreview(mPreviousView); + } + if (mNextView != null) { dismissPreview(mNextView); } mDragController.cancelDrag(); @@ -1126,8 +1128,13 @@ public final class Launcher extends Activity getContentResolver().unregisterContentObserver(mWidgetObserver); - dismissPreview(mPreviousView); - dismissPreview(mNextView); + // Some launcher layouts don't have a previous and next view + if (mPreviousView != null) { + dismissPreview(mPreviousView); + } + if (mNextView != null) { + dismissPreview(mNextView); + } unregisterReceiver(mCloseSystemDialogsReceiver); }