Loading packages/SystemUI/res/anim/recents_fast_toggle_app_home_exit.xml 0 → 100644 +27 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* ** Copyright 2012, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ --> <!-- Recents Activity --> <set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false" android:zAdjustment="top"> <alpha android:fromAlpha="1.0" android:toAlpha="1.0" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" android:duration="250"/> </set> packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +9 −4 Original line number Diff line number Diff line Loading @@ -401,17 +401,22 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub ActivityManager.RunningTaskInfo runningTask = ssp.getTopMostTask(); // Return early if there is no running task if (runningTask == null) return; // Return early if the running task is in the home stack (optimization) if (SystemServicesProxy.isHomeStack(runningTask.stackId)) return; // Find the task in the recents list boolean isTopTaskHome = SystemServicesProxy.isHomeStack(runningTask.stackId); ArrayList<Task> tasks = focusedStack.getTasks(); Task toTask = null; ActivityOptions launchOpts = null; int taskCount = tasks.size(); for (int i = taskCount - 1; i >= 1; i--) { Task task = tasks.get(i); if (task.key.id == runningTask.id) { if (isTopTaskHome) { toTask = tasks.get(i - 1); launchOpts = ActivityOptions.makeCustomAnimation(mContext, R.anim.recents_launch_next_affiliated_task_target, R.anim.recents_fast_toggle_app_home_exit); break; } else if (task.key.id == runningTask.id) { toTask = tasks.get(i - 1); launchOpts = ActivityOptions.makeCustomAnimation(mContext, R.anim.recents_launch_prev_affiliated_task_target, Loading Loading @@ -815,7 +820,7 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub SystemServicesProxy ssp = Recents.getSystemServices(); String homeActivityPackage = ssp.getHomeActivityPackageName(); String searchWidgetPackage = Prefs.getString(mContext, Prefs.Key.SEARCH_APP_WIDGET_PACKAGE, null); Prefs.Key.OVERVIEW_SEARCH_APP_WIDGET_PACKAGE, null); // Determine whether we are coming from a search owned home activity boolean fromSearchHome = (homeActivityPackage != null) && Loading Loading
packages/SystemUI/res/anim/recents_fast_toggle_app_home_exit.xml 0 → 100644 +27 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- /* ** Copyright 2012, The Android Open Source Project ** ** Licensed under the Apache License, Version 2.0 (the "License"); ** you may not use this file except in compliance with the License. ** You may obtain a copy of the License at ** ** http://www.apache.org/licenses/LICENSE-2.0 ** ** Unless required by applicable law or agreed to in writing, software ** distributed under the License is distributed on an "AS IS" BASIS, ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. ** See the License for the specific language governing permissions and ** limitations under the License. */ --> <!-- Recents Activity --> <set xmlns:android="http://schemas.android.com/apk/res/android" android:shareInterpolator="false" android:zAdjustment="top"> <alpha android:fromAlpha="1.0" android:toAlpha="1.0" android:fillEnabled="true" android:fillBefore="true" android:fillAfter="true" android:duration="250"/> </set>
packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java +9 −4 Original line number Diff line number Diff line Loading @@ -401,17 +401,22 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub ActivityManager.RunningTaskInfo runningTask = ssp.getTopMostTask(); // Return early if there is no running task if (runningTask == null) return; // Return early if the running task is in the home stack (optimization) if (SystemServicesProxy.isHomeStack(runningTask.stackId)) return; // Find the task in the recents list boolean isTopTaskHome = SystemServicesProxy.isHomeStack(runningTask.stackId); ArrayList<Task> tasks = focusedStack.getTasks(); Task toTask = null; ActivityOptions launchOpts = null; int taskCount = tasks.size(); for (int i = taskCount - 1; i >= 1; i--) { Task task = tasks.get(i); if (task.key.id == runningTask.id) { if (isTopTaskHome) { toTask = tasks.get(i - 1); launchOpts = ActivityOptions.makeCustomAnimation(mContext, R.anim.recents_launch_next_affiliated_task_target, R.anim.recents_fast_toggle_app_home_exit); break; } else if (task.key.id == runningTask.id) { toTask = tasks.get(i - 1); launchOpts = ActivityOptions.makeCustomAnimation(mContext, R.anim.recents_launch_prev_affiliated_task_target, Loading Loading @@ -815,7 +820,7 @@ public class RecentsImpl extends IRecentsNonSystemUserCallbacks.Stub SystemServicesProxy ssp = Recents.getSystemServices(); String homeActivityPackage = ssp.getHomeActivityPackageName(); String searchWidgetPackage = Prefs.getString(mContext, Prefs.Key.SEARCH_APP_WIDGET_PACKAGE, null); Prefs.Key.OVERVIEW_SEARCH_APP_WIDGET_PACKAGE, null); // Determine whether we are coming from a search owned home activity boolean fromSearchHome = (homeActivityPackage != null) && Loading