OSDN Git Service

Provide final callbacks before remove CustomContent (issue 11169651)
authorAdam Cohen <adamcohen@google.com>
Thu, 10 Oct 2013 19:48:52 +0000 (12:48 -0700)
committerAdam Cohen <adamcohen@google.com>
Thu, 10 Oct 2013 19:55:06 +0000 (12:55 -0700)
Change-Id: I0c30d58a4380f4525dcabf54a0cabf3789031ba6

src/com/android/launcher3/Workspace.java

index 7a16474..bbe0946 100644 (file)
@@ -557,6 +557,12 @@ public class Workspace extends SmoothPagedView
         mWorkspaceScreens.remove(CUSTOM_CONTENT_SCREEN_ID);
         mScreenOrder.remove(CUSTOM_CONTENT_SCREEN_ID);
         removeView(customScreen);
+
+        if (mCustomContentCallbacks != null) {
+            mCustomContentCallbacks.onScrollProgressChanged(0);
+            mCustomContentCallbacks.onHide();
+        }
+
         mCustomContentCallbacks = null;
 
         // Ensure that the current page and default page are maintained.