From c29ff0025bf0b1f43b34fe3e2dd6f043b61421ef Mon Sep 17 00:00:00 2001 From: Winson Date: Fri, 20 Nov 2015 16:00:45 -0800 Subject: [PATCH] Adding history view. - Initial changes to show a history view within Overview (behind tuner flag) - Restoring the task view dim in the stack Change-Id: I0503d11768736c86f3145942404391dfacd0ddd6 --- packages/SystemUI/Android.mk | 4 +- packages/SystemUI/res/layout/recents.xml | 6 + packages/SystemUI/res/layout/recents_history.xml | 36 ++++ .../SystemUI/res/layout/recents_history_button.xml | 26 +++ .../SystemUI/res/layout/recents_history_date.xml | 28 +++ .../SystemUI/res/layout/recents_history_task.xml | 27 +++ packages/SystemUI/res/values/config.xml | 3 + packages/SystemUI/res/values/strings.xml | 21 ++- packages/SystemUI/res/xml/tuner_prefs.xml | 5 + .../android/systemui/recents/RecentsActivity.java | 64 ++++++- .../systemui/recents/RecentsDebugFlags.java | 15 +- .../events/activity/HideHistoryButtonEvent.java | 26 +++ .../recents/events/activity/HideHistoryEvent.java | 38 ++++ .../events/activity/ShowHistoryButtonEvent.java | 26 +++ .../recents/events/activity/ShowHistoryEvent.java | 26 +++ .../recents/history/RecentsHistoryAdapter.java | 192 +++++++++++++++++++++ .../recents/history/RecentsHistoryView.java | 148 ++++++++++++++++ .../systemui/recents/views/RecentsView.java | 129 +++++++++++++- .../recents/views/TaskStackLayoutAlgorithm.java | 2 +- .../systemui/recents/views/TaskStackView.java | 44 ++++- .../recents/views/TaskStackViewScroller.java | 5 +- .../android/systemui/recents/views/TaskView.java | 18 +- packages/SystemUI/tests/Android.mk | 5 +- 23 files changed, 853 insertions(+), 41 deletions(-) create mode 100644 packages/SystemUI/res/layout/recents_history.xml create mode 100644 packages/SystemUI/res/layout/recents_history_button.xml create mode 100644 packages/SystemUI/res/layout/recents_history_date.xml create mode 100644 packages/SystemUI/res/layout/recents_history_task.xml create mode 100644 packages/SystemUI/src/com/android/systemui/recents/events/activity/HideHistoryButtonEvent.java create mode 100644 packages/SystemUI/src/com/android/systemui/recents/events/activity/HideHistoryEvent.java create mode 100644 packages/SystemUI/src/com/android/systemui/recents/events/activity/ShowHistoryButtonEvent.java create mode 100644 packages/SystemUI/src/com/android/systemui/recents/events/activity/ShowHistoryEvent.java create mode 100644 packages/SystemUI/src/com/android/systemui/recents/history/RecentsHistoryAdapter.java create mode 100644 packages/SystemUI/src/com/android/systemui/recents/history/RecentsHistoryView.java diff --git a/packages/SystemUI/Android.mk b/packages/SystemUI/Android.mk index 0cc2a67a3be3..ece34fb8fb63 100644 --- a/packages/SystemUI/Android.mk +++ b/packages/SystemUI/Android.mk @@ -6,7 +6,9 @@ LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := $(call all-java-files-under, src) $(call all-proto-files-under,src) $(call all-Iaidl-files-under, src) \ src/com/android/systemui/EventLogTags.logtags -LOCAL_STATIC_JAVA_LIBRARIES := Keyguard +LOCAL_STATIC_JAVA_LIBRARIES := \ + Keyguard \ + android-support-v7-recyclerview LOCAL_JAVA_LIBRARIES := telephony-common LOCAL_PACKAGE_NAME := SystemUI diff --git a/packages/SystemUI/res/layout/recents.xml b/packages/SystemUI/res/layout/recents.xml index 064d2258150f..2c010ddc6bdd 100644 --- a/packages/SystemUI/res/layout/recents.xml +++ b/packages/SystemUI/res/layout/recents.xml @@ -39,6 +39,12 @@ android:layout_width="match_parent" android:layout_height="match_parent" /> + + + + + + + + \ No newline at end of file diff --git a/packages/SystemUI/res/layout/recents_history_button.xml b/packages/SystemUI/res/layout/recents_history_button.xml new file mode 100644 index 000000000000..38457c7b2a61 --- /dev/null +++ b/packages/SystemUI/res/layout/recents_history_button.xml @@ -0,0 +1,26 @@ + + + \ No newline at end of file diff --git a/packages/SystemUI/res/layout/recents_history_date.xml b/packages/SystemUI/res/layout/recents_history_date.xml new file mode 100644 index 000000000000..6d6a9eed6187 --- /dev/null +++ b/packages/SystemUI/res/layout/recents_history_date.xml @@ -0,0 +1,28 @@ + + + \ No newline at end of file diff --git a/packages/SystemUI/res/layout/recents_history_task.xml b/packages/SystemUI/res/layout/recents_history_task.xml new file mode 100644 index 000000000000..b9de15606bfb --- /dev/null +++ b/packages/SystemUI/res/layout/recents_history_task.xml @@ -0,0 +1,27 @@ + + + \ No newline at end of file diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml index d8193abfa2dc..902db26d21fa 100644 --- a/packages/SystemUI/res/values/config.xml +++ b/packages/SystemUI/res/values/config.xml @@ -177,6 +177,9 @@ 225 + + 250 + 96 diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml index e0c0f6a5bb1b..04233ba064bd 100644 --- a/packages/SystemUI/res/values/strings.xml +++ b/packages/SystemUI/res/values/strings.xml @@ -698,6 +698,10 @@ search Could not start %s. + + More + + History Split Horizontal @@ -1157,21 +1161,26 @@ Use the new Quick Settings - + Enable paging - + Enable paging via the Overview button - + Enable fast toggle - + Enable launch timeout while paging - + Enable fullscreen screenshots - + Enable fullscreen screenshots in Overview + + Show History + + Enables the history view to see more recent tasks + Experimental diff --git a/packages/SystemUI/res/xml/tuner_prefs.xml b/packages/SystemUI/res/xml/tuner_prefs.xml index 4d07d5f2c9a3..f398af3d04c9 100644 --- a/packages/SystemUI/res/xml/tuner_prefs.xml +++ b/packages/SystemUI/res/xml/tuner_prefs.xml @@ -102,6 +102,11 @@ android:title="@string/overview_fullscreen_thumbnails" android:summary="@string/overview_fullscreen_thumbnails_desc" /> + +