Work on issue #6579997: Mariner entrance animation

Add a new variation of ActivityOptions that allows you to
supply custom animation resources and get a callback when the
animation starts.

Use this in SearchPanelView to determine when to start hiding
the search panel instead of having a fixed delay.

Fix some issues in the activity manager where we would cancel
the options in cases where we should actually keep them to give
to the window manager for a transition.  (Basically when the
activity being started is not actually ending up launched, but
just results in a shift in the activity stack.)

Note that this is not quite what the design calls for -- the
entire search UI is waiting and then disappearing when the
animation starts, instead of the ring first disappearing while
waiting for the time to fade out the circle.

Change-Id: Iee9a404ba530908d73cdbd4a9d0d2907ac03428f
diff --git a/core/java/android/view/IWindowManager.aidl b/core/java/android/view/IWindowManager.aidl
index c5a687a..4d4eec7 100644
--- a/core/java/android/view/IWindowManager.aidl
+++ b/core/java/android/view/IWindowManager.aidl
@@ -80,7 +80,8 @@
     void setFocusedApp(IBinder token, boolean moveFocusNow);
     void prepareAppTransition(int transit, boolean alwaysKeepCurrent);
     int getPendingAppTransition();
-    void overridePendingAppTransition(String packageName, int enterAnim, int exitAnim);
+    void overridePendingAppTransition(String packageName, int enterAnim, int exitAnim,
+            IRemoteCallback startedCallback);
     void overridePendingAppTransitionScaleUp(int startX, int startY, int startWidth,
             int startHeight);
     void overridePendingAppTransitionThumb(in Bitmap srcThumb, int startX, int startY,