From 56e56095f774a70591ab9b7724a7aa1a8a4ae57b Mon Sep 17 00:00:00 2001 From: Vadim Tryshev Date: Wed, 3 Oct 2018 16:34:41 -0700 Subject: [PATCH] Adding animation when opening app usage settings Bug: 118319143 Test: manual test on a prototype Change-Id: I33eab24f180daa60bba221df585469d141526b4b --- quickstep/src/com/android/quickstep/views/TaskView.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/quickstep/src/com/android/quickstep/views/TaskView.java b/quickstep/src/com/android/quickstep/views/TaskView.java index 2a4226faa2..a124fe478f 100644 --- a/quickstep/src/com/android/quickstep/views/TaskView.java +++ b/quickstep/src/com/android/quickstep/views/TaskView.java @@ -459,7 +459,7 @@ public class TaskView extends FrameLayout implements PageCallbacks { } if (action == R.string.accessibility_app_usage_settings) { - openAppUsageSettings(); + openAppUsageSettings(this); return true; } @@ -481,14 +481,16 @@ public class TaskView extends FrameLayout implements PageCallbacks { return super.performAccessibilityAction(action, arguments); } - private void openAppUsageSettings() { + private void openAppUsageSettings(View view) { final Intent intent = new Intent(SEE_TIME_IN_APP_TEMPLATE) .putExtra(Intent.EXTRA_PACKAGE_NAME, mTask.getTopComponent().getPackageName()).addFlags( Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK); try { final Launcher launcher = Launcher.getLauncher(getContext()); - launcher.startActivity(intent); + final ActivityOptions options = ActivityOptions.makeScaleUpAnimation(view, 0, 0, + view.getWidth(), view.getHeight()); + launcher.startActivity(intent, options.toBundle()); launcher.getUserEventDispatcher().logActionOnControl(LauncherLogProto.Action.Touch.TAP, LauncherLogProto.ControlType.APP_USAGE_SETTINGS, this); } catch (ActivityNotFoundException e) {