Loading core/java/android/app/ActivityOptions.java +36 −2 Original line number Diff line number Diff line Loading @@ -98,6 +98,8 @@ public class ActivityOptions { public static final int ANIM_SCALE_UP = 2; /** @hide */ public static final int ANIM_THUMBNAIL = 3; /** @hide */ public static final int ANIM_THUMBNAIL_DELAYED = 4; private String mPackageName; private int mAnimationType = ANIM_NONE; Loading Loading @@ -219,9 +221,38 @@ public class ActivityOptions { */ public static ActivityOptions makeThumbnailScaleUpAnimation(View source, Bitmap thumbnail, int startX, int startY, OnAnimationStartedListener listener) { return makeThumbnailScaleUpAnimation(source, thumbnail, startX, startY, listener, false); } /** * Create an ActivityOptions specifying an animation where a thumbnail * is scaled from a given position to the new activity window that is * being started. Before the animation, there is a short delay. * * @param source The View that this thumbnail is animating from. This * defines the coordinate space for <var>startX</var> and <var>startY</var>. * @param thumbnail The bitmap that will be shown as the initial thumbnail * of the animation. * @param startX The x starting location of the bitmap, relative to <var>source</var>. * @param startY The y starting location of the bitmap, relative to <var>source</var>. * @param listener Optional OnAnimationStartedListener to find out when the * requested animation has started running. If for some reason the animation * is not executed, the callback will happen immediately. * @return Returns a new ActivityOptions object that you can use to * supply these options as the options Bundle when starting an activity. * @hide */ public static ActivityOptions makeDelayedThumbnailScaleUpAnimation(View source, Bitmap thumbnail, int startX, int startY, OnAnimationStartedListener listener) { return makeThumbnailScaleUpAnimation(source, thumbnail, startX, startY, listener, true); } private static ActivityOptions makeThumbnailScaleUpAnimation(View source, Bitmap thumbnail, int startX, int startY, OnAnimationStartedListener listener, boolean delayed) { ActivityOptions opts = new ActivityOptions(); opts.mPackageName = source.getContext().getPackageName(); opts.mAnimationType = ANIM_THUMBNAIL; opts.mAnimationType = delayed ? ANIM_THUMBNAIL_DELAYED : ANIM_THUMBNAIL; opts.mThumbnail = thumbnail; int[] pts = new int[2]; source.getLocationOnScreen(pts); Loading Loading @@ -258,7 +289,8 @@ public class ActivityOptions { mStartY = opts.getInt(KEY_ANIM_START_Y, 0); mStartWidth = opts.getInt(KEY_ANIM_START_WIDTH, 0); mStartHeight = opts.getInt(KEY_ANIM_START_HEIGHT, 0); } else if (mAnimationType == ANIM_THUMBNAIL) { } else if (mAnimationType == ANIM_THUMBNAIL || mAnimationType == ANIM_THUMBNAIL_DELAYED) { mThumbnail = (Bitmap)opts.getParcelable(KEY_ANIM_THUMBNAIL); mStartX = opts.getInt(KEY_ANIM_START_X, 0); mStartY = opts.getInt(KEY_ANIM_START_Y, 0); Loading Loading @@ -359,6 +391,7 @@ public class ActivityOptions { mStartHeight = otherOptions.mStartHeight; break; case ANIM_THUMBNAIL: case ANIM_THUMBNAIL_DELAYED: mAnimationType = otherOptions.mAnimationType; mThumbnail = otherOptions.mThumbnail; mStartX = otherOptions.mStartX; Loading Loading @@ -401,6 +434,7 @@ public class ActivityOptions { b.putInt(KEY_ANIM_START_HEIGHT, mStartHeight); break; case ANIM_THUMBNAIL: case ANIM_THUMBNAIL_DELAYED: b.putInt(KEY_ANIM_TYPE, mAnimationType); b.putParcelable(KEY_ANIM_THUMBNAIL, mThumbnail); b.putInt(KEY_ANIM_START_X, mStartX); Loading core/java/android/view/IWindowManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ interface IWindowManager void overridePendingAppTransitionScaleUp(int startX, int startY, int startWidth, int startHeight); void overridePendingAppTransitionThumb(in Bitmap srcThumb, int startX, int startY, IRemoteCallback startedCallback); IRemoteCallback startedCallback, boolean delayed); void executeAppTransition(); void setAppStartingWindow(IBinder token, String pkg, int theme, in CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, Loading packages/SystemUI/res/layout-land/status_bar_recent_panel.xml +6 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,12 @@ systemui:recentItemLayout="@layout/status_bar_recent_item" > <ImageView android:id="@+id/recents_transition_placeholder_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="invisible" /> <FrameLayout android:id="@+id/recents_bg_protect" android:background="@drawable/status_bar_recents_background" Loading packages/SystemUI/res/layout-port/status_bar_recent_panel.xml +6 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,12 @@ systemui:recentItemLayout="@layout/status_bar_recent_item" > <ImageView android:id="@+id/recents_transition_placeholder_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="invisible" /> <FrameLayout android:id="@+id/recents_bg_protect" android:background="@drawable/status_bar_recents_background" Loading packages/SystemUI/res/layout/system_bar_recent_panel.xml +6 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,12 @@ android:clipToPadding="false" android:clipChildren="false"> <ImageView android:id="@+id/recents_transition_placeholder_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="invisible" /> <com.android.systemui.recent.RecentsVerticalScrollView android:id="@+id/recents_container" android:layout_width="wrap_content" android:layout_height="wrap_content" Loading Loading
core/java/android/app/ActivityOptions.java +36 −2 Original line number Diff line number Diff line Loading @@ -98,6 +98,8 @@ public class ActivityOptions { public static final int ANIM_SCALE_UP = 2; /** @hide */ public static final int ANIM_THUMBNAIL = 3; /** @hide */ public static final int ANIM_THUMBNAIL_DELAYED = 4; private String mPackageName; private int mAnimationType = ANIM_NONE; Loading Loading @@ -219,9 +221,38 @@ public class ActivityOptions { */ public static ActivityOptions makeThumbnailScaleUpAnimation(View source, Bitmap thumbnail, int startX, int startY, OnAnimationStartedListener listener) { return makeThumbnailScaleUpAnimation(source, thumbnail, startX, startY, listener, false); } /** * Create an ActivityOptions specifying an animation where a thumbnail * is scaled from a given position to the new activity window that is * being started. Before the animation, there is a short delay. * * @param source The View that this thumbnail is animating from. This * defines the coordinate space for <var>startX</var> and <var>startY</var>. * @param thumbnail The bitmap that will be shown as the initial thumbnail * of the animation. * @param startX The x starting location of the bitmap, relative to <var>source</var>. * @param startY The y starting location of the bitmap, relative to <var>source</var>. * @param listener Optional OnAnimationStartedListener to find out when the * requested animation has started running. If for some reason the animation * is not executed, the callback will happen immediately. * @return Returns a new ActivityOptions object that you can use to * supply these options as the options Bundle when starting an activity. * @hide */ public static ActivityOptions makeDelayedThumbnailScaleUpAnimation(View source, Bitmap thumbnail, int startX, int startY, OnAnimationStartedListener listener) { return makeThumbnailScaleUpAnimation(source, thumbnail, startX, startY, listener, true); } private static ActivityOptions makeThumbnailScaleUpAnimation(View source, Bitmap thumbnail, int startX, int startY, OnAnimationStartedListener listener, boolean delayed) { ActivityOptions opts = new ActivityOptions(); opts.mPackageName = source.getContext().getPackageName(); opts.mAnimationType = ANIM_THUMBNAIL; opts.mAnimationType = delayed ? ANIM_THUMBNAIL_DELAYED : ANIM_THUMBNAIL; opts.mThumbnail = thumbnail; int[] pts = new int[2]; source.getLocationOnScreen(pts); Loading Loading @@ -258,7 +289,8 @@ public class ActivityOptions { mStartY = opts.getInt(KEY_ANIM_START_Y, 0); mStartWidth = opts.getInt(KEY_ANIM_START_WIDTH, 0); mStartHeight = opts.getInt(KEY_ANIM_START_HEIGHT, 0); } else if (mAnimationType == ANIM_THUMBNAIL) { } else if (mAnimationType == ANIM_THUMBNAIL || mAnimationType == ANIM_THUMBNAIL_DELAYED) { mThumbnail = (Bitmap)opts.getParcelable(KEY_ANIM_THUMBNAIL); mStartX = opts.getInt(KEY_ANIM_START_X, 0); mStartY = opts.getInt(KEY_ANIM_START_Y, 0); Loading Loading @@ -359,6 +391,7 @@ public class ActivityOptions { mStartHeight = otherOptions.mStartHeight; break; case ANIM_THUMBNAIL: case ANIM_THUMBNAIL_DELAYED: mAnimationType = otherOptions.mAnimationType; mThumbnail = otherOptions.mThumbnail; mStartX = otherOptions.mStartX; Loading Loading @@ -401,6 +434,7 @@ public class ActivityOptions { b.putInt(KEY_ANIM_START_HEIGHT, mStartHeight); break; case ANIM_THUMBNAIL: case ANIM_THUMBNAIL_DELAYED: b.putInt(KEY_ANIM_TYPE, mAnimationType); b.putParcelable(KEY_ANIM_THUMBNAIL, mThumbnail); b.putInt(KEY_ANIM_START_X, mStartX); Loading
core/java/android/view/IWindowManager.aidl +1 −1 Original line number Diff line number Diff line Loading @@ -84,7 +84,7 @@ interface IWindowManager void overridePendingAppTransitionScaleUp(int startX, int startY, int startWidth, int startHeight); void overridePendingAppTransitionThumb(in Bitmap srcThumb, int startX, int startY, IRemoteCallback startedCallback); IRemoteCallback startedCallback, boolean delayed); void executeAppTransition(); void setAppStartingWindow(IBinder token, String pkg, int theme, in CompatibilityInfo compatInfo, CharSequence nonLocalizedLabel, int labelRes, Loading
packages/SystemUI/res/layout-land/status_bar_recent_panel.xml +6 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,12 @@ systemui:recentItemLayout="@layout/status_bar_recent_item" > <ImageView android:id="@+id/recents_transition_placeholder_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="invisible" /> <FrameLayout android:id="@+id/recents_bg_protect" android:background="@drawable/status_bar_recents_background" Loading
packages/SystemUI/res/layout-port/status_bar_recent_panel.xml +6 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,12 @@ systemui:recentItemLayout="@layout/status_bar_recent_item" > <ImageView android:id="@+id/recents_transition_placeholder_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="invisible" /> <FrameLayout android:id="@+id/recents_bg_protect" android:background="@drawable/status_bar_recents_background" Loading
packages/SystemUI/res/layout/system_bar_recent_panel.xml +6 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,12 @@ android:clipToPadding="false" android:clipChildren="false"> <ImageView android:id="@+id/recents_transition_placeholder_icon" android:layout_width="wrap_content" android:layout_height="wrap_content" android:visibility="invisible" /> <com.android.systemui.recent.RecentsVerticalScrollView android:id="@+id/recents_container" android:layout_width="wrap_content" android:layout_height="wrap_content" Loading