Loading packages/SystemUI/res/drawable/recents_task_view_header_bg.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2014 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. --> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:attr/colorControlHighlight"> <item android:drawable="@android:color/transparent" /> </ripple> No newline at end of file packages/SystemUI/res/layout/recents_task_view.xml +1 −3 Original line number Diff line number Diff line Loading @@ -26,8 +26,7 @@ android:id="@+id/task_view_bar" android:layout_width="match_parent" android:layout_height="@dimen/recents_task_bar_height" android:layout_gravity="top|center_horizontal" android:background="@color/recents_task_bar_default_background_color"> android:layout_gravity="top|center_horizontal"> <com.android.systemui.recents.views.FixedSizeImageView android:id="@+id/application_icon" android:layout_width="@dimen/recents_task_view_application_icon_size" Loading Loading @@ -69,7 +68,6 @@ android:layout_gravity="bottom|right" android:layout_marginRight="15dp" android:layout_marginBottom="15dp" android:translationZ="50dp" android:contentDescription="@string/recents_lock_to_app_button_label" android:background="@drawable/recents_lock_to_task_button_bg"> <ImageView Loading packages/SystemUI/res/values/config.xml +2 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,8 @@ <integer name="recents_max_task_stack_view_dim">96</integer> <!-- The number of tasks that RecentsTaskLoader should load. --> <integer name="recents_max_num_tasks_to_load">50</integer> <!-- The delay to enforce between each alt-tab key press. --> <integer name="recents_alt_tab_key_delay">200</integer> <!-- Transposes the recents layout in landscape. --> <bool name="recents_transpose_layout_with_orientation">true</bool> Loading packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java +7 −6 Original line number Diff line number Diff line Loading @@ -345,8 +345,8 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta * Creates the activity options for an app->recents transition. If this method sets the static * screenshot, then we will use that for the transition. */ ActivityOptions getThumbnailTransitionActivityOptions(ActivityManager.RunningTaskInfo topTask) { ActivityOptions getThumbnailTransitionActivityOptions(ActivityManager.RunningTaskInfo topTask, boolean isTopTaskHome) { if (Constants.DebugFlags.App.EnableScreenshotAppTransition) { // Recycle the last screenshot consumeLastScreenshot(); Loading @@ -365,7 +365,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta Bitmap firstThumbnail = mSystemServicesProxy.getTaskThumbnail(topTask.id); if (firstThumbnail != null) { // Update the destination rect Rect toTaskRect = getThumbnailTransitionRect(topTask.id); Rect toTaskRect = getThumbnailTransitionRect(topTask.id, isTopTaskHome); if (toTaskRect.width() > 0 && toTaskRect.height() > 0) { // Create the new thumbnail for the animation down // XXX: We should find a way to optimize this so we don't need to create a new bitmap Loading @@ -389,7 +389,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta } /** Returns the transition rect for the given task id. */ Rect getThumbnailTransitionRect(int runningTaskId) { Rect getThumbnailTransitionRect(int runningTaskId, boolean isTopTaskHome) { // Get the stack of tasks that we are animating into TaskStack stack = RecentsTaskLoader.getShallowTaskStack(mSystemServicesProxy, -1); if (stack.getTaskCount() == 0) { Loading @@ -401,7 +401,8 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta TaskStackViewLayoutAlgorithm algo = tsv.getStackAlgorithm(); Rect taskStackBounds = new Rect(mTaskStackBounds); taskStackBounds.bottom -= mSystemInsets.bottom; tsv.computeRects(mWindowRect.width(), mWindowRect.height(), taskStackBounds, mTriggeredFromAltTab); tsv.computeRects(mWindowRect.width(), mWindowRect.height(), taskStackBounds, mTriggeredFromAltTab, isTopTaskHome); tsv.getScroller().setStackScrollToInitialState(); // Find the running task in the TaskStack Loading Loading @@ -442,7 +443,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta if (useThumbnailTransition) { // Try starting with a thumbnail transition ActivityOptions opts = getThumbnailTransitionActivityOptions(topTask); ActivityOptions opts = getThumbnailTransitionActivityOptions(topTask, isTopTaskHome); if (opts != null) { if (sLastScreenshot != null) { startAlternateRecentsActivity(topTask, opts, EXTRA_FROM_APP_FULL_SCREENSHOT); Loading packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +28 −11 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView RecentsConfiguration mConfig; boolean mVisible; long mLastTabKeyEventTime; // Top level views RecentsView mRecentsView; Loading Loading @@ -512,18 +513,34 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_TAB) { switch (keyCode) { case KeyEvent.KEYCODE_TAB: { boolean hasRepKeyTimeElapsed = (System.currentTimeMillis() - mLastTabKeyEventTime) > mConfig.altTabKeyDelay; if (event.getRepeatCount() <= 0 || hasRepKeyTimeElapsed) { // Focus the next task in the stack final boolean backward = event.isShiftPressed(); mRecentsView.focusNextTask(!backward); mLastTabKeyEventTime = System.currentTimeMillis(); } return true; } else if (keyCode == KeyEvent.KEYCODE_DPAD_UP) { } case KeyEvent.KEYCODE_DPAD_UP: { mRecentsView.focusNextTask(true); return true; } else if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) { } case KeyEvent.KEYCODE_DPAD_DOWN: { mRecentsView.focusNextTask(false); return true; } case KeyEvent.KEYCODE_DEL: case KeyEvent.KEYCODE_FORWARD_DEL: { mRecentsView.dismissFocusedTask(); return true; } default: break; } // Pass through the debug trigger mDebugTrigger.onKeyEvent(keyCode); return super.onKeyDown(keyCode, event); Loading Loading
packages/SystemUI/res/drawable/recents_task_view_header_bg.xml 0 → 100644 +20 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="utf-8"?> <!-- Copyright (C) 2014 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. --> <ripple xmlns:android="http://schemas.android.com/apk/res/android" android:color="?android:attr/colorControlHighlight"> <item android:drawable="@android:color/transparent" /> </ripple> No newline at end of file
packages/SystemUI/res/layout/recents_task_view.xml +1 −3 Original line number Diff line number Diff line Loading @@ -26,8 +26,7 @@ android:id="@+id/task_view_bar" android:layout_width="match_parent" android:layout_height="@dimen/recents_task_bar_height" android:layout_gravity="top|center_horizontal" android:background="@color/recents_task_bar_default_background_color"> android:layout_gravity="top|center_horizontal"> <com.android.systemui.recents.views.FixedSizeImageView android:id="@+id/application_icon" android:layout_width="@dimen/recents_task_view_application_icon_size" Loading Loading @@ -69,7 +68,6 @@ android:layout_gravity="bottom|right" android:layout_marginRight="15dp" android:layout_marginBottom="15dp" android:translationZ="50dp" android:contentDescription="@string/recents_lock_to_app_button_label" android:background="@drawable/recents_lock_to_task_button_bg"> <ImageView Loading
packages/SystemUI/res/values/config.xml +2 −0 Original line number Diff line number Diff line Loading @@ -147,6 +147,8 @@ <integer name="recents_max_task_stack_view_dim">96</integer> <!-- The number of tasks that RecentsTaskLoader should load. --> <integer name="recents_max_num_tasks_to_load">50</integer> <!-- The delay to enforce between each alt-tab key press. --> <integer name="recents_alt_tab_key_delay">200</integer> <!-- Transposes the recents layout in landscape. --> <bool name="recents_transpose_layout_with_orientation">true</bool> Loading
packages/SystemUI/src/com/android/systemui/recents/AlternateRecentsComponent.java +7 −6 Original line number Diff line number Diff line Loading @@ -345,8 +345,8 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta * Creates the activity options for an app->recents transition. If this method sets the static * screenshot, then we will use that for the transition. */ ActivityOptions getThumbnailTransitionActivityOptions(ActivityManager.RunningTaskInfo topTask) { ActivityOptions getThumbnailTransitionActivityOptions(ActivityManager.RunningTaskInfo topTask, boolean isTopTaskHome) { if (Constants.DebugFlags.App.EnableScreenshotAppTransition) { // Recycle the last screenshot consumeLastScreenshot(); Loading @@ -365,7 +365,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta Bitmap firstThumbnail = mSystemServicesProxy.getTaskThumbnail(topTask.id); if (firstThumbnail != null) { // Update the destination rect Rect toTaskRect = getThumbnailTransitionRect(topTask.id); Rect toTaskRect = getThumbnailTransitionRect(topTask.id, isTopTaskHome); if (toTaskRect.width() > 0 && toTaskRect.height() > 0) { // Create the new thumbnail for the animation down // XXX: We should find a way to optimize this so we don't need to create a new bitmap Loading @@ -389,7 +389,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta } /** Returns the transition rect for the given task id. */ Rect getThumbnailTransitionRect(int runningTaskId) { Rect getThumbnailTransitionRect(int runningTaskId, boolean isTopTaskHome) { // Get the stack of tasks that we are animating into TaskStack stack = RecentsTaskLoader.getShallowTaskStack(mSystemServicesProxy, -1); if (stack.getTaskCount() == 0) { Loading @@ -401,7 +401,8 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta TaskStackViewLayoutAlgorithm algo = tsv.getStackAlgorithm(); Rect taskStackBounds = new Rect(mTaskStackBounds); taskStackBounds.bottom -= mSystemInsets.bottom; tsv.computeRects(mWindowRect.width(), mWindowRect.height(), taskStackBounds, mTriggeredFromAltTab); tsv.computeRects(mWindowRect.width(), mWindowRect.height(), taskStackBounds, mTriggeredFromAltTab, isTopTaskHome); tsv.getScroller().setStackScrollToInitialState(); // Find the running task in the TaskStack Loading Loading @@ -442,7 +443,7 @@ public class AlternateRecentsComponent implements ActivityOptions.OnAnimationSta if (useThumbnailTransition) { // Try starting with a thumbnail transition ActivityOptions opts = getThumbnailTransitionActivityOptions(topTask); ActivityOptions opts = getThumbnailTransitionActivityOptions(topTask, isTopTaskHome); if (opts != null) { if (sLastScreenshot != null) { startAlternateRecentsActivity(topTask, opts, EXTRA_FROM_APP_FULL_SCREENSHOT); Loading
packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java +28 −11 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView RecentsConfiguration mConfig; boolean mVisible; long mLastTabKeyEventTime; // Top level views RecentsView mRecentsView; Loading Loading @@ -512,18 +513,34 @@ public class RecentsActivity extends Activity implements RecentsView.RecentsView @Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_TAB) { switch (keyCode) { case KeyEvent.KEYCODE_TAB: { boolean hasRepKeyTimeElapsed = (System.currentTimeMillis() - mLastTabKeyEventTime) > mConfig.altTabKeyDelay; if (event.getRepeatCount() <= 0 || hasRepKeyTimeElapsed) { // Focus the next task in the stack final boolean backward = event.isShiftPressed(); mRecentsView.focusNextTask(!backward); mLastTabKeyEventTime = System.currentTimeMillis(); } return true; } else if (keyCode == KeyEvent.KEYCODE_DPAD_UP) { } case KeyEvent.KEYCODE_DPAD_UP: { mRecentsView.focusNextTask(true); return true; } else if (keyCode == KeyEvent.KEYCODE_DPAD_DOWN) { } case KeyEvent.KEYCODE_DPAD_DOWN: { mRecentsView.focusNextTask(false); return true; } case KeyEvent.KEYCODE_DEL: case KeyEvent.KEYCODE_FORWARD_DEL: { mRecentsView.dismissFocusedTask(); return true; } default: break; } // Pass through the debug trigger mDebugTrigger.onKeyEvent(keyCode); return super.onKeyDown(keyCode, event); Loading