From 95b193fdca18dc246b301135d06cc261f4a5c67c Mon Sep 17 00:00:00 2001 From: Ian Lake Date: Tue, 18 Apr 2017 10:37:53 -0700 Subject: [PATCH] Remove scale up animation for startActivity from RemoteViews The scale up animation used by default for all startActivity calls coming from RemoteViews overrides all custom animations set on the activity's theme. By switching to ActivityOptions.makeBasic(), we allow custom animations on an activity by activity basis. This also fixes issues where activities would scale up from a click position in the notification tray even after the notification tray collapses (which happens concurrently with the startActivity call). Test: visual inspection BUG: 34235073 Change-Id: I922beee39d9fde9c00d41d07d8a8204421e7faa7 --- core/java/android/widget/RemoteViews.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/java/android/widget/RemoteViews.java b/core/java/android/widget/RemoteViews.java index 9245134fd266a..036b391002865 100644 --- a/core/java/android/widget/RemoteViews.java +++ b/core/java/android/widget/RemoteViews.java @@ -252,9 +252,7 @@ public class RemoteViews implements Parcelable, Filter { if (mEnterAnimationId != 0) { opts = ActivityOptions.makeCustomAnimation(context, mEnterAnimationId, 0); } else { - opts = ActivityOptions.makeScaleUpAnimation(view, - 0, 0, - view.getMeasuredWidth(), view.getMeasuredHeight()); + opts = ActivityOptions.makeBasic(); } if (launchStackId != StackId.INVALID_STACK_ID) {