diff --git a/packages/SystemUI/Android.bp b/packages/SystemUI/Android.bp
index 9c33116a149bf..b770d5c883244 100644
--- a/packages/SystemUI/Android.bp
+++ b/packages/SystemUI/Android.bp
@@ -156,3 +156,43 @@ android_app {
],
}
+
+// Only used for products that are shipping legacy Recents
+android_app {
+ name: "SystemUIWithLegacyRecents",
+ overrides: [
+ "SystemUI",
+ ],
+
+ platform_apis: true,
+ certificate: "platform",
+ privileged: true,
+
+ dxflags: ["--multi-dex"],
+ aaptflags: [
+ "--extra-packages",
+ "com.android.keyguard",
+ ],
+ optimize: {
+ proguard_flags_files: ["proguard.flags", "legacy/recents/proguard.flags"],
+ },
+
+ static_libs: [
+ "SystemUI-core",
+ ],
+ libs: [
+ "telephony-common",
+ "android.car",
+ "android.car.user",
+ ],
+
+ srcs: [
+ "legacy/recents/src/**/*.java",
+ "legacy/recents/src/**/I*.aidl",
+ ],
+ resource_dirs: [
+ "legacy/recents/res",
+ ],
+
+ manifest: "legacy/recents/AndroidManifest.xml",
+}
diff --git a/packages/SystemUI/AndroidManifest.xml b/packages/SystemUI/AndroidManifest.xml
index fef9ae813f12b..44bc3f2126541 100644
--- a/packages/SystemUI/AndroidManifest.xml
+++ b/packages/SystemUI/AndroidManifest.xml
@@ -128,9 +128,6 @@
-
-
-
@@ -247,14 +244,14 @@
android:exported="true"
/>
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/SystemUI/legacy/recents/proguard.flags b/packages/SystemUI/legacy/recents/proguard.flags
new file mode 100644
index 0000000000000..c3589491865d6
--- /dev/null
+++ b/packages/SystemUI/legacy/recents/proguard.flags
@@ -0,0 +1,14 @@
+-keepclassmembers class ** {
+ public void onBusEvent(**);
+ public void onInterprocessBusEvent(**);
+}
+-keepclassmembers class ** extends **.EventBus$InterprocessEvent {
+ public (android.os.Bundle);
+}
+
+-keep class com.android.systemui.recents.views.TaskView {
+ public int getDim();
+ public void setDim(int);
+ public float getTaskProgress();
+ public void setTaskProgress(float);
+}
\ No newline at end of file
diff --git a/packages/SystemUI/res/anim/recents_fast_toggle_app_home_exit.xml b/packages/SystemUI/legacy/recents/res/anim/recents_fast_toggle_app_home_exit.xml
similarity index 100%
rename from packages/SystemUI/res/anim/recents_fast_toggle_app_home_exit.xml
rename to packages/SystemUI/legacy/recents/res/anim/recents_fast_toggle_app_home_exit.xml
diff --git a/packages/SystemUI/res/anim/recents_from_launcher_enter.xml b/packages/SystemUI/legacy/recents/res/anim/recents_from_launcher_enter.xml
similarity index 100%
rename from packages/SystemUI/res/anim/recents_from_launcher_enter.xml
rename to packages/SystemUI/legacy/recents/res/anim/recents_from_launcher_enter.xml
diff --git a/packages/SystemUI/res/anim/recents_from_launcher_exit.xml b/packages/SystemUI/legacy/recents/res/anim/recents_from_launcher_exit.xml
similarity index 100%
rename from packages/SystemUI/res/anim/recents_from_launcher_exit.xml
rename to packages/SystemUI/legacy/recents/res/anim/recents_from_launcher_exit.xml
diff --git a/packages/SystemUI/res/anim/recents_from_unknown_enter.xml b/packages/SystemUI/legacy/recents/res/anim/recents_from_unknown_enter.xml
similarity index 100%
rename from packages/SystemUI/res/anim/recents_from_unknown_enter.xml
rename to packages/SystemUI/legacy/recents/res/anim/recents_from_unknown_enter.xml
diff --git a/packages/SystemUI/res/anim/recents_from_unknown_exit.xml b/packages/SystemUI/legacy/recents/res/anim/recents_from_unknown_exit.xml
similarity index 100%
rename from packages/SystemUI/res/anim/recents_from_unknown_exit.xml
rename to packages/SystemUI/legacy/recents/res/anim/recents_from_unknown_exit.xml
diff --git a/packages/SystemUI/res/anim/recents_launch_next_affiliated_task_bounce.xml b/packages/SystemUI/legacy/recents/res/anim/recents_launch_next_affiliated_task_bounce.xml
similarity index 100%
rename from packages/SystemUI/res/anim/recents_launch_next_affiliated_task_bounce.xml
rename to packages/SystemUI/legacy/recents/res/anim/recents_launch_next_affiliated_task_bounce.xml
diff --git a/packages/SystemUI/res/anim/recents_launch_next_affiliated_task_source.xml b/packages/SystemUI/legacy/recents/res/anim/recents_launch_next_affiliated_task_source.xml
similarity index 100%
rename from packages/SystemUI/res/anim/recents_launch_next_affiliated_task_source.xml
rename to packages/SystemUI/legacy/recents/res/anim/recents_launch_next_affiliated_task_source.xml
diff --git a/packages/SystemUI/res/anim/recents_launch_next_affiliated_task_target.xml b/packages/SystemUI/legacy/recents/res/anim/recents_launch_next_affiliated_task_target.xml
similarity index 100%
rename from packages/SystemUI/res/anim/recents_launch_next_affiliated_task_target.xml
rename to packages/SystemUI/legacy/recents/res/anim/recents_launch_next_affiliated_task_target.xml
diff --git a/packages/SystemUI/res/anim/recents_launch_prev_affiliated_task_bounce.xml b/packages/SystemUI/legacy/recents/res/anim/recents_launch_prev_affiliated_task_bounce.xml
similarity index 100%
rename from packages/SystemUI/res/anim/recents_launch_prev_affiliated_task_bounce.xml
rename to packages/SystemUI/legacy/recents/res/anim/recents_launch_prev_affiliated_task_bounce.xml
diff --git a/packages/SystemUI/res/anim/recents_launch_prev_affiliated_task_source.xml b/packages/SystemUI/legacy/recents/res/anim/recents_launch_prev_affiliated_task_source.xml
similarity index 100%
rename from packages/SystemUI/res/anim/recents_launch_prev_affiliated_task_source.xml
rename to packages/SystemUI/legacy/recents/res/anim/recents_launch_prev_affiliated_task_source.xml
diff --git a/packages/SystemUI/res/anim/recents_launch_prev_affiliated_task_target.xml b/packages/SystemUI/legacy/recents/res/anim/recents_launch_prev_affiliated_task_target.xml
similarity index 100%
rename from packages/SystemUI/res/anim/recents_launch_prev_affiliated_task_target.xml
rename to packages/SystemUI/legacy/recents/res/anim/recents_launch_prev_affiliated_task_target.xml
diff --git a/packages/SystemUI/res/anim/recents_to_launcher_enter.xml b/packages/SystemUI/legacy/recents/res/anim/recents_to_launcher_enter.xml
similarity index 100%
rename from packages/SystemUI/res/anim/recents_to_launcher_enter.xml
rename to packages/SystemUI/legacy/recents/res/anim/recents_to_launcher_enter.xml
diff --git a/packages/SystemUI/res/anim/recents_to_launcher_exit.xml b/packages/SystemUI/legacy/recents/res/anim/recents_to_launcher_exit.xml
similarity index 100%
rename from packages/SystemUI/res/anim/recents_to_launcher_exit.xml
rename to packages/SystemUI/legacy/recents/res/anim/recents_to_launcher_exit.xml
diff --git a/packages/SystemUI/res/drawable-hdpi/recents_lower_gradient.9.png b/packages/SystemUI/legacy/recents/res/drawable-hdpi/recents_lower_gradient.9.png
similarity index 100%
rename from packages/SystemUI/res/drawable-hdpi/recents_lower_gradient.9.png
rename to packages/SystemUI/legacy/recents/res/drawable-hdpi/recents_lower_gradient.9.png
diff --git a/packages/SystemUI/res/drawable-hdpi/recents_status_gradient.9.png b/packages/SystemUI/legacy/recents/res/drawable-hdpi/recents_status_gradient.9.png
similarity index 100%
rename from packages/SystemUI/res/drawable-hdpi/recents_status_gradient.9.png
rename to packages/SystemUI/legacy/recents/res/drawable-hdpi/recents_status_gradient.9.png
diff --git a/packages/SystemUI/res/drawable-mdpi/recents_lower_gradient.9.png b/packages/SystemUI/legacy/recents/res/drawable-mdpi/recents_lower_gradient.9.png
similarity index 100%
rename from packages/SystemUI/res/drawable-mdpi/recents_lower_gradient.9.png
rename to packages/SystemUI/legacy/recents/res/drawable-mdpi/recents_lower_gradient.9.png
diff --git a/packages/SystemUI/res/drawable-mdpi/recents_status_gradient.9.png b/packages/SystemUI/legacy/recents/res/drawable-mdpi/recents_status_gradient.9.png
similarity index 100%
rename from packages/SystemUI/res/drawable-mdpi/recents_status_gradient.9.png
rename to packages/SystemUI/legacy/recents/res/drawable-mdpi/recents_status_gradient.9.png
diff --git a/packages/SystemUI/res/drawable-xhdpi/recents_lower_gradient.9.png b/packages/SystemUI/legacy/recents/res/drawable-xhdpi/recents_lower_gradient.9.png
similarity index 100%
rename from packages/SystemUI/res/drawable-xhdpi/recents_lower_gradient.9.png
rename to packages/SystemUI/legacy/recents/res/drawable-xhdpi/recents_lower_gradient.9.png
diff --git a/packages/SystemUI/res/drawable-xhdpi/recents_status_gradient.9.png b/packages/SystemUI/legacy/recents/res/drawable-xhdpi/recents_status_gradient.9.png
similarity index 100%
rename from packages/SystemUI/res/drawable-xhdpi/recents_status_gradient.9.png
rename to packages/SystemUI/legacy/recents/res/drawable-xhdpi/recents_status_gradient.9.png
diff --git a/packages/SystemUI/res/drawable-xxhdpi/recents_lower_gradient.9.png b/packages/SystemUI/legacy/recents/res/drawable-xxhdpi/recents_lower_gradient.9.png
similarity index 100%
rename from packages/SystemUI/res/drawable-xxhdpi/recents_lower_gradient.9.png
rename to packages/SystemUI/legacy/recents/res/drawable-xxhdpi/recents_lower_gradient.9.png
diff --git a/packages/SystemUI/res/drawable-xxhdpi/recents_status_gradient.9.png b/packages/SystemUI/legacy/recents/res/drawable-xxhdpi/recents_status_gradient.9.png
similarity index 100%
rename from packages/SystemUI/res/drawable-xxhdpi/recents_status_gradient.9.png
rename to packages/SystemUI/legacy/recents/res/drawable-xxhdpi/recents_status_gradient.9.png
diff --git a/packages/SystemUI/res/drawable-xxhdpi/recents_task_shadow.9.png b/packages/SystemUI/legacy/recents/res/drawable-xxhdpi/recents_task_shadow.9.png
similarity index 100%
rename from packages/SystemUI/res/drawable-xxhdpi/recents_task_shadow.9.png
rename to packages/SystemUI/legacy/recents/res/drawable-xxhdpi/recents_task_shadow.9.png
diff --git a/packages/SystemUI/res/drawable/ic_lock_to_app_24dp.xml b/packages/SystemUI/legacy/recents/res/drawable/ic_lock_to_app_24dp.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/ic_lock_to_app_24dp.xml
rename to packages/SystemUI/legacy/recents/res/drawable/ic_lock_to_app_24dp.xml
diff --git a/packages/SystemUI/res/drawable/recents_dismiss_dark.xml b/packages/SystemUI/legacy/recents/res/drawable/recents_dismiss_dark.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/recents_dismiss_dark.xml
rename to packages/SystemUI/legacy/recents/res/drawable/recents_dismiss_dark.xml
diff --git a/packages/SystemUI/res/drawable/recents_dismiss_light.xml b/packages/SystemUI/legacy/recents/res/drawable/recents_dismiss_light.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/recents_dismiss_light.xml
rename to packages/SystemUI/legacy/recents/res/drawable/recents_dismiss_light.xml
diff --git a/packages/SystemUI/res/drawable/recents_empty.xml b/packages/SystemUI/legacy/recents/res/drawable/recents_empty.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/recents_empty.xml
rename to packages/SystemUI/legacy/recents/res/drawable/recents_empty.xml
diff --git a/packages/SystemUI/res/drawable/recents_freeform_workspace_bg.xml b/packages/SystemUI/legacy/recents/res/drawable/recents_freeform_workspace_bg.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/recents_freeform_workspace_bg.xml
rename to packages/SystemUI/legacy/recents/res/drawable/recents_freeform_workspace_bg.xml
diff --git a/packages/SystemUI/res/drawable/recents_grid_task_view_focus_frame_background.xml b/packages/SystemUI/legacy/recents/res/drawable/recents_grid_task_view_focus_frame_background.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/recents_grid_task_view_focus_frame_background.xml
rename to packages/SystemUI/legacy/recents/res/drawable/recents_grid_task_view_focus_frame_background.xml
diff --git a/packages/SystemUI/res/drawable/recents_info_dark.xml b/packages/SystemUI/legacy/recents/res/drawable/recents_info_dark.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/recents_info_dark.xml
rename to packages/SystemUI/legacy/recents/res/drawable/recents_info_dark.xml
diff --git a/packages/SystemUI/res/drawable/recents_info_light.xml b/packages/SystemUI/legacy/recents/res/drawable/recents_info_light.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/recents_info_light.xml
rename to packages/SystemUI/legacy/recents/res/drawable/recents_info_light.xml
diff --git a/packages/SystemUI/res/drawable/recents_lock_to_app_pin.xml b/packages/SystemUI/legacy/recents/res/drawable/recents_lock_to_app_pin.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/recents_lock_to_app_pin.xml
rename to packages/SystemUI/legacy/recents/res/drawable/recents_lock_to_app_pin.xml
diff --git a/packages/SystemUI/res/drawable/recents_lock_to_task_button_bg.xml b/packages/SystemUI/legacy/recents/res/drawable/recents_lock_to_task_button_bg.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/recents_lock_to_task_button_bg.xml
rename to packages/SystemUI/legacy/recents/res/drawable/recents_lock_to_task_button_bg.xml
diff --git a/packages/SystemUI/res/drawable/recents_low_ram_stack_button_background.xml b/packages/SystemUI/legacy/recents/res/drawable/recents_low_ram_stack_button_background.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/recents_low_ram_stack_button_background.xml
rename to packages/SystemUI/legacy/recents/res/drawable/recents_low_ram_stack_button_background.xml
diff --git a/packages/SystemUI/res/drawable/recents_move_task_freeform_dark.xml b/packages/SystemUI/legacy/recents/res/drawable/recents_move_task_freeform_dark.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/recents_move_task_freeform_dark.xml
rename to packages/SystemUI/legacy/recents/res/drawable/recents_move_task_freeform_dark.xml
diff --git a/packages/SystemUI/res/drawable/recents_move_task_freeform_light.xml b/packages/SystemUI/legacy/recents/res/drawable/recents_move_task_freeform_light.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/recents_move_task_freeform_light.xml
rename to packages/SystemUI/legacy/recents/res/drawable/recents_move_task_freeform_light.xml
diff --git a/packages/SystemUI/res/drawable/recents_move_task_fullscreen_dark.xml b/packages/SystemUI/legacy/recents/res/drawable/recents_move_task_fullscreen_dark.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/recents_move_task_fullscreen_dark.xml
rename to packages/SystemUI/legacy/recents/res/drawable/recents_move_task_fullscreen_dark.xml
diff --git a/packages/SystemUI/res/drawable/recents_move_task_fullscreen_light.xml b/packages/SystemUI/legacy/recents/res/drawable/recents_move_task_fullscreen_light.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/recents_move_task_fullscreen_light.xml
rename to packages/SystemUI/legacy/recents/res/drawable/recents_move_task_fullscreen_light.xml
diff --git a/packages/SystemUI/res/drawable/recents_stack_action_background.xml b/packages/SystemUI/legacy/recents/res/drawable/recents_stack_action_background.xml
similarity index 100%
rename from packages/SystemUI/res/drawable/recents_stack_action_background.xml
rename to packages/SystemUI/legacy/recents/res/drawable/recents_stack_action_background.xml
diff --git a/packages/SystemUI/res/interpolator/recents_from_launcher_exit_interpolator.xml b/packages/SystemUI/legacy/recents/res/interpolator/recents_from_launcher_exit_interpolator.xml
similarity index 100%
rename from packages/SystemUI/res/interpolator/recents_from_launcher_exit_interpolator.xml
rename to packages/SystemUI/legacy/recents/res/interpolator/recents_from_launcher_exit_interpolator.xml
diff --git a/packages/SystemUI/res/interpolator/recents_launch_next_affiliated_task_bounce_scale.xml b/packages/SystemUI/legacy/recents/res/interpolator/recents_launch_next_affiliated_task_bounce_scale.xml
similarity index 100%
rename from packages/SystemUI/res/interpolator/recents_launch_next_affiliated_task_bounce_scale.xml
rename to packages/SystemUI/legacy/recents/res/interpolator/recents_launch_next_affiliated_task_bounce_scale.xml
diff --git a/packages/SystemUI/res/interpolator/recents_launch_prev_affiliated_task_bounce_ydelta.xml b/packages/SystemUI/legacy/recents/res/interpolator/recents_launch_prev_affiliated_task_bounce_ydelta.xml
similarity index 100%
rename from packages/SystemUI/res/interpolator/recents_launch_prev_affiliated_task_bounce_ydelta.xml
rename to packages/SystemUI/legacy/recents/res/interpolator/recents_launch_prev_affiliated_task_bounce_ydelta.xml
diff --git a/packages/SystemUI/res/interpolator/recents_to_launcher_enter_interpolator.xml b/packages/SystemUI/legacy/recents/res/interpolator/recents_to_launcher_enter_interpolator.xml
similarity index 100%
rename from packages/SystemUI/res/interpolator/recents_to_launcher_enter_interpolator.xml
rename to packages/SystemUI/legacy/recents/res/interpolator/recents_to_launcher_enter_interpolator.xml
diff --git a/packages/SystemUI/res/layout/recents.xml b/packages/SystemUI/legacy/recents/res/layout/recents.xml
similarity index 100%
rename from packages/SystemUI/res/layout/recents.xml
rename to packages/SystemUI/legacy/recents/res/layout/recents.xml
diff --git a/packages/SystemUI/res/layout/recents_empty.xml b/packages/SystemUI/legacy/recents/res/layout/recents_empty.xml
similarity index 100%
rename from packages/SystemUI/res/layout/recents_empty.xml
rename to packages/SystemUI/legacy/recents/res/layout/recents_empty.xml
diff --git a/packages/SystemUI/res/layout/recents_grid_task_view.xml b/packages/SystemUI/legacy/recents/res/layout/recents_grid_task_view.xml
similarity index 100%
rename from packages/SystemUI/res/layout/recents_grid_task_view.xml
rename to packages/SystemUI/legacy/recents/res/layout/recents_grid_task_view.xml
diff --git a/packages/SystemUI/res/layout/recents_incompatible_app_overlay.xml b/packages/SystemUI/legacy/recents/res/layout/recents_incompatible_app_overlay.xml
similarity index 100%
rename from packages/SystemUI/res/layout/recents_incompatible_app_overlay.xml
rename to packages/SystemUI/legacy/recents/res/layout/recents_incompatible_app_overlay.xml
diff --git a/packages/SystemUI/res/layout/recents_low_ram_stack_action_button.xml b/packages/SystemUI/legacy/recents/res/layout/recents_low_ram_stack_action_button.xml
similarity index 100%
rename from packages/SystemUI/res/layout/recents_low_ram_stack_action_button.xml
rename to packages/SystemUI/legacy/recents/res/layout/recents_low_ram_stack_action_button.xml
diff --git a/packages/SystemUI/res/layout/recents_search_bar.xml b/packages/SystemUI/legacy/recents/res/layout/recents_search_bar.xml
similarity index 100%
rename from packages/SystemUI/res/layout/recents_search_bar.xml
rename to packages/SystemUI/legacy/recents/res/layout/recents_search_bar.xml
diff --git a/packages/SystemUI/res/layout/recents_stack_action_button.xml b/packages/SystemUI/legacy/recents/res/layout/recents_stack_action_button.xml
similarity index 100%
rename from packages/SystemUI/res/layout/recents_stack_action_button.xml
rename to packages/SystemUI/legacy/recents/res/layout/recents_stack_action_button.xml
diff --git a/packages/SystemUI/res/layout/recents_task_view.xml b/packages/SystemUI/legacy/recents/res/layout/recents_task_view.xml
similarity index 100%
rename from packages/SystemUI/res/layout/recents_task_view.xml
rename to packages/SystemUI/legacy/recents/res/layout/recents_task_view.xml
diff --git a/packages/SystemUI/res/layout/recents_task_view_header.xml b/packages/SystemUI/legacy/recents/res/layout/recents_task_view_header.xml
similarity index 100%
rename from packages/SystemUI/res/layout/recents_task_view_header.xml
rename to packages/SystemUI/legacy/recents/res/layout/recents_task_view_header.xml
diff --git a/packages/SystemUI/res/layout/recents_task_view_header_overlay.xml b/packages/SystemUI/legacy/recents/res/layout/recents_task_view_header_overlay.xml
similarity index 100%
rename from packages/SystemUI/res/layout/recents_task_view_header_overlay.xml
rename to packages/SystemUI/legacy/recents/res/layout/recents_task_view_header_overlay.xml
diff --git a/packages/SystemUI/res/layout/recents_task_view_header_progress_bar.xml b/packages/SystemUI/legacy/recents/res/layout/recents_task_view_header_progress_bar.xml
similarity index 100%
rename from packages/SystemUI/res/layout/recents_task_view_header_progress_bar.xml
rename to packages/SystemUI/legacy/recents/res/layout/recents_task_view_header_progress_bar.xml
diff --git a/packages/SystemUI/res/layout/recents_task_view_incompatible_app_toast.xml b/packages/SystemUI/legacy/recents/res/layout/recents_task_view_incompatible_app_toast.xml
similarity index 100%
rename from packages/SystemUI/res/layout/recents_task_view_incompatible_app_toast.xml
rename to packages/SystemUI/legacy/recents/res/layout/recents_task_view_incompatible_app_toast.xml
diff --git a/packages/SystemUI/res/layout/recents_task_view_lock_to_app.xml b/packages/SystemUI/legacy/recents/res/layout/recents_task_view_lock_to_app.xml
similarity index 100%
rename from packages/SystemUI/res/layout/recents_task_view_lock_to_app.xml
rename to packages/SystemUI/legacy/recents/res/layout/recents_task_view_lock_to_app.xml
diff --git a/packages/SystemUI/src/com/android/systemui/RecentsComponent.java b/packages/SystemUI/legacy/recents/res/values-sw600dp/dimens.xml
similarity index 50%
rename from packages/SystemUI/src/com/android/systemui/RecentsComponent.java
rename to packages/SystemUI/legacy/recents/res/values-sw600dp/dimens.xml
index fb343f9b9b45d..20d6670cb5b94 100644
--- a/packages/SystemUI/src/com/android/systemui/RecentsComponent.java
+++ b/packages/SystemUI/legacy/recents/res/values-sw600dp/dimens.xml
@@ -1,31 +1,21 @@
-/*
- * Copyright (C) 2013 The Android Open Source Project
+
+
+
+
+ 192dp
+
diff --git a/packages/SystemUI/legacy/recents/res/values/attrs.xml b/packages/SystemUI/legacy/recents/res/values/attrs.xml
new file mode 100644
index 0000000000000..ef4cd5b959deb
--- /dev/null
+++ b/packages/SystemUI/legacy/recents/res/values/attrs.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/SystemUI/legacy/recents/res/values/colors.xml b/packages/SystemUI/legacy/recents/res/values/colors.xml
new file mode 100644
index 0000000000000..88b9b70956efa
--- /dev/null
+++ b/packages/SystemUI/legacy/recents/res/values/colors.xml
@@ -0,0 +1,51 @@
+
+
+
+
+ #ff676767
+
+ #ffe6e6e6
+
+ #fff3f3f3
+
+ #ffeeeeee
+
+ #cc000000
+
+ #ccffffff
+
+ #99000000
+
+ #ffe6e6e6
+
+ #ff666666
+
+ #33FFFFFF
+
+
+ #CCFFFFFF
+
+ #CC000000
+
+
+ #44000000
+
+
+ #03000000
+
\ No newline at end of file
diff --git a/packages/SystemUI/legacy/recents/res/values/config.xml b/packages/SystemUI/legacy/recents/res/values/config.xml
new file mode 100644
index 0000000000000..2ff9abf4003d4
--- /dev/null
+++ b/packages/SystemUI/legacy/recents/res/values/config.xml
@@ -0,0 +1,75 @@
+
+
+
+
+
+
+
+ com.android.systemui.recents.LegacyRecentsImpl
+
+
+ false
+
+
+ 10
+
+
+ 20
+
+
+ false
+
+
+ 1000
+
+
+ 200
+
+
+ 125
+
+
+ 125
+
+
+ 400
+
+
+ 200
+
+
+ 200
+
+
+ 0
+
+
+ - -3
+ - 2
+
+
+ - -2
+ - 2.5
+
\ No newline at end of file
diff --git a/packages/SystemUI/legacy/recents/res/values/dimens.xml b/packages/SystemUI/legacy/recents/res/values/dimens.xml
new file mode 100644
index 0000000000000..528610e4c9908
--- /dev/null
+++ b/packages/SystemUI/legacy/recents/res/values/dimens.xml
@@ -0,0 +1,110 @@
+
+
+
+
+
+
+ 16dp
+ 16dp
+ 32dp
+ 40dp
+ 16dp
+ 16dp
+ 48dp
+ 16dp
+ 64dp
+ 16dp
+
+
+ 48dp
+
+ 56dp
+
+
+ 128dp
+ 80dp
+ 72dp
+ 72dp
+ 160dp
+ 112dp
+
+
+ 3dp
+ 24dp
+
+
+ 16dp
+
+
+ 8dp
+
+
+
+
+ 56dp
+ 64dp
+
+
+ 16dp
+ 20dp
+
+
+ 2dp
+ 6dp
+
+
+ 1dp
+
+
+ 56dp
+ 28dp
+
+
+ 24dp
+
+
+ 14sp
+
+
+ - 0.6
+
+
+ 32dp
+
+
+ 144dp
+
+
+ 100dp
+
+
+ - 0.5
+
+
+ 600dp
+
+
\ No newline at end of file
diff --git a/packages/SystemUI/res/values/dimens_grid.xml b/packages/SystemUI/legacy/recents/res/values/dimens_grid.xml
similarity index 100%
rename from packages/SystemUI/res/values/dimens_grid.xml
rename to packages/SystemUI/legacy/recents/res/values/dimens_grid.xml
diff --git a/packages/SystemUI/legacy/recents/res/values/strings.xml b/packages/SystemUI/legacy/recents/res/values/strings.xml
new file mode 100644
index 0000000000000..4b44ba969d6e2
--- /dev/null
+++ b/packages/SystemUI/legacy/recents/res/values/strings.xml
@@ -0,0 +1,67 @@
+
+
+
+
+
+ Overview.
+
+
+ Dismiss %s.
+
+ %s dismissed.
+
+ All recent applications dismissed.
+
+ Open %s application info.
+
+ Starting %s.
+
+
+ No recent items
+
+ You\'ve cleared everything
+
+ Application Info
+
+ screen pinning
+
+ search
+
+ Could not start %s.
+
+ %s is disabled in safe-mode.
+
+ Clear all
+
+ Drag here to use split screen
+
+
+ Split Horizontal
+
+ Split Vertical
+
+ Split Custom
+
+ Split screen to the top
+
+ Split screen to the left
+
+ Split screen to the right
+
+
\ No newline at end of file
diff --git a/packages/SystemUI/legacy/recents/res/values/styles.xml b/packages/SystemUI/legacy/recents/res/values/styles.xml
new file mode 100644
index 0000000000000..eb16be7c95b60
--- /dev/null
+++ b/packages/SystemUI/legacy/recents/res/values/styles.xml
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/packages/SystemUI/src/com/android/systemui/recents/Constants.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/Constants.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/Constants.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/Constants.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/IRecentsNonSystemUserCallbacks.aidl b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/IRecentsNonSystemUserCallbacks.aidl
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/IRecentsNonSystemUserCallbacks.aidl
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/IRecentsNonSystemUserCallbacks.aidl
diff --git a/packages/SystemUI/src/com/android/systemui/recents/IRecentsSystemUserCallbacks.aidl b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/IRecentsSystemUserCallbacks.aidl
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/IRecentsSystemUserCallbacks.aidl
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/IRecentsSystemUserCallbacks.aidl
diff --git a/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/LegacyRecentsImpl.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/LegacyRecentsImpl.java
new file mode 100644
index 0000000000000..b7bb751c1582c
--- /dev/null
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/LegacyRecentsImpl.java
@@ -0,0 +1,744 @@
+/*
+ * 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.
+ */
+
+package com.android.systemui.recents;
+
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_HOME;
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_RECENTS;
+import static android.app.WindowConfiguration.ACTIVITY_TYPE_UNDEFINED;
+import static com.android.systemui.statusbar.phone.StatusBar.SYSTEM_DIALOG_REASON_RECENT_APPS;
+
+import android.app.ActivityManager;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.content.pm.ActivityInfo;
+import android.content.res.Configuration;
+import android.content.res.Resources;
+import android.graphics.Point;
+import android.graphics.Rect;
+import android.hardware.display.DisplayManager;
+import android.os.Handler;
+import android.os.IBinder;
+import android.os.RemoteException;
+import android.os.UserHandle;
+import android.util.EventLog;
+import android.util.Log;
+import android.view.Display;
+import android.widget.Toast;
+import com.android.internal.logging.MetricsLogger;
+import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
+import com.android.systemui.EventLogConstants;
+import com.android.systemui.EventLogTags;
+import com.android.systemui.R;
+import com.android.systemui.SysUiServiceProvider;
+import com.android.systemui.pip.PipUI;
+import com.android.systemui.recents.events.EventBus;
+import com.android.systemui.recents.events.activity.ConfigurationChangedEvent;
+import com.android.systemui.recents.events.activity.DockedFirstAnimationFrameEvent;
+import com.android.systemui.recents.events.activity.DockedTopTaskEvent;
+import com.android.systemui.recents.events.activity.LaunchTaskFailedEvent;
+import com.android.systemui.recents.events.activity.RecentsActivityStartingEvent;
+import com.android.systemui.recents.events.component.ExpandPipEvent;
+import com.android.systemui.recents.events.component.HidePipMenuEvent;
+import com.android.systemui.recents.events.component.RecentsVisibilityChangedEvent;
+import com.android.systemui.recents.events.component.ScreenPinningRequestEvent;
+import com.android.systemui.recents.events.component.SetWaitingForTransitionStartEvent;
+import com.android.systemui.recents.events.component.ShowUserToastEvent;
+import com.android.systemui.recents.events.ui.RecentsDrawnEvent;
+import com.android.systemui.recents.events.ui.RecentsGrowingEvent;
+import com.android.systemui.recents.misc.SystemServicesProxy;
+import com.android.systemui.recents.model.RecentsTaskLoader;
+import com.android.systemui.shared.system.ActivityManagerWrapper;
+import com.android.systemui.stackdivider.Divider;
+import java.io.PrintWriter;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.Set;
+
+/**
+ * An implementation of the SystemUI recents component, which supports both system and secondary
+ * users.
+ */
+public class LegacyRecentsImpl implements RecentsImplementation {
+
+ private final static String TAG = "Recents";
+
+ public final static int EVENT_BUS_PRIORITY = 1;
+ public final static int BIND_TO_SYSTEM_USER_RETRY_DELAY = 5000;
+
+ public final static Set RECENTS_ACTIVITIES = new HashSet<>();
+ static {
+ RECENTS_ACTIVITIES.add(RecentsImpl.RECENTS_ACTIVITY);
+ }
+
+ private static final String COUNTER_WINDOW_SUPPORTED = "window_enter_supported";
+ private static final String COUNTER_WINDOW_UNSUPPORTED = "window_enter_unsupported";
+ private static final String COUNTER_WINDOW_INCOMPATIBLE = "window_enter_incompatible";
+
+ private static SystemServicesProxy sSystemServicesProxy;
+ private static RecentsDebugFlags sDebugFlags;
+ private static RecentsTaskLoader sTaskLoader;
+ private static RecentsConfiguration sConfiguration;
+
+ private Context mContext;
+ private SysUiServiceProvider mSysUiServiceProvider;
+ private Handler mHandler;
+ private RecentsImpl mImpl;
+
+ // Only For system user, this is the callbacks instance we return to each secondary user
+ private RecentsSystemUser mSystemToUserCallbacks;
+
+ // Only for secondary users, this is the callbacks instance provided by the system user to make
+ // calls back
+ private IRecentsSystemUserCallbacks mUserToSystemCallbacks;
+
+ // The set of runnables to run after binding to the system user's service.
+ private final ArrayList mOnConnectRunnables = new ArrayList<>();
+
+ // Only for secondary users, this is the death handler for the binder from the system user
+ private final IBinder.DeathRecipient mUserToSystemCallbacksDeathRcpt = new IBinder.DeathRecipient() {
+ @Override
+ public void binderDied() {
+ mUserToSystemCallbacks = null;
+ EventLog.writeEvent(EventLogTags.SYSUI_RECENTS_CONNECTION,
+ EventLogConstants.SYSUI_RECENTS_CONNECTION_USER_SYSTEM_UNBOUND,
+ sSystemServicesProxy.getProcessUser());
+
+ // Retry after a fixed duration
+ mHandler.postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ registerWithSystemUser();
+ }
+ }, BIND_TO_SYSTEM_USER_RETRY_DELAY);
+ }
+ };
+
+ // Only for secondary users, this is the service connection we use to connect to the system user
+ private final ServiceConnection mUserToSystemServiceConnection = new ServiceConnection() {
+ @Override
+ public void onServiceConnected(ComponentName name, IBinder service) {
+ if (service != null) {
+ mUserToSystemCallbacks = IRecentsSystemUserCallbacks.Stub.asInterface(
+ service);
+ EventLog.writeEvent(EventLogTags.SYSUI_RECENTS_CONNECTION,
+ EventLogConstants.SYSUI_RECENTS_CONNECTION_USER_SYSTEM_BOUND,
+ sSystemServicesProxy.getProcessUser());
+
+ // Listen for system user's death, so that we can reconnect later
+ try {
+ service.linkToDeath(mUserToSystemCallbacksDeathRcpt, 0);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Lost connection to (System) SystemUI", e);
+ }
+
+ // Run each of the queued runnables
+ runAndFlushOnConnectRunnables();
+ }
+
+ // Unbind ourselves now that we've registered our callbacks. The
+ // binder to the system user are still valid at this point.
+ mContext.unbindService(this);
+ }
+
+ @Override
+ public void onServiceDisconnected(ComponentName name) {
+ // Do nothing
+ }
+ };
+
+ /**
+ * Returns the callbacks interface that non-system users can call.
+ */
+ public IBinder getSystemUserCallbacks() {
+ return mSystemToUserCallbacks;
+ }
+
+ public static RecentsTaskLoader getTaskLoader() {
+ return sTaskLoader;
+ }
+
+
+ public static SystemServicesProxy getSystemServices() {
+ return sSystemServicesProxy;
+ }
+
+ public static RecentsConfiguration getConfiguration() {
+ return sConfiguration;
+ }
+
+ public static RecentsDebugFlags getDebugFlags() {
+ return sDebugFlags;
+ }
+
+ @Override
+ public void onStart(Context context, SysUiServiceProvider sysUiServiceProvider) {
+ mContext = context;
+ mSysUiServiceProvider = sysUiServiceProvider;
+ final Resources res = mContext.getResources();
+ final int defaultTaskBarBackgroundColor =
+ mContext.getColor(R.color.recents_task_bar_default_background_color);
+ final int defaultTaskViewBackgroundColor =
+ mContext.getColor(R.color.recents_task_view_default_background_color);
+ sDebugFlags = new RecentsDebugFlags();
+ sSystemServicesProxy = SystemServicesProxy.getInstance(mContext);
+ sConfiguration = new RecentsConfiguration(mContext);
+ sTaskLoader = new RecentsTaskLoader(mContext,
+ // TODO: Once we start building the AAR, move these into the loader
+ res.getInteger(R.integer.config_recents_max_thumbnail_count),
+ res.getInteger(R.integer.config_recents_max_icon_count),
+ res.getInteger(R.integer.recents_svelte_level));
+ sTaskLoader.setDefaultColors(defaultTaskBarBackgroundColor, defaultTaskViewBackgroundColor);
+ mHandler = new Handler();
+ mImpl = new RecentsImpl(mContext);
+
+ // Register with the event bus
+ EventBus.getDefault().register(this, EVENT_BUS_PRIORITY);
+ EventBus.getDefault().register(sSystemServicesProxy, EVENT_BUS_PRIORITY);
+ EventBus.getDefault().register(sTaskLoader, EVENT_BUS_PRIORITY);
+
+ // Due to the fact that RecentsActivity is per-user, we need to establish and interface for
+ // the system user's Recents component to pass events (like show/hide/toggleRecents) to the
+ // secondary user, and vice versa (like visibility change, screen pinning).
+ final int processUser = sSystemServicesProxy.getProcessUser();
+ if (sSystemServicesProxy.isSystemUser(processUser)) {
+ // For the system user, initialize an instance of the interface that we can pass to the
+ // secondary user
+ mSystemToUserCallbacks = new RecentsSystemUser(mContext, mImpl);
+ } else {
+ // For the secondary user, bind to the primary user's service to get a persistent
+ // interface to register its implementation and to later update its state
+ registerWithSystemUser();
+ }
+ }
+
+ @Override
+ public void onBootCompleted() {
+ mImpl.onBootCompleted();
+ }
+
+
+ @Override
+ public void growRecents() {
+ EventBus.getDefault().send(new RecentsGrowingEvent());
+ }
+
+ /**
+ * Shows the Recents.
+ */
+ @Override
+ public void showRecentApps(boolean triggeredFromAltTab) {
+ ActivityManagerWrapper.getInstance().closeSystemWindows(SYSTEM_DIALOG_REASON_RECENT_APPS);
+ int recentsGrowTarget = getComponent(Divider.class).getView().growsRecents();
+ int currentUser = sSystemServicesProxy.getCurrentUser();
+ if (sSystemServicesProxy.isSystemUser(currentUser)) {
+ mImpl.showRecents(triggeredFromAltTab, false /* draggingInRecents */,
+ true /* animate */, recentsGrowTarget);
+ } else {
+ if (mSystemToUserCallbacks != null) {
+ IRecentsNonSystemUserCallbacks callbacks =
+ mSystemToUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
+ if (callbacks != null) {
+ try {
+ callbacks.showRecents(triggeredFromAltTab, false /* draggingInRecents */,
+ true /* animate */, recentsGrowTarget);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Callback failed", e);
+ }
+ } else {
+ Log.e(TAG, "No SystemUI callbacks found for user: " + currentUser);
+ }
+ }
+ }
+ }
+
+ /**
+ * Hides the Recents.
+ */
+ @Override
+ public void hideRecentApps(boolean triggeredFromAltTab, boolean triggeredFromHomeKey) {
+ int currentUser = sSystemServicesProxy.getCurrentUser();
+ if (sSystemServicesProxy.isSystemUser(currentUser)) {
+ mImpl.hideRecents(triggeredFromAltTab, triggeredFromHomeKey);
+ } else {
+ if (mSystemToUserCallbacks != null) {
+ IRecentsNonSystemUserCallbacks callbacks =
+ mSystemToUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
+ if (callbacks != null) {
+ try {
+ callbacks.hideRecents(triggeredFromAltTab, triggeredFromHomeKey);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Callback failed", e);
+ }
+ } else {
+ Log.e(TAG, "No SystemUI callbacks found for user: " + currentUser);
+ }
+ }
+ }
+ }
+
+ /**
+ * Toggles the Recents activity.
+ */
+ @Override
+ public void toggleRecentApps() {
+ int growTarget = getComponent(Divider.class).getView().growsRecents();
+ int currentUser = sSystemServicesProxy.getCurrentUser();
+ if (sSystemServicesProxy.isSystemUser(currentUser)) {
+ mImpl.toggleRecents(growTarget);
+ } else {
+ if (mSystemToUserCallbacks != null) {
+ IRecentsNonSystemUserCallbacks callbacks =
+ mSystemToUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
+ if (callbacks != null) {
+ try {
+ callbacks.toggleRecents(growTarget);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Callback failed", e);
+ }
+ } else {
+ Log.e(TAG, "No SystemUI callbacks found for user: " + currentUser);
+ }
+ }
+ }
+ }
+
+ /**
+ * Preloads info for the Recents activity.
+ */
+ @Override
+ public void preloadRecentApps() {
+ int currentUser = sSystemServicesProxy.getCurrentUser();
+ if (sSystemServicesProxy.isSystemUser(currentUser)) {
+ mImpl.preloadRecents();
+ } else {
+ if (mSystemToUserCallbacks != null) {
+ IRecentsNonSystemUserCallbacks callbacks =
+ mSystemToUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
+ if (callbacks != null) {
+ try {
+ callbacks.preloadRecents();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Callback failed", e);
+ }
+ } else {
+ Log.e(TAG, "No SystemUI callbacks found for user: " + currentUser);
+ }
+ }
+ }
+ }
+
+ @Override
+ public void cancelPreloadRecentApps() {
+ int currentUser = sSystemServicesProxy.getCurrentUser();
+ if (sSystemServicesProxy.isSystemUser(currentUser)) {
+ mImpl.cancelPreloadingRecents();
+ } else {
+ if (mSystemToUserCallbacks != null) {
+ IRecentsNonSystemUserCallbacks callbacks =
+ mSystemToUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
+ if (callbacks != null) {
+ try {
+ callbacks.cancelPreloadingRecents();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Callback failed", e);
+ }
+ } else {
+ Log.e(TAG, "No SystemUI callbacks found for user: " + currentUser);
+ }
+ }
+ }
+ }
+
+ @Override
+ public boolean splitPrimaryTask(int stackCreateMode, Rect initialBounds, int metricsDockAction) {
+ Point realSize = new Point();
+ if (initialBounds == null) {
+ mContext.getSystemService(DisplayManager.class).getDisplay(Display.DEFAULT_DISPLAY)
+ .getRealSize(realSize);
+ initialBounds = new Rect(0, 0, realSize.x, realSize.y);
+ }
+
+ int currentUser = sSystemServicesProxy.getCurrentUser();
+ ActivityManager.RunningTaskInfo runningTask =
+ ActivityManagerWrapper.getInstance().getRunningTask();
+ final int activityType = runningTask != null
+ ? runningTask.configuration.windowConfiguration.getActivityType()
+ : ACTIVITY_TYPE_UNDEFINED;
+ boolean screenPinningActive = ActivityManagerWrapper.getInstance().isScreenPinningActive();
+ boolean isRunningTaskInHomeOrRecentsStack =
+ activityType == ACTIVITY_TYPE_HOME || activityType == ACTIVITY_TYPE_RECENTS;
+ if (runningTask != null && !isRunningTaskInHomeOrRecentsStack && !screenPinningActive) {
+ logDockAttempt(mContext, runningTask.topActivity, runningTask.resizeMode);
+ if (runningTask.supportsSplitScreenMultiWindow) {
+ if (metricsDockAction != -1) {
+ MetricsLogger.action(mContext, metricsDockAction,
+ runningTask.topActivity.flattenToShortString());
+ }
+ if (sSystemServicesProxy.isSystemUser(currentUser)) {
+ mImpl.splitPrimaryTask(runningTask.id, stackCreateMode, initialBounds);
+ } else {
+ if (mSystemToUserCallbacks != null) {
+ IRecentsNonSystemUserCallbacks callbacks =
+ mSystemToUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
+ if (callbacks != null) {
+ try {
+ callbacks.splitPrimaryTask(runningTask.id, stackCreateMode,
+ initialBounds);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Callback failed", e);
+ }
+ } else {
+ Log.e(TAG, "No SystemUI callbacks found for user: " + currentUser);
+ }
+ }
+ }
+
+ return true;
+ } else {
+ EventBus.getDefault().send(new ShowUserToastEvent(
+ R.string.dock_non_resizeble_failed_to_dock_text, Toast.LENGTH_SHORT));
+ return false;
+ }
+ } else {
+ return false;
+ }
+ }
+
+ public static void logDockAttempt(Context ctx, ComponentName activity, int resizeMode) {
+ if (resizeMode == ActivityInfo.RESIZE_MODE_UNRESIZEABLE) {
+ MetricsLogger.action(ctx, MetricsEvent.ACTION_WINDOW_DOCK_UNRESIZABLE,
+ activity.flattenToShortString());
+ }
+ MetricsLogger.count(ctx, getMetricsCounterForResizeMode(resizeMode), 1);
+ }
+
+ private static String getMetricsCounterForResizeMode(int resizeMode) {
+ switch (resizeMode) {
+ case ActivityInfo.RESIZE_MODE_FORCE_RESIZEABLE:
+ return COUNTER_WINDOW_UNSUPPORTED;
+ case ActivityInfo.RESIZE_MODE_RESIZEABLE:
+ case ActivityInfo.RESIZE_MODE_RESIZEABLE_VIA_SDK_VERSION:
+ return COUNTER_WINDOW_SUPPORTED;
+ default:
+ return COUNTER_WINDOW_INCOMPATIBLE;
+ }
+ }
+
+ @Override
+ public void onAppTransitionFinished() {
+ if (!LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
+ // Fallback, reset the flag once an app transition ends
+ EventBus.getDefault().send(new SetWaitingForTransitionStartEvent(
+ false /* waitingForTransitionStart */));
+ }
+ }
+
+ /**
+ * Updates on configuration change.
+ */
+ public void onConfigurationChanged(Configuration newConfig) {
+ int currentUser = sSystemServicesProxy.getCurrentUser();
+ if (sSystemServicesProxy.isSystemUser(currentUser)) {
+ mImpl.onConfigurationChanged();
+ } else {
+ if (mSystemToUserCallbacks != null) {
+ IRecentsNonSystemUserCallbacks callbacks =
+ mSystemToUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
+ if (callbacks != null) {
+ try {
+ callbacks.onConfigurationChanged();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Callback failed", e);
+ }
+ } else {
+ Log.e(TAG, "No SystemUI callbacks found for user: " + currentUser);
+ }
+ }
+ }
+ }
+
+ /**
+ * Handle Recents activity visibility changed.
+ */
+ public final void onBusEvent(final RecentsVisibilityChangedEvent event) {
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
+ int processUser = ssp.getProcessUser();
+ if (ssp.isSystemUser(processUser)) {
+ mImpl.onVisibilityChanged(event.applicationContext, event.visible);
+ } else {
+ postToSystemUser(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ mUserToSystemCallbacks.updateRecentsVisibility(event.visible);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Callback failed", e);
+ }
+ }
+ });
+ }
+
+ // This will catch the cases when a user launches from recents to another app
+ // (and vice versa) that is not in the recents stack (such as home or bugreport) and it
+ // would not reset the wait for transition flag. This will catch it and make sure that the
+ // flag is reset.
+ if (!event.visible) {
+ mImpl.setWaitingForTransitionStart(false);
+ }
+ }
+
+ public final void onBusEvent(DockedFirstAnimationFrameEvent event) {
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
+ int processUser = ssp.getProcessUser();
+ if (ssp.isSystemUser(processUser)) {
+ final Divider divider = getComponent(Divider.class);
+ if (divider != null) {
+ divider.onDockedFirstAnimationFrame();
+ }
+ } else {
+ postToSystemUser(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ mUserToSystemCallbacks.sendDockedFirstAnimationFrameEvent();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Callback failed", e);
+ }
+ }
+ });
+ }
+ }
+
+ /**
+ * Handle screen pinning request.
+ */
+ public final void onBusEvent(final ScreenPinningRequestEvent event) {
+ int processUser = sSystemServicesProxy.getProcessUser();
+ if (sSystemServicesProxy.isSystemUser(processUser)) {
+ mImpl.onStartScreenPinning(event.applicationContext, event.taskId);
+ } else {
+ postToSystemUser(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ mUserToSystemCallbacks.startScreenPinning(event.taskId);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Callback failed", e);
+ }
+ }
+ });
+ }
+ }
+
+ public final void onBusEvent(final RecentsDrawnEvent event) {
+ int processUser = sSystemServicesProxy.getProcessUser();
+ if (sSystemServicesProxy.isSystemUser(processUser)) {
+ final Divider divider = getComponent(Divider.class);
+ if (divider != null) {
+ divider.onRecentsDrawn();
+ }
+ } else {
+ postToSystemUser(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ mUserToSystemCallbacks.sendRecentsDrawnEvent();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Callback failed", e);
+ }
+ }
+ });
+ }
+ }
+
+ public final void onBusEvent(final DockedTopTaskEvent event) {
+ int processUser = sSystemServicesProxy.getProcessUser();
+ if (sSystemServicesProxy.isSystemUser(processUser)) {
+ final Divider divider = getComponent(Divider.class);
+ if (divider != null) {
+ divider.onDockedTopTask();
+ }
+ } else {
+ postToSystemUser(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ mUserToSystemCallbacks.sendDockingTopTaskEvent(event.initialRect);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Callback failed", e);
+ }
+ }
+ });
+ }
+ }
+
+ public final void onBusEvent(final RecentsActivityStartingEvent event) {
+ int processUser = sSystemServicesProxy.getProcessUser();
+ if (sSystemServicesProxy.isSystemUser(processUser)) {
+ final Divider divider = getComponent(Divider.class);
+ if (divider != null) {
+ divider.onRecentsActivityStarting();
+ }
+ } else {
+ postToSystemUser(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ mUserToSystemCallbacks.sendLaunchRecentsEvent();
+ } catch (RemoteException e) {
+ Log.e(TAG, "Callback failed", e);
+ }
+ }
+ });
+ }
+ }
+
+ public final void onBusEvent(LaunchTaskFailedEvent event) {
+ // Reset the transition when tasks fail to launch
+ mImpl.setWaitingForTransitionStart(false);
+ }
+
+ public final void onBusEvent(ConfigurationChangedEvent event) {
+ // Update the configuration for the Recents component when the activity configuration
+ // changes as well
+ mImpl.onConfigurationChanged();
+ }
+
+ public final void onBusEvent(ShowUserToastEvent event) {
+ int currentUser = sSystemServicesProxy.getCurrentUser();
+ if (sSystemServicesProxy.isSystemUser(currentUser)) {
+ mImpl.onShowCurrentUserToast(event.msgResId, event.msgLength);
+ } else {
+ if (mSystemToUserCallbacks != null) {
+ IRecentsNonSystemUserCallbacks callbacks =
+ mSystemToUserCallbacks.getNonSystemUserRecentsForUser(currentUser);
+ if (callbacks != null) {
+ try {
+ callbacks.showCurrentUserToast(event.msgResId, event.msgLength);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Callback failed", e);
+ }
+ } else {
+ Log.e(TAG, "No SystemUI callbacks found for user: " + currentUser);
+ }
+ }
+ }
+ }
+
+ public final void onBusEvent(SetWaitingForTransitionStartEvent event) {
+ int processUser = sSystemServicesProxy.getProcessUser();
+ if (sSystemServicesProxy.isSystemUser(processUser)) {
+ mImpl.setWaitingForTransitionStart(event.waitingForTransitionStart);
+ } else {
+ postToSystemUser(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ mUserToSystemCallbacks.setWaitingForTransitionStartEvent(
+ event.waitingForTransitionStart);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Callback failed", e);
+ }
+ }
+ });
+ }
+ }
+
+ public final void onBusEvent(ExpandPipEvent event) {
+ PipUI pipUi = getComponent(PipUI.class);
+ pipUi.expandPip();
+ }
+
+ public final void onBusEvent(HidePipMenuEvent event) {
+ PipUI pipUi = getComponent(PipUI.class);
+ event.getAnimationTrigger().increment();
+ pipUi.hidePipMenu(() -> {
+ event.getAnimationTrigger().increment();
+ }, () -> {
+ event.getAnimationTrigger().decrement();
+ });
+ event.getAnimationTrigger().decrement();
+ }
+
+ /**
+ * Attempts to register with the system user.
+ */
+ private void registerWithSystemUser() {
+ final int processUser = sSystemServicesProxy.getProcessUser();
+ postToSystemUser(new Runnable() {
+ @Override
+ public void run() {
+ try {
+ mUserToSystemCallbacks.registerNonSystemUserCallbacks(
+ new RecentsImplProxy(mImpl), processUser);
+ } catch (RemoteException e) {
+ Log.e(TAG, "Failed to register", e);
+ }
+ }
+ });
+ }
+
+ /**
+ * Runs the runnable in the system user's Recents context, connecting to the service if
+ * necessary.
+ */
+ private void postToSystemUser(final Runnable onConnectRunnable) {
+ mOnConnectRunnables.add(onConnectRunnable);
+ if (mUserToSystemCallbacks == null) {
+ Intent systemUserServiceIntent = new Intent();
+ systemUserServiceIntent.setClass(mContext, RecentsSystemUserService.class);
+ boolean bound = mContext.bindServiceAsUser(systemUserServiceIntent,
+ mUserToSystemServiceConnection, Context.BIND_AUTO_CREATE, UserHandle.SYSTEM);
+ EventLog.writeEvent(EventLogTags.SYSUI_RECENTS_CONNECTION,
+ EventLogConstants.SYSUI_RECENTS_CONNECTION_USER_BIND_SERVICE,
+ sSystemServicesProxy.getProcessUser());
+ if (!bound) {
+ // Retry after a fixed duration
+ mHandler.postDelayed(new Runnable() {
+ @Override
+ public void run() {
+ registerWithSystemUser();
+ }
+ }, BIND_TO_SYSTEM_USER_RETRY_DELAY);
+ }
+ } else {
+ runAndFlushOnConnectRunnables();
+ }
+ }
+
+ /**
+ * Runs all the queued runnables after a service connection is made.
+ */
+ private void runAndFlushOnConnectRunnables() {
+ for (Runnable r : mOnConnectRunnables) {
+ r.run();
+ }
+ mOnConnectRunnables.clear();
+ }
+
+ private T getComponent(Class clazz) {
+ return mSysUiServiceProvider.getComponent(clazz);
+ }
+
+ @Override
+ public void dump(PrintWriter pw) {
+ pw.println("Recents");
+ pw.println(" currentUserId=" + SystemServicesProxy.getInstance(mContext).getCurrentUser());
+ }
+}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsActivity.java
similarity index 94%
rename from packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsActivity.java
index 36a12559d6b83..cec97ab499540 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivity.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsActivity.java
@@ -87,16 +87,15 @@ import com.android.systemui.recents.events.ui.focus.FocusPreviousTaskViewEvent;
import com.android.systemui.recents.events.ui.focus.NavigateTaskViewEvent;
import com.android.systemui.recents.events.ui.focus.NavigateTaskViewEvent.Direction;
import com.android.systemui.recents.misc.SystemServicesProxy;
-import com.android.systemui.shared.recents.utilities.Utilities;
-import com.android.systemui.shared.recents.model.RecentsTaskLoadPlan;
-import com.android.systemui.shared.recents.model.RecentsTaskLoader;
+import com.android.systemui.recents.utilities.Utilities;
+import com.android.systemui.recents.model.RecentsTaskLoadPlan;
+import com.android.systemui.recents.model.RecentsTaskLoader;
import com.android.systemui.shared.recents.model.Task;
-import com.android.systemui.shared.recents.model.TaskStack;
+import com.android.systemui.recents.model.TaskStack;
import com.android.systemui.recents.views.RecentsView;
import com.android.systemui.recents.views.SystemBarScrimViews;
import com.android.systemui.shared.system.ActivityManagerWrapper;
-import com.android.systemui.shared.system.WindowManagerWrapper;
import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -109,7 +108,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
private final static String TAG = "RecentsActivity";
private final static boolean DEBUG = false;
- public final static int EVENT_BUS_PRIORITY = Recents.EVENT_BUS_PRIORITY + 1;
+ public final static int EVENT_BUS_PRIORITY = LegacyRecentsImpl.EVENT_BUS_PRIORITY + 1;
public final static int INCOMPATIBLE_APP_ALPHA_DURATION = 150;
private PackageMonitor mPackageMonitor = new PackageMonitor() {
@@ -217,8 +216,8 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
LatencyTracker.ACTION_TOGGLE_RECENTS));
}
DejankUtils.postAfterTraversal(() -> {
- Recents.getTaskLoader().startLoader(RecentsActivity.this);
- Recents.getTaskLoader().getHighResThumbnailLoader().setVisible(true);
+ LegacyRecentsImpl.getTaskLoader().startLoader(RecentsActivity.this);
+ LegacyRecentsImpl.getTaskLoader().getHighResThumbnailLoader().setVisible(true);
});
return true;
}
@@ -228,7 +227,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
* Dismisses recents if we are already visible and the intent is to toggle the recents view.
*/
boolean dismissRecentsToFocusedTask(int logCategory) {
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
if (ssp.isRecentsActivityVisible()) {
// If we have a focused Task, launch that Task now
if (mRecentsView.launchFocusedTask(logCategory)) return true;
@@ -240,7 +239,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
* Dismisses recents back to the launch target task.
*/
boolean dismissRecentsToLaunchTargetTaskOrHome() {
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
if (ssp.isRecentsActivityVisible()) {
// If we have a focused Task, launch that Task now
if (mRecentsView.launchPreviousTask()) return true;
@@ -254,7 +253,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
* Dismisses recents if we are already visible and the intent is to toggle the recents view.
*/
boolean dismissRecentsToFocusedTaskOrHome() {
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
if (ssp.isRecentsActivityVisible()) {
// If we have a focused Task, launch that Task now
if (mRecentsView.launchFocusedTask(0 /* logCategory */)) return true;
@@ -289,7 +288,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
/** Dismisses Recents directly to Home if we currently aren't transitioning. */
boolean dismissRecentsToHomeIfVisible(boolean animated) {
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
if (ssp.isRecentsActivityVisible()) {
// Return to Home
dismissRecentsToHome(animated);
@@ -306,7 +305,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
// In the case that the activity starts up before the Recents component has initialized
// (usually when debugging/pushing the SysUI apk), just finish this activity.
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
if (ssp == null) {
mFinishedOnStartup = true;
finish();
@@ -335,7 +334,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
mScrimViews = new SystemBarScrimViews(this);
getWindow().getAttributes().privateFlags |=
WindowManager.LayoutParams.PRIVATE_FLAG_FORCE_DECOR_VIEW_VISIBILITY;
- if (Recents.getConfiguration().isLowRamDevice) {
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
}
@@ -384,7 +383,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
// reset launch state with dock, app and home set to false
Object isRelaunching = getLastNonConfigurationInstance();
if (isRelaunching != null && isRelaunching instanceof Boolean && (boolean) isRelaunching) {
- RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
+ RecentsActivityLaunchState launchState = LegacyRecentsImpl.getConfiguration().getLaunchState();
launchState.launchedViaDockGesture = false;
launchState.launchedFromApp = false;
launchState.launchedFromHome = false;
@@ -418,14 +417,14 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
private void reloadStackView() {
// If the Recents component has preloaded a load plan, then use that to prevent
// reconstructing the task stack
- RecentsTaskLoader loader = Recents.getTaskLoader();
+ RecentsTaskLoader loader = LegacyRecentsImpl.getTaskLoader();
RecentsTaskLoadPlan loadPlan = RecentsImpl.consumeInstanceLoadPlan();
if (loadPlan == null) {
loadPlan = new RecentsTaskLoadPlan(this);
}
// Start loading tasks according to the load plan
- RecentsConfiguration config = Recents.getConfiguration();
+ RecentsConfiguration config = LegacyRecentsImpl.getConfiguration();
RecentsActivityLaunchState launchState = config.getLaunchState();
if (!loadPlan.hasTasks()) {
loader.preloadTasks(loadPlan, launchState.launchedToTaskId);
@@ -538,7 +537,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
mIsVisible = false;
EventBus.getDefault().send(new RecentsVisibilityChangedEvent(this, false));
MetricsLogger.hidden(this, MetricsEvent.OVERVIEW_ACTIVITY);
- Recents.getTaskLoader().getHighResThumbnailLoader().setVisible(false);
+ LegacyRecentsImpl.getTaskLoader().getHighResThumbnailLoader().setVisible(false);
// When recents starts again before onStop, do not reset launch flags so entrance animation
// can run
@@ -546,13 +545,13 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
// Workaround for b/22542869, if the RecentsActivity is started again, but without going
// through SystemUI, we need to reset the config launch flags to ensure that we do not
// wait on the system to send a signal that was never queued.
- RecentsConfiguration config = Recents.getConfiguration();
+ RecentsConfiguration config = LegacyRecentsImpl.getConfiguration();
RecentsActivityLaunchState launchState = config.getLaunchState();
launchState.reset();
}
// Force a gc to attempt to clean up bitmap references more quickly (b/38258699)
- Recents.getSystemServices().gc();
+ LegacyRecentsImpl.getSystemServices().gc();
}
@Override
@@ -587,7 +586,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
@Override
public void onTrimMemory(int level) {
- RecentsTaskLoader loader = Recents.getTaskLoader();
+ RecentsTaskLoader loader = LegacyRecentsImpl.getTaskLoader();
if (loader != null) {
loader.onTrimMemory(level);
}
@@ -656,7 +655,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
/**** EventBus events ****/
public final void onBusEvent(ToggleRecentsEvent event) {
- RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
+ RecentsActivityLaunchState launchState = LegacyRecentsImpl.getConfiguration().getLaunchState();
if (launchState.launchedFromHome) {
dismissRecentsToHome(true /* animateTaskViews */);
} else {
@@ -700,7 +699,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
}
public final void onBusEvent(CancelEnterRecentsWindowAnimationEvent event) {
- RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
+ RecentsActivityLaunchState launchState = LegacyRecentsImpl.getConfiguration().getLaunchState();
int launchToTaskId = launchState.launchedToTaskId;
if (launchToTaskId != -1 &&
(event.launchTask == null || launchToTaskId != event.launchTask.key.id)) {
@@ -748,7 +747,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
public final void onBusEvent(DeleteTaskDataEvent event) {
// Remove any stored data from the loader
- RecentsTaskLoader loader = Recents.getTaskLoader();
+ RecentsTaskLoader loader = LegacyRecentsImpl.getTaskLoader();
loader.deleteTaskData(event.task, false);
// Remove the task from activity manager
@@ -760,7 +759,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
}
public final void onBusEvent(AllTaskViewsDismissedEvent event) {
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
if (ssp.hasDockedTask()) {
mRecentsView.showEmptyView(event.msgResId);
} else {
@@ -808,9 +807,9 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
private void reloadTaskStack(boolean isInMultiWindowMode, boolean sendConfigChangedEvent) {
// Reload the task stack completely
- RecentsConfiguration config = Recents.getConfiguration();
+ RecentsConfiguration config = LegacyRecentsImpl.getConfiguration();
RecentsActivityLaunchState launchState = config.getLaunchState();
- RecentsTaskLoader loader = Recents.getTaskLoader();
+ RecentsTaskLoader loader = LegacyRecentsImpl.getTaskLoader();
RecentsTaskLoadPlan loadPlan = new RecentsTaskLoadPlan(this);
loader.preloadTasks(loadPlan, -1 /* runningTaskId */);
@@ -839,7 +838,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
}
public void onPackageChanged(String packageName, int userId) {
- Recents.getTaskLoader().onPackageChanged(packageName);
+ LegacyRecentsImpl.getTaskLoader().onPackageChanged(packageName);
EventBus.getDefault().send(new PackagesChangedEvent(packageName, userId));
}
@@ -847,7 +846,7 @@ public class RecentsActivity extends Activity implements ViewTreeObserver.OnPreD
public void dump(String prefix, FileDescriptor fd, PrintWriter writer, String[] args) {
super.dump(prefix, fd, writer, args);
EventBus.getDefault().dump(prefix, writer);
- Recents.getTaskLoader().dump(prefix, writer);
+ LegacyRecentsImpl.getTaskLoader().dump(prefix, writer);
String id = Integer.toHexString(System.identityHashCode(this));
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsActivityLaunchState.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsActivityLaunchState.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/RecentsActivityLaunchState.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsActivityLaunchState.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsConfiguration.java
similarity index 96%
rename from packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsConfiguration.java
index 68df1d5bd3222..ee53734d175ec 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsConfiguration.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsConfiguration.java
@@ -26,7 +26,6 @@ import android.os.SystemProperties;
import com.android.systemui.R;
import com.android.systemui.recents.misc.SystemServicesProxy;
import com.android.systemui.recents.views.DockState;
-import com.android.systemui.shared.recents.model.TaskStack;
/**
* Represents the dock regions for each orientation.
@@ -86,7 +85,7 @@ public class RecentsConfiguration {
public RecentsConfiguration(Context context) {
// Load only resources that can not change after the first load either through developer
// settings or via multi window
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
mAppContext = context.getApplicationContext();
Resources res = mAppContext.getResources();
fakeShadows = res.getBoolean(R.bool.config_recents_fake_shadows);
@@ -116,7 +115,7 @@ public class RecentsConfiguration {
public DockState[] getDockStatesForCurrentOrientation() {
boolean isLandscape = mAppContext.getResources().getConfiguration().orientation ==
Configuration.ORIENTATION_LANDSCAPE;
- RecentsConfiguration config = Recents.getConfiguration();
+ RecentsConfiguration config = LegacyRecentsImpl.getConfiguration();
if (config.isLargeScreen) {
return isLandscape ? DockRegion.TABLET_LANDSCAPE : DockRegion.TABLET_PORTRAIT;
} else {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsDebugFlags.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsDebugFlags.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/RecentsDebugFlags.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsDebugFlags.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsImpl.java
similarity index 94%
rename from packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsImpl.java
index d95c7313a282e..3e5acabfed491 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsImpl.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsImpl.java
@@ -47,7 +47,6 @@ import android.view.WindowManager;
import android.widget.Toast;
import com.android.systemui.Dependency;
-import com.android.systemui.OverviewProxyService;
import com.android.systemui.SysUiServiceProvider;
import com.android.systemui.pip.phone.ForegroundThread;
import com.google.android.collect.Lists;
@@ -55,7 +54,6 @@ import com.google.android.collect.Lists;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.policy.DockedDividerUtils;
import com.android.systemui.R;
-import com.android.systemui.SystemUIApplication;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.activity.DockedTopTaskEvent;
import com.android.systemui.recents.events.activity.EnterRecentsWindowLastAnimationFrameEvent;
@@ -75,11 +73,11 @@ import com.android.systemui.recents.events.ui.TaskSnapshotChangedEvent;
import com.android.systemui.recents.misc.DozeTrigger;
import com.android.systemui.recents.misc.SystemServicesProxy;
import com.android.systemui.recents.misc.SysUiTaskStackChangeListener;
-import com.android.systemui.shared.recents.model.RecentsTaskLoadPlan;
-import com.android.systemui.shared.recents.model.RecentsTaskLoader;
+import com.android.systemui.recents.model.RecentsTaskLoadPlan;
+import com.android.systemui.recents.model.RecentsTaskLoader;
import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.recents.model.Task.TaskKey;
-import com.android.systemui.shared.recents.model.TaskStack;
+import com.android.systemui.recents.model.TaskStack;
import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.recents.views.TaskStackLayoutAlgorithm;
import com.android.systemui.recents.views.TaskStackLayoutAlgorithm.VisibilityReport;
@@ -143,7 +141,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
}
// Preloads the next task
- RecentsConfiguration config = Recents.getConfiguration();
+ RecentsConfiguration config = LegacyRecentsImpl.getConfiguration();
if (config.svelteLevel == RecentsTaskLoader.SVELTE_NONE) {
Rect windowRect = getWindowRect(null /* windowRectOverride */);
if (windowRect.isEmpty()) {
@@ -153,7 +151,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
// Load the next task only if we aren't svelte
ActivityManager.RunningTaskInfo runningTaskInfo =
ActivityManagerWrapper.getInstance().getRunningTask();
- RecentsTaskLoader loader = Recents.getTaskLoader();
+ RecentsTaskLoader loader = LegacyRecentsImpl.getTaskLoader();
RecentsTaskLoadPlan plan = new RecentsTaskLoadPlan(mContext);
loader.preloadTasks(plan, -1);
TaskStack stack = plan.getTaskStack();
@@ -195,8 +193,8 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
// This time needs to be fetched the same way the last active time is fetched in
// {@link TaskRecord#touchActiveTime}
- Recents.getConfiguration().getLaunchState().launchedFromPipApp = true;
- Recents.getConfiguration().getLaunchState().launchedWithNextPipApp = false;
+ LegacyRecentsImpl.getConfiguration().getLaunchState().launchedFromPipApp = true;
+ LegacyRecentsImpl.getConfiguration().getLaunchState().launchedWithNextPipApp = false;
EventBus.getDefault().send(new ActivityPinnedEvent(taskId));
consumeInstanceLoadPlan();
sLastPipTime = System.currentTimeMillis();
@@ -278,7 +276,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
public void onConnectionChanged(boolean isConnected) {
if (!isConnected) {
// Clear everything when the connection to the overview service
- Recents.getTaskLoader().onTrimMemory(ComponentCallbacks2.TRIM_MEMORY_COMPLETE);
+ LegacyRecentsImpl.getTaskLoader().onTrimMemory(ComponentCallbacks2.TRIM_MEMORY_COMPLETE);
}
}
};
@@ -313,7 +311,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
// When we start, preload the data associated with the previous recent tasks.
// We can use a new plan since the caches will be the same.
- RecentsTaskLoader loader = Recents.getTaskLoader();
+ RecentsTaskLoader loader = LegacyRecentsImpl.getTaskLoader();
RecentsTaskLoadPlan plan = new RecentsTaskLoadPlan(mContext);
loader.preloadTasks(plan, -1);
RecentsTaskLoadPlan.Options launchOpts = new RecentsTaskLoadPlan.Options();
@@ -334,16 +332,16 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
/**
* This is only called from the system user's Recents. Secondary users will instead proxy their
* visibility change events through to the system user via
- * {@link Recents#onBusEvent(RecentsVisibilityChangedEvent)}.
+ * {@link LegacyRecentsImpl#onBusEvent(RecentsVisibilityChangedEvent)}.
*/
public void onVisibilityChanged(Context context, boolean visible) {
- Recents.getSystemServices().setRecentsVisibility(visible);
+ LegacyRecentsImpl.getSystemServices().setRecentsVisibility(visible);
}
/**
* This is only called from the system user's Recents. Secondary users will instead proxy their
* visibility change events through to the system user via
- * {@link Recents#onBusEvent(ScreenPinningRequestEvent)}.
+ * {@link LegacyRecentsImpl#onBusEvent(ScreenPinningRequestEvent)}.
*/
public void onStartScreenPinning(Context context, int taskId) {
final StatusBar statusBar = getStatusBar();
@@ -354,13 +352,13 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
public void showRecents(boolean triggeredFromAltTab, boolean draggingInRecents,
boolean animate, int growTarget) {
- final SystemServicesProxy ssp = Recents.getSystemServices();
+ final SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
final MutableBoolean isHomeStackVisible = new MutableBoolean(true);
- final boolean isRecentsVisible = Recents.getSystemServices().isRecentsActivityVisible(
+ final boolean isRecentsVisible = LegacyRecentsImpl.getSystemServices().isRecentsActivityVisible(
isHomeStackVisible);
final boolean fromHome = isHomeStackVisible.value;
final boolean launchedWhileDockingTask =
- Recents.getSystemServices().getSplitScreenPrimaryStack() != null;
+ LegacyRecentsImpl.getSystemServices().getSplitScreenPrimaryStack() != null;
mTriggeredFromAltTab = triggeredFromAltTab;
mDraggingInRecents = draggingInRecents;
@@ -439,12 +437,12 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
MutableBoolean isHomeStackVisible = new MutableBoolean(true);
long elapsedTime = SystemClock.elapsedRealtime() - mLastToggleTime;
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
if (ssp.isRecentsActivityVisible(isHomeStackVisible)) {
- RecentsConfiguration config = Recents.getConfiguration();
+ RecentsConfiguration config = LegacyRecentsImpl.getConfiguration();
RecentsActivityLaunchState launchState = config.getLaunchState();
if (!launchState.launchedWithAltTab) {
- if (Recents.getConfiguration().isGridEnabled) {
+ if (LegacyRecentsImpl.getConfiguration().isGridEnabled) {
// Has the user tapped quickly?
boolean isQuickTap = elapsedTime < ViewConfiguration.getDoubleTapTimeout();
if (isQuickTap) {
@@ -509,7 +507,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
// RecentsActivity) only if there is a task to animate to. Post this to ensure that we
// don't block the touch feedback on the nav bar button which triggers this.
mHandler.post(() -> {
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
if (!ssp.isRecentsActivityVisible(null)) {
ActivityManager.RunningTaskInfo runningTask =
ActivityManagerWrapper.getInstance().getRunningTask();
@@ -517,7 +515,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
return;
}
- RecentsTaskLoader loader = Recents.getTaskLoader();
+ RecentsTaskLoader loader = LegacyRecentsImpl.getTaskLoader();
sInstanceLoadPlan = new RecentsTaskLoadPlan(mContext);
loader.preloadTasks(sInstanceLoadPlan, runningTask.id);
TaskStack stack = sInstanceLoadPlan.getTaskStack();
@@ -556,8 +554,8 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
* Transitions to the next recent task in the stack.
*/
public void showNextTask() {
- SystemServicesProxy ssp = Recents.getSystemServices();
- RecentsTaskLoader loader = Recents.getTaskLoader();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
+ RecentsTaskLoader loader = LegacyRecentsImpl.getTaskLoader();
RecentsTaskLoadPlan plan = new RecentsTaskLoadPlan(mContext);
loader.preloadTasks(plan, -1);
TaskStack focusedStack = plan.getTaskStack();
@@ -612,8 +610,8 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
* Transitions to the next affiliated task.
*/
public void showRelativeAffiliatedTask(boolean showNextTask) {
- SystemServicesProxy ssp = Recents.getSystemServices();
- RecentsTaskLoader loader = Recents.getTaskLoader();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
+ RecentsTaskLoader loader = LegacyRecentsImpl.getTaskLoader();
RecentsTaskLoadPlan plan = new RecentsTaskLoadPlan(mContext);
loader.preloadTasks(plan, -1);
TaskStack focusedStack = plan.getTaskStack();
@@ -678,20 +676,8 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
null /* resultListener */, null /* resultCallbackHandler */);
}
- public void showNextAffiliatedTask() {
- // Keep track of when the affiliated task is triggered
- MetricsLogger.count(mContext, "overview_affiliated_task_next", 1);
- showRelativeAffiliatedTask(true);
- }
-
- public void showPrevAffiliatedTask() {
- // Keep track of when the affiliated task is triggered
- MetricsLogger.count(mContext, "overview_affiliated_task_prev", 1);
- showRelativeAffiliatedTask(false);
- }
-
public void splitPrimaryTask(int taskId, int stackCreateMode, Rect initialBounds) {
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
// Make sure we inform DividerView before we actually start the activity so we can change
// the resize mode already.
@@ -758,7 +744,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
private void updateDummyStackViewLayout(TaskStackLayoutAlgorithm stackLayout,
TaskStack stack, Rect windowRect) {
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
Rect displayRect = ssp.getDisplayRect();
Rect systemInsets = new Rect();
ssp.getStableInsets(systemInsets);
@@ -789,7 +775,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
private Rect getWindowRect(Rect windowRectOverride) {
return windowRectOverride != null
? new Rect(windowRectOverride)
- : Recents.getSystemServices().getWindowRect();
+ : LegacyRecentsImpl.getSystemServices().getWindowRect();
}
/**
@@ -871,7 +857,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
launchOpts.runningTaskId = runningTaskId;
launchOpts.loadThumbnails = false;
launchOpts.onlyLoadForCache = true;
- Recents.getTaskLoader().loadTasks(sInstanceLoadPlan, launchOpts);
+ LegacyRecentsImpl.getTaskLoader().loadTasks(sInstanceLoadPlan, launchOpts);
}
/**
@@ -900,7 +886,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
private Pair
getThumbnailTransitionActivityOptions(ActivityManager.RunningTaskInfo runningTask,
Rect windowOverrideRect) {
- final boolean isLowRamDevice = Recents.getConfiguration().isLowRamDevice;
+ final boolean isLowRamDevice = LegacyRecentsImpl.getConfiguration().isLowRamDevice;
// Update the destination rect
Task toTask = new Task();
@@ -955,7 +941,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
*/
private Bitmap drawThumbnailTransitionBitmap(Task toTask,
TaskViewTransform toTransform) {
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
int width = (int) toTransform.rect.width();
int height = (int) toTransform.rect.height();
if (toTransform != null && toTask.key != null && width > 0 && height > 0) {
@@ -1007,8 +993,8 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
private void startRecentsActivity(ActivityManager.RunningTaskInfo runningTask,
boolean isHomeStackVisible, boolean animate, int growTarget) {
- RecentsTaskLoader loader = Recents.getTaskLoader();
- RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
+ RecentsTaskLoader loader = LegacyRecentsImpl.getTaskLoader();
+ RecentsActivityLaunchState launchState = LegacyRecentsImpl.getConfiguration().getLaunchState();
int runningTaskId = !mLaunchedWhileDocking && (runningTask != null)
? runningTask.id
@@ -1087,10 +1073,10 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
return SystemServicesProxy.getInstance(mContext).getWindowRect();
}
Rect result = new Rect();
- Rect displayRect = Recents.getSystemServices().getDisplayRect();
+ Rect displayRect = LegacyRecentsImpl.getSystemServices().getDisplayRect();
DockedDividerUtils.calculateBoundsForPosition(growTarget, WindowManager.DOCKED_BOTTOM,
result, displayRect.width(), displayRect.height(),
- Recents.getSystemServices().getDockedDividerSize(mContext));
+ LegacyRecentsImpl.getSystemServices().getDockedDividerSize(mContext));
return result;
}
@@ -1110,7 +1096,7 @@ public class RecentsImpl implements ActivityOptions.OnAnimationFinishedListener
| Intent.FLAG_ACTIVITY_TASK_ON_HOME);
HidePipMenuEvent hideMenuEvent = new HidePipMenuEvent();
hideMenuEvent.addPostAnimationCallback(() -> {
- Recents.getSystemServices().startActivityAsUserAsync(intent, opts);
+ LegacyRecentsImpl.getSystemServices().startActivityAsUserAsync(intent, opts);
EventBus.getDefault().send(new RecentsActivityStartingEvent());
if (future != null) {
future.composeSpecsSynchronous();
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsImplProxy.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsImplProxy.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/RecentsImplProxy.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsImplProxy.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsSystemUser.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsSystemUser.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/RecentsSystemUser.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsSystemUser.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/RecentsSystemUserService.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsSystemUserService.java
similarity index 92%
rename from packages/SystemUI/src/com/android/systemui/recents/RecentsSystemUserService.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsSystemUserService.java
index b4212d310fc00..b5a0181c7d566 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/RecentsSystemUserService.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/RecentsSystemUserService.java
@@ -22,7 +22,6 @@ import android.os.IBinder;
import android.util.Log;
import com.android.systemui.SysUiServiceProvider;
-import com.android.systemui.SystemUIApplication;
/**
* A strictly system-user service that is started by the secondary user's Recents (with a limited
@@ -41,7 +40,7 @@ public class RecentsSystemUserService extends Service {
@Override
public IBinder onBind(Intent intent) {
- Recents recents = SysUiServiceProvider.getComponent(this, Recents.class);
+ LegacyRecentsImpl recents = SysUiServiceProvider.getComponent(this, LegacyRecentsImpl.class);
if (DEBUG) {
Log.d(TAG, "onBind: " + recents);
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/EventBus.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/EventBus.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/EventBus.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/EventBus.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/AppTransitionFinishedEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/AppTransitionFinishedEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/AppTransitionFinishedEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/AppTransitionFinishedEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/CancelEnterRecentsWindowAnimationEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/CancelEnterRecentsWindowAnimationEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/CancelEnterRecentsWindowAnimationEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/CancelEnterRecentsWindowAnimationEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/ConfigurationChangedEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/ConfigurationChangedEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/ConfigurationChangedEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/ConfigurationChangedEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/DismissRecentsToHomeAnimationStarted.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/DismissRecentsToHomeAnimationStarted.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/DismissRecentsToHomeAnimationStarted.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/DismissRecentsToHomeAnimationStarted.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/DockedFirstAnimationFrameEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/DockedFirstAnimationFrameEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/DockedFirstAnimationFrameEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/DockedFirstAnimationFrameEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/DockedTopTaskEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/DockedTopTaskEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/DockedTopTaskEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/DockedTopTaskEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/EnterRecentsWindowAnimationCompletedEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/EnterRecentsWindowAnimationCompletedEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/EnterRecentsWindowAnimationCompletedEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/EnterRecentsWindowAnimationCompletedEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/EnterRecentsWindowLastAnimationFrameEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/EnterRecentsWindowLastAnimationFrameEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/EnterRecentsWindowLastAnimationFrameEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/EnterRecentsWindowLastAnimationFrameEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/ExitRecentsWindowFirstAnimationFrameEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/ExitRecentsWindowFirstAnimationFrameEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/ExitRecentsWindowFirstAnimationFrameEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/ExitRecentsWindowFirstAnimationFrameEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/HideRecentsEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/HideRecentsEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/HideRecentsEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/HideRecentsEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/HideStackActionButtonEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/HideStackActionButtonEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/HideStackActionButtonEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/HideStackActionButtonEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/LaunchMostRecentTaskRequestEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/LaunchMostRecentTaskRequestEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/LaunchMostRecentTaskRequestEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/LaunchMostRecentTaskRequestEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/LaunchNextTaskRequestEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/LaunchNextTaskRequestEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/LaunchNextTaskRequestEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/LaunchNextTaskRequestEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/LaunchTaskEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/LaunchTaskEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/LaunchTaskEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/LaunchTaskEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/LaunchTaskFailedEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/LaunchTaskFailedEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/LaunchTaskFailedEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/LaunchTaskFailedEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/LaunchTaskStartedEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/LaunchTaskStartedEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/LaunchTaskStartedEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/LaunchTaskStartedEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/LaunchTaskSucceededEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/LaunchTaskSucceededEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/LaunchTaskSucceededEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/LaunchTaskSucceededEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/MultiWindowStateChangedEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/MultiWindowStateChangedEvent.java
similarity index 95%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/MultiWindowStateChangedEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/MultiWindowStateChangedEvent.java
index e4972b1fd7f4f..64eeafa1ae17c 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/events/activity/MultiWindowStateChangedEvent.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/MultiWindowStateChangedEvent.java
@@ -17,7 +17,7 @@
package com.android.systemui.recents.events.activity;
import com.android.systemui.recents.events.EventBus;
-import com.android.systemui.shared.recents.model.TaskStack;
+import com.android.systemui.recents.model.TaskStack;
/**
* This is sent by the activity whenever the multi-window state has changed.
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/PackagesChangedEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/PackagesChangedEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/PackagesChangedEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/PackagesChangedEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/RecentsActivityStartingEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/RecentsActivityStartingEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/RecentsActivityStartingEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/RecentsActivityStartingEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/ShowEmptyViewEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/ShowEmptyViewEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/ShowEmptyViewEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/ShowEmptyViewEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/ShowStackActionButtonEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/ShowStackActionButtonEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/ShowStackActionButtonEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/ShowStackActionButtonEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/TaskStackUpdatedEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/TaskStackUpdatedEvent.java
similarity index 95%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/TaskStackUpdatedEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/TaskStackUpdatedEvent.java
index 51d02b5b0018b..0d614e8c675c5 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/events/activity/TaskStackUpdatedEvent.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/TaskStackUpdatedEvent.java
@@ -17,7 +17,7 @@
package com.android.systemui.recents.events.activity;
import com.android.systemui.recents.events.EventBus;
-import com.android.systemui.shared.recents.model.TaskStack;
+import com.android.systemui.recents.model.TaskStack;
/**
* This is sent by the activity whenever the task stach has changed.
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/ToggleRecentsEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/ToggleRecentsEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/ToggleRecentsEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/ToggleRecentsEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/activity/UndockingTaskEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/UndockingTaskEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/activity/UndockingTaskEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/activity/UndockingTaskEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/component/ActivityPinnedEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/component/ActivityPinnedEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/component/ActivityPinnedEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/component/ActivityPinnedEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/component/ActivityUnpinnedEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/component/ActivityUnpinnedEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/component/ActivityUnpinnedEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/component/ActivityUnpinnedEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/component/ExpandPipEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/component/ExpandPipEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/component/ExpandPipEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/component/ExpandPipEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/component/HidePipMenuEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/component/HidePipMenuEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/component/HidePipMenuEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/component/HidePipMenuEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/component/RecentsVisibilityChangedEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/component/RecentsVisibilityChangedEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/component/RecentsVisibilityChangedEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/component/RecentsVisibilityChangedEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/component/ScreenPinningRequestEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/component/ScreenPinningRequestEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/component/ScreenPinningRequestEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/component/ScreenPinningRequestEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/component/SetWaitingForTransitionStartEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/component/SetWaitingForTransitionStartEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/component/SetWaitingForTransitionStartEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/component/SetWaitingForTransitionStartEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/component/ShowUserToastEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/component/ShowUserToastEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/component/ShowUserToastEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/component/ShowUserToastEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/AllTaskViewsDismissedEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/AllTaskViewsDismissedEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/AllTaskViewsDismissedEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/AllTaskViewsDismissedEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/DeleteTaskDataEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/DeleteTaskDataEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/DeleteTaskDataEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/DeleteTaskDataEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/DismissAllTaskViewsEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/DismissAllTaskViewsEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/DismissAllTaskViewsEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/DismissAllTaskViewsEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/DismissTaskViewEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/DismissTaskViewEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/DismissTaskViewEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/DismissTaskViewEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/DraggingInRecentsEndedEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/DraggingInRecentsEndedEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/DraggingInRecentsEndedEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/DraggingInRecentsEndedEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/DraggingInRecentsEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/DraggingInRecentsEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/DraggingInRecentsEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/DraggingInRecentsEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/HideIncompatibleAppOverlayEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/HideIncompatibleAppOverlayEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/HideIncompatibleAppOverlayEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/HideIncompatibleAppOverlayEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/RecentsDrawnEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/RecentsDrawnEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/RecentsDrawnEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/RecentsDrawnEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/RecentsGrowingEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/RecentsGrowingEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/RecentsGrowingEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/RecentsGrowingEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/ShowApplicationInfoEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/ShowApplicationInfoEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/ShowApplicationInfoEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/ShowApplicationInfoEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/ShowIncompatibleAppOverlayEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/ShowIncompatibleAppOverlayEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/ShowIncompatibleAppOverlayEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/ShowIncompatibleAppOverlayEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/StackViewScrolledEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/StackViewScrolledEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/StackViewScrolledEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/StackViewScrolledEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/TaskSnapshotChangedEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/TaskSnapshotChangedEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/TaskSnapshotChangedEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/TaskSnapshotChangedEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/TaskViewDismissedEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/TaskViewDismissedEvent.java
similarity index 94%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/TaskViewDismissedEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/TaskViewDismissedEvent.java
index 881a64af5b0fd..973812454afd3 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/events/ui/TaskViewDismissedEvent.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/TaskViewDismissedEvent.java
@@ -18,7 +18,7 @@ package com.android.systemui.recents.events.ui;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.shared.recents.model.Task;
-import com.android.systemui.shared.recents.utilities.AnimationProps;
+import com.android.systemui.recents.utilities.AnimationProps;
import com.android.systemui.recents.views.TaskView;
/**
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/UserInteractionEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/UserInteractionEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/UserInteractionEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/UserInteractionEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/dragndrop/DragDropTargetChangedEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/dragndrop/DragDropTargetChangedEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/dragndrop/DragDropTargetChangedEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/dragndrop/DragDropTargetChangedEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/dragndrop/DragEndCancelledEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/dragndrop/DragEndCancelledEvent.java
similarity index 95%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/dragndrop/DragEndCancelledEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/dragndrop/DragEndCancelledEvent.java
index 297afc53c5572..c11936eee284b 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/events/ui/dragndrop/DragEndCancelledEvent.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/dragndrop/DragEndCancelledEvent.java
@@ -18,7 +18,7 @@ package com.android.systemui.recents.events.ui.dragndrop;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.shared.recents.model.Task;
-import com.android.systemui.shared.recents.model.TaskStack;
+import com.android.systemui.recents.model.TaskStack;
import com.android.systemui.recents.views.TaskView;
/**
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/dragndrop/DragEndEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/dragndrop/DragEndEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/dragndrop/DragEndEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/dragndrop/DragEndEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/dragndrop/DragStartEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/dragndrop/DragStartEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/dragndrop/DragStartEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/dragndrop/DragStartEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/dragndrop/DragStartInitializeDropTargetsEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/dragndrop/DragStartInitializeDropTargetsEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/dragndrop/DragStartInitializeDropTargetsEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/dragndrop/DragStartInitializeDropTargetsEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/focus/DismissFocusedTaskViewEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/focus/DismissFocusedTaskViewEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/focus/DismissFocusedTaskViewEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/focus/DismissFocusedTaskViewEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/focus/FocusNextTaskViewEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/focus/FocusNextTaskViewEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/focus/FocusNextTaskViewEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/focus/FocusNextTaskViewEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/focus/FocusPreviousTaskViewEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/focus/FocusPreviousTaskViewEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/focus/FocusPreviousTaskViewEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/focus/FocusPreviousTaskViewEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/events/ui/focus/NavigateTaskViewEvent.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/focus/NavigateTaskViewEvent.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/events/ui/focus/NavigateTaskViewEvent.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/events/ui/focus/NavigateTaskViewEvent.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/DozeTrigger.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/misc/DozeTrigger.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/misc/DozeTrigger.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/misc/DozeTrigger.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/FreePathInterpolator.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/misc/FreePathInterpolator.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/misc/FreePathInterpolator.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/misc/FreePathInterpolator.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/ReferenceCountedTrigger.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/misc/ReferenceCountedTrigger.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/misc/ReferenceCountedTrigger.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/misc/ReferenceCountedTrigger.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/SysUiTaskStackChangeListener.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/misc/SysUiTaskStackChangeListener.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/misc/SysUiTaskStackChangeListener.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/misc/SysUiTaskStackChangeListener.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/misc/SystemServicesProxy.java
similarity index 98%
rename from packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/misc/SystemServicesProxy.java
index 350fe7848d9dd..f8b61cd6b2861 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/misc/SystemServicesProxy.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/misc/SystemServicesProxy.java
@@ -34,7 +34,6 @@ import android.app.IActivityManager;
import android.app.IActivityTaskManager;
import android.app.WindowConfiguration;
import android.content.ComponentName;
-import android.content.ContentResolver;
import android.content.Context;
import android.content.Intent;
import android.content.pm.IPackageManager;
@@ -51,10 +50,8 @@ import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.RemoteException;
import android.os.ServiceManager;
-import android.os.SystemProperties;
import android.os.UserHandle;
import android.os.UserManager;
-import android.provider.Settings;
import android.service.dreams.DreamService;
import android.service.dreams.IDreamManager;
import android.util.Log;
@@ -71,7 +68,7 @@ import com.android.internal.app.AssistUtils;
import com.android.internal.os.BackgroundThread;
import com.android.systemui.Dependency;
import com.android.systemui.UiOffloadThread;
-import com.android.systemui.recents.Recents;
+import com.android.systemui.recents.LegacyRecentsImpl;
import com.android.systemui.recents.RecentsImpl;
import com.android.systemui.statusbar.policy.UserInfoController;
@@ -237,7 +234,7 @@ public class SystemServicesProxy {
recentsStackInfo.topActivity : null;
return (recentsStackVisibleNotOccluded && topActivity != null
&& topActivity.getPackageName().equals(RecentsImpl.RECENTS_PACKAGE)
- && Recents.RECENTS_ACTIVITIES.contains(topActivity.getClassName()));
+ && LegacyRecentsImpl.RECENTS_ACTIVITIES.contains(topActivity.getClassName()));
} catch (RemoteException e) {
e.printStackTrace();
}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/BackgroundTaskLoader.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/BackgroundTaskLoader.java
similarity index 96%
rename from packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/BackgroundTaskLoader.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/BackgroundTaskLoader.java
index 114d69e35e397..e85a7fb27505f 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/BackgroundTaskLoader.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/BackgroundTaskLoader.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.systemui.shared.recents.model;
+package com.android.systemui.recents.model;
import android.content.Context;
import android.graphics.drawable.Drawable;
@@ -22,12 +22,14 @@ import android.os.Handler;
import android.os.HandlerThread;
import android.util.Log;
+import com.android.systemui.shared.recents.model.IconLoader;
+import com.android.systemui.shared.recents.model.Task;
+import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.ActivityManagerWrapper;
/**
* Background task resource loader
*/
-@Deprecated
class BackgroundTaskLoader implements Runnable {
static String TAG = "BackgroundTaskLoader";
static boolean DEBUG = false;
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/FilteredTaskList.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/FilteredTaskList.java
similarity index 97%
rename from packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/FilteredTaskList.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/FilteredTaskList.java
index 7e0f8fe2e033b..005be75b1b97a 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/FilteredTaskList.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/FilteredTaskList.java
@@ -14,11 +14,12 @@
* limitations under the License
*/
-package com.android.systemui.shared.recents.model;
+package com.android.systemui.recents.model;
import android.util.ArrayMap;
import android.util.SparseArray;
+import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.recents.model.Task.TaskKey;
import java.util.ArrayList;
@@ -27,7 +28,6 @@ import java.util.List;
/**
* A list of filtered tasks.
*/
-@Deprecated
class FilteredTaskList {
private final ArrayList mTasks = new ArrayList<>();
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/HighResThumbnailLoader.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/HighResThumbnailLoader.java
similarity index 97%
rename from packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/HighResThumbnailLoader.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/HighResThumbnailLoader.java
index f02bc5ab15e1b..34bc334204eec 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/HighResThumbnailLoader.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/HighResThumbnailLoader.java
@@ -14,7 +14,7 @@
* limitations under the License
*/
-package com.android.systemui.shared.recents.model;
+package com.android.systemui.recents.model;
import static android.os.Process.setThreadPriority;
@@ -25,7 +25,9 @@ import android.util.ArraySet;
import com.android.internal.annotations.GuardedBy;
import com.android.internal.annotations.VisibleForTesting;
+import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.recents.model.Task.TaskCallbacks;
+import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import java.util.ArrayDeque;
@@ -34,7 +36,6 @@ import java.util.ArrayList;
/**
* Loader class that loads full-resolution thumbnails when appropriate.
*/
-@Deprecated
public class HighResThumbnailLoader implements
TaskCallbacks, BackgroundTaskLoader.OnIdleChangedListener {
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/RecentsTaskLoadPlan.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/RecentsTaskLoadPlan.java
similarity index 98%
rename from packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/RecentsTaskLoadPlan.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/RecentsTaskLoadPlan.java
index 8b3ae42ef4795..7c6a76f1e25da 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/RecentsTaskLoadPlan.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/RecentsTaskLoadPlan.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.shared.recents.model;
+package com.android.systemui.recents.model;
import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
@@ -29,7 +29,9 @@ import android.content.res.Resources;
import android.graphics.drawable.Drawable;
import android.util.SparseBooleanArray;
+import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.recents.model.Task.TaskKey;
+import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import java.util.ArrayList;
@@ -45,7 +47,6 @@ import java.util.List;
* 3) executePlan() will actually load and fill in the icons and thumbnails according to the load
* options specified, such that we can transition into the Recents activity seamlessly
*/
-@Deprecated
public class RecentsTaskLoadPlan {
/** The set of conditions to preload tasks. */
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/RecentsTaskLoader.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/RecentsTaskLoader.java
similarity index 97%
rename from packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/RecentsTaskLoader.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/RecentsTaskLoader.java
index b50aa76e1d0d4..012913a60b66e 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/RecentsTaskLoader.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/RecentsTaskLoader.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.shared.recents.model;
+package com.android.systemui.recents.model;
import android.app.ActivityManager;
import android.app.ActivityTaskManager;
@@ -29,10 +29,14 @@ import android.util.Log;
import android.util.LruCache;
import com.android.internal.annotations.GuardedBy;
-import com.android.systemui.shared.recents.model.RecentsTaskLoadPlan.Options;
-import com.android.systemui.shared.recents.model.RecentsTaskLoadPlan.PreloadOptions;
+import com.android.systemui.recents.model.RecentsTaskLoadPlan.Options;
+import com.android.systemui.recents.model.RecentsTaskLoadPlan.PreloadOptions;
+import com.android.systemui.shared.recents.model.IconLoader;
+import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.recents.model.Task.TaskKey;
+import com.android.systemui.shared.recents.model.TaskKeyLruCache;
import com.android.systemui.shared.recents.model.TaskKeyLruCache.EvictionCallback;
+import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import java.io.PrintWriter;
@@ -42,7 +46,6 @@ import java.util.Map;
/**
* Recents task loader
*/
-@Deprecated
public class RecentsTaskLoader {
private static final String TAG = "RecentsTaskLoader";
private static final boolean DEBUG = false;
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/TaskFilter.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/TaskFilter.java
similarity index 90%
rename from packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/TaskFilter.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/TaskFilter.java
index d378189b16758..9b734ec719ea7 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/TaskFilter.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/TaskFilter.java
@@ -14,14 +14,14 @@
* limitations under the License
*/
-package com.android.systemui.shared.recents.model;
+package com.android.systemui.recents.model;
import android.util.SparseArray;
+import com.android.systemui.shared.recents.model.Task;
/**
* An interface for a task filter to query whether a particular task should show in a stack.
*/
-@Deprecated
public interface TaskFilter {
/** Returns whether the filter accepts the specified task */
boolean acceptTask(SparseArray taskIdMap, Task t, int index);
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/TaskKeyStrongCache.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/TaskKeyStrongCache.java
similarity index 89%
rename from packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/TaskKeyStrongCache.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/TaskKeyStrongCache.java
index 4408eced3e934..27f2098868a1e 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/TaskKeyStrongCache.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/TaskKeyStrongCache.java
@@ -14,12 +14,14 @@
* limitations under the License
*/
-package com.android.systemui.shared.recents.model;
+package com.android.systemui.recents.model;
import android.util.ArrayMap;
import com.android.systemui.shared.recents.model.Task.TaskKey;
+import com.android.systemui.shared.recents.model.TaskKeyCache;
+import com.android.systemui.shared.recents.model.TaskKeyLruCache;
import java.io.PrintWriter;
/**
@@ -31,7 +33,7 @@ public class TaskKeyStrongCache extends TaskKeyCache {
private final ArrayMap mCache = new ArrayMap<>();
- final void copyEntries(TaskKeyStrongCache other) {
+ public final void copyEntries(TaskKeyStrongCache other) {
for (int i = other.mKeys.size() - 1; i >= 0; i--) {
TaskKey key = other.mKeys.valueAt(i);
put(key, other.mCache.get(key.id));
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/TaskResourceLoadQueue.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/TaskResourceLoadQueue.java
similarity index 94%
rename from packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/TaskResourceLoadQueue.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/TaskResourceLoadQueue.java
index 6b9b9f55e49ee..fe89ad5a324d6 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/TaskResourceLoadQueue.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/TaskResourceLoadQueue.java
@@ -14,14 +14,14 @@
* limitations under the License
*/
-package com.android.systemui.shared.recents.model;
+package com.android.systemui.recents.model;
+import com.android.systemui.shared.recents.model.Task;
import java.util.concurrent.ConcurrentLinkedQueue;
/**
* A Task load queue
*/
-@Deprecated
class TaskResourceLoadQueue {
private final ConcurrentLinkedQueue mQueue = new ConcurrentLinkedQueue<>();
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/TaskStack.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/TaskStack.java
similarity index 98%
rename from packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/TaskStack.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/TaskStack.java
index fd92bca7fcdac..01e6ba3f35ec3 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/model/TaskStack.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/model/TaskStack.java
@@ -14,15 +14,16 @@
* limitations under the License.
*/
-package com.android.systemui.shared.recents.model;
+package com.android.systemui.recents.model;
import android.content.ComponentName;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.SparseArray;
+import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.recents.model.Task.TaskKey;
-import com.android.systemui.shared.recents.utilities.AnimationProps;
+import com.android.systemui.recents.utilities.AnimationProps;
import com.android.systemui.shared.system.PackageManagerWrapper;
import java.io.PrintWriter;
@@ -33,7 +34,6 @@ import java.util.List;
/**
* The task stack contains a list of multiple tasks.
*/
-@Deprecated
public class TaskStack {
private static final String TAG = "TaskStack";
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/utilities/AnimationProps.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/utilities/AnimationProps.java
similarity index 99%
rename from packages/SystemUI/shared/src/com/android/systemui/shared/recents/utilities/AnimationProps.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/utilities/AnimationProps.java
index 26f6b596e0239..54639985bebd8 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/utilities/AnimationProps.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/utilities/AnimationProps.java
@@ -14,7 +14,7 @@
* limitations under the License.
*/
-package com.android.systemui.shared.recents.utilities;
+package com.android.systemui.recents.utilities;
import android.animation.Animator;
import android.animation.AnimatorSet;
@@ -34,7 +34,6 @@ import java.util.List;
* The generic set of animation properties to animate a {@link View}. The animation can have
* different interpolators, start delays and durations for each of the different properties.
*/
-@Deprecated
public class AnimationProps {
private static final Interpolator LINEAR_INTERPOLATOR = new LinearInterpolator();
diff --git a/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/utilities/Utilities.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/utilities/Utilities.java
new file mode 100644
index 0000000000000..ff58eba71e8db
--- /dev/null
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/utilities/Utilities.java
@@ -0,0 +1,339 @@
+/*
+ * 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.
+ */
+
+package com.android.systemui.recents.utilities;
+
+import android.animation.Animator;
+import android.animation.AnimatorSet;
+import android.animation.RectEvaluator;
+import android.annotation.FloatRange;
+import android.annotation.Nullable;
+import android.app.Activity;
+import android.content.Context;
+import android.content.res.Configuration;
+import android.content.res.Resources;
+import android.graphics.Color;
+import android.graphics.Rect;
+import android.graphics.RectF;
+import android.graphics.drawable.Drawable;
+import android.os.Handler;
+import android.os.Message;
+import android.os.Trace;
+import android.util.ArraySet;
+import android.util.IntProperty;
+import android.util.Property;
+import android.util.TypedValue;
+import android.view.Surface;
+import android.view.View;
+import android.view.ViewGroup;
+import android.view.ViewParent;
+import android.view.ViewRootImpl;
+import android.view.ViewStub;
+
+import com.android.systemui.shared.recents.utilities.RectFEvaluator;
+import java.util.ArrayList;
+import java.util.Collections;
+
+/* Common code */
+public class Utilities {
+
+ public static final Property DRAWABLE_ALPHA =
+ new IntProperty("drawableAlpha") {
+ @Override
+ public void setValue(Drawable object, int alpha) {
+ object.setAlpha(alpha);
+ }
+
+ @Override
+ public Integer get(Drawable object) {
+ return object.getAlpha();
+ }
+ };
+
+ public static final Property DRAWABLE_RECT =
+ new Property(Rect.class, "drawableBounds") {
+ @Override
+ public void set(Drawable object, Rect bounds) {
+ object.setBounds(bounds);
+ }
+
+ @Override
+ public Rect get(Drawable object) {
+ return object.getBounds();
+ }
+ };
+
+ public static final RectFEvaluator RECTF_EVALUATOR = new RectFEvaluator();
+ public static final RectEvaluator RECT_EVALUATOR = new RectEvaluator(new Rect());
+
+ /**
+ * @return the first parent walking up the view hierarchy that has the given class type.
+ *
+ * @param parentClass must be a class derived from {@link View}
+ */
+ public static T findParent(View v, Class parentClass) {
+ ViewParent parent = v.getParent();
+ while (parent != null) {
+ if (parentClass.isAssignableFrom(parent.getClass())) {
+ return (T) parent;
+ }
+ parent = parent.getParent();
+ }
+ return null;
+ }
+
+ /**
+ * Initializes the {@param setOut} with the given object.
+ */
+ public static ArraySet objectToSet(T obj, ArraySet setOut) {
+ setOut.clear();
+ if (obj != null) {
+ setOut.add(obj);
+ }
+ return setOut;
+ }
+
+ /**
+ * Replaces the contents of {@param setOut} with the contents of the {@param array}.
+ */
+ public static ArraySet arrayToSet(T[] array, ArraySet setOut) {
+ setOut.clear();
+ if (array != null) {
+ Collections.addAll(setOut, array);
+ }
+ return setOut;
+ }
+
+ /**
+ * @return the clamped {@param value} between the provided {@param min} and {@param max}.
+ */
+ public static int clamp(int value, int min, int max) {
+ return Math.max(min, Math.min(max, value));
+ }
+
+ /**
+ * @return the clamped {@param value} between 0 and 1.
+ */
+ public static float clamp01(float value) {
+ return Math.max(0f, Math.min(1f, value));
+ }
+
+ /**
+ * Scales the {@param value} to be proportionally between the {@param min} and
+ * {@param max} values.
+ *
+ * @param value must be between 0 and 1
+ */
+ public static float mapRange(@FloatRange(from=0.0,to=1.0) float value, float min, float max) {
+ return min + (value * (max - min));
+ }
+
+ /**
+ * Scales the {@param value} proportionally from {@param min} and {@param max} to 0 and 1.
+ *
+ * @param value must be between {@param min} and {@param max}
+ */
+ public static float unmapRange(float value, float min, float max) {
+ return (value - min) / (max - min);
+ }
+
+ /** Scales a rect about its centroid */
+ public static void scaleRectAboutCenter(RectF r, float scale) {
+ if (scale != 1.0f) {
+ float cx = r.centerX();
+ float cy = r.centerY();
+ r.offset(-cx, -cy);
+ r.left *= scale;
+ r.top *= scale;
+ r.right *= scale;
+ r.bottom *= scale;
+ r.offset(cx, cy);
+ }
+ }
+
+ /** Returns the base color overlaid with another overlay color with a specified alpha. */
+ public static int getColorWithOverlay(int baseColor, int overlayColor, float overlayAlpha) {
+ return Color.rgb(
+ (int) (overlayAlpha * Color.red(baseColor) +
+ (1f - overlayAlpha) * Color.red(overlayColor)),
+ (int) (overlayAlpha * Color.green(baseColor) +
+ (1f - overlayAlpha) * Color.green(overlayColor)),
+ (int) (overlayAlpha * Color.blue(baseColor) +
+ (1f - overlayAlpha) * Color.blue(overlayColor)));
+ }
+
+ /**
+ * Cancels an animation ensuring that if it has listeners, onCancel and onEnd
+ * are not called.
+ */
+ public static void cancelAnimationWithoutCallbacks(Animator animator) {
+ if (animator != null && animator.isStarted()) {
+ removeAnimationListenersRecursive(animator);
+ animator.cancel();
+ }
+ }
+
+ /**
+ * Recursively removes all the listeners of all children of this animator
+ */
+ public static void removeAnimationListenersRecursive(Animator animator) {
+ if (animator instanceof AnimatorSet) {
+ ArrayList animators = ((AnimatorSet) animator).getChildAnimations();
+ for (int i = animators.size() - 1; i >= 0; i--) {
+ removeAnimationListenersRecursive(animators.get(i));
+ }
+ }
+ animator.removeAllListeners();
+ }
+
+ /**
+ * Sets the given {@link View}'s frame from its current translation.
+ */
+ public static void setViewFrameFromTranslation(View v) {
+ RectF taskViewRect = new RectF(v.getLeft(), v.getTop(), v.getRight(), v.getBottom());
+ taskViewRect.offset(v.getTranslationX(), v.getTranslationY());
+ v.setTranslationX(0);
+ v.setTranslationY(0);
+ v.setLeftTopRightBottom((int) taskViewRect.left, (int) taskViewRect.top,
+ (int) taskViewRect.right, (int) taskViewRect.bottom);
+ }
+
+ /**
+ * Returns a view stub for the given view id.
+ */
+ public static ViewStub findViewStubById(View v, int stubId) {
+ return (ViewStub) v.findViewById(stubId);
+ }
+
+ /**
+ * Returns a view stub for the given view id.
+ */
+ public static ViewStub findViewStubById(Activity a, int stubId) {
+ return (ViewStub) a.findViewById(stubId);
+ }
+
+ /**
+ * Used for debugging, converts DP to PX.
+ */
+ public static float dpToPx(Resources res, float dp) {
+ return TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, dp, res.getDisplayMetrics());
+ }
+
+ /**
+ * Adds a trace event for debugging.
+ */
+ public static void addTraceEvent(String event) {
+ Trace.traceBegin(Trace.TRACE_TAG_VIEW, event);
+ Trace.traceEnd(Trace.TRACE_TAG_VIEW);
+ }
+
+ /**
+ * Returns whether this view, or one of its descendants have accessibility focus.
+ */
+ public static boolean isDescendentAccessibilityFocused(View v) {
+ if (v.isAccessibilityFocused()) {
+ return true;
+ }
+
+ if (v instanceof ViewGroup) {
+ ViewGroup vg = (ViewGroup) v;
+ int childCount = vg.getChildCount();
+ for (int i = 0; i < childCount; i++) {
+ if (isDescendentAccessibilityFocused(vg.getChildAt(i))) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Returns the application configuration, which is independent of the activity's current
+ * configuration in multiwindow.
+ */
+ public static Configuration getAppConfiguration(Context context) {
+ return context.getApplicationContext().getResources().getConfiguration();
+ }
+
+ /**
+ * @return The next frame name for the specified surface or -1 if the surface is no longer
+ * valid.
+ */
+ public static long getNextFrameNumber(Surface s) {
+ return s != null && s.isValid()
+ ? s.getNextFrameNumber()
+ : -1;
+
+ }
+
+ /**
+ * @return The surface for the specified view.
+ */
+ public static @Nullable Surface getSurface(View v) {
+ ViewRootImpl viewRoot = v.getViewRootImpl();
+ if (viewRoot == null) {
+ return null;
+ }
+ return viewRoot.mSurface;
+ }
+
+ /**
+ * Returns a lightweight dump of a rect.
+ */
+ public static String dumpRect(Rect r) {
+ if (r == null) {
+ return "N:0,0-0,0";
+ }
+ return r.left + "," + r.top + "-" + r.right + "," + r.bottom;
+ }
+
+ /**
+ * Posts a runnable on a handler at the front of the queue ignoring any sync barriers.
+ */
+ public static void postAtFrontOfQueueAsynchronously(Handler h, Runnable r) {
+ Message msg = h.obtainMessage().setCallback(r);
+ h.sendMessageAtFrontOfQueue(msg);
+ }
+
+ /** Calculates the constrast between two colors, using the algorithm provided by the WCAG v2. */
+ public static float computeContrastBetweenColors(int bg, int fg) {
+ float bgR = Color.red(bg) / 255f;
+ float bgG = Color.green(bg) / 255f;
+ float bgB = Color.blue(bg) / 255f;
+ bgR = (bgR < 0.03928f) ? bgR / 12.92f : (float) Math.pow((bgR + 0.055f) / 1.055f, 2.4f);
+ bgG = (bgG < 0.03928f) ? bgG / 12.92f : (float) Math.pow((bgG + 0.055f) / 1.055f, 2.4f);
+ bgB = (bgB < 0.03928f) ? bgB / 12.92f : (float) Math.pow((bgB + 0.055f) / 1.055f, 2.4f);
+ float bgL = 0.2126f * bgR + 0.7152f * bgG + 0.0722f * bgB;
+
+ float fgR = Color.red(fg) / 255f;
+ float fgG = Color.green(fg) / 255f;
+ float fgB = Color.blue(fg) / 255f;
+ fgR = (fgR < 0.03928f) ? fgR / 12.92f : (float) Math.pow((fgR + 0.055f) / 1.055f, 2.4f);
+ fgG = (fgG < 0.03928f) ? fgG / 12.92f : (float) Math.pow((fgG + 0.055f) / 1.055f, 2.4f);
+ fgB = (fgB < 0.03928f) ? fgB / 12.92f : (float) Math.pow((fgB + 0.055f) / 1.055f, 2.4f);
+ float fgL = 0.2126f * fgR + 0.7152f * fgG + 0.0722f * fgB;
+
+ return Math.abs((fgL + 0.05f) / (bgL + 0.05f));
+ }
+
+ /**
+ * @return the clamped {@param value} between the provided {@param min} and {@param max}.
+ */
+ public static float clamp(float value, float min, float max) {
+ return Math.max(min, Math.min(max, value));
+ }
+
+}
diff --git a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/view/AnimateableViewBounds.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/AnimateableViewBounds.java
similarity index 96%
rename from packages/SystemUI/shared/src/com/android/systemui/shared/recents/view/AnimateableViewBounds.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/AnimateableViewBounds.java
index 30bea32dedff1..e188506393367 100644
--- a/packages/SystemUI/shared/src/com/android/systemui/shared/recents/view/AnimateableViewBounds.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/AnimateableViewBounds.java
@@ -14,20 +14,18 @@
* limitations under the License.
*/
-package com.android.systemui.shared.recents.view;
+package com.android.systemui.recents.views;
import android.graphics.Outline;
import android.graphics.Rect;
import android.view.View;
-import android.view.ViewDebug;
import android.view.ViewOutlineProvider;
-import com.android.systemui.shared.recents.utilities.Utilities;
+import com.android.systemui.recents.utilities.Utilities;
/**
* An outline provider that has a clip and outline that can be animated.
*/
-@Deprecated
public class AnimateableViewBounds extends ViewOutlineProvider {
private static final float MIN_ALPHA = 0.1f;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/DockState.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/DockState.java
similarity index 98%
rename from packages/SystemUI/src/com/android/systemui/recents/views/DockState.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/DockState.java
index a246141c74f88..d9c921cf3f7d5 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/DockState.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/DockState.java
@@ -45,8 +45,8 @@ import android.view.animation.Interpolator;
import com.android.internal.policy.DockedDividerUtils;
import com.android.systemui.Interpolators;
import com.android.systemui.R;
-import com.android.systemui.recents.Recents;
-import com.android.systemui.shared.recents.utilities.Utilities;
+import com.android.systemui.recents.LegacyRecentsImpl;
+import com.android.systemui.recents.utilities.Utilities;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@@ -132,7 +132,7 @@ public class DockState implements DropTarget {
private ViewState(int areaAlpha, int hintAlpha, @TextOrientation int hintOrientation,
int hintTextResId) {
dockAreaAlpha = areaAlpha;
- dockAreaOverlay = new ColorDrawable(Recents.getConfiguration().isGridEnabled
+ dockAreaOverlay = new ColorDrawable(LegacyRecentsImpl.getConfiguration().isGridEnabled
? DOCK_AREA_GRID_BG_COLOR : DOCK_AREA_BG_COLOR);
dockAreaOverlay.setAlpha(0);
hintTextAlpha = hintAlpha;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/DropTarget.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/DropTarget.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/views/DropTarget.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/DropTarget.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/FakeShadowDrawable.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/FakeShadowDrawable.java
similarity index 98%
rename from packages/SystemUI/src/com/android/systemui/recents/views/FakeShadowDrawable.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/FakeShadowDrawable.java
index 79a774f7fba06..86b4297663cb4 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/FakeShadowDrawable.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/FakeShadowDrawable.java
@@ -30,7 +30,7 @@ import android.graphics.drawable.Drawable;
import android.util.Log;
import com.android.systemui.R;
-import com.android.systemui.recents.Recents;
+import com.android.systemui.recents.LegacyRecentsImpl;
import com.android.systemui.recents.RecentsConfiguration;
/**
@@ -91,7 +91,7 @@ class FakeShadowDrawable extends Drawable {
mCornerShadowPaint = new Paint(Paint.ANTI_ALIAS_FLAG | Paint.DITHER_FLAG);
mCornerShadowPaint.setStyle(Paint.Style.FILL);
mCornerShadowPaint.setDither(true);
- mCornerRadius = Recents.getConfiguration().isGridEnabled ?
+ mCornerRadius = LegacyRecentsImpl.getConfiguration().isGridEnabled ?
resources.getDimensionPixelSize(
R.dimen.recents_grid_task_view_rounded_corners_radius) :
resources.getDimensionPixelSize(R.dimen.recents_task_view_rounded_corners_radius);
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/FixedSizeFrameLayout.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/FixedSizeFrameLayout.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/views/FixedSizeFrameLayout.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/FixedSizeFrameLayout.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/FixedSizeImageView.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/FixedSizeImageView.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/views/FixedSizeImageView.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/FixedSizeImageView.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsEntrancePathInterpolator.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/RecentsEntrancePathInterpolator.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/views/RecentsEntrancePathInterpolator.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/RecentsEntrancePathInterpolator.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsTransitionComposer.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/RecentsTransitionComposer.java
similarity index 97%
rename from packages/SystemUI/src/com/android/systemui/recents/views/RecentsTransitionComposer.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/RecentsTransitionComposer.java
index 1c47430106e89..ce6631820fd84 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsTransitionComposer.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/RecentsTransitionComposer.java
@@ -24,11 +24,10 @@ import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;
import android.content.Context;
import android.graphics.Bitmap;
-import android.graphics.GraphicBuffer;
import android.graphics.Rect;
import android.util.Log;
-import com.android.systemui.recents.Recents;
+import com.android.systemui.recents.LegacyRecentsImpl;
import com.android.systemui.recents.RecentsDebugFlags;
import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.recents.view.AppTransitionAnimationSpecCompat;
@@ -71,7 +70,7 @@ public class RecentsTransitionComposer {
// height (stackView height) and when transitioning to fullscreen app, the code below would
// force the task thumbnail to full stackView height immediately causing the transition
// jarring.
- if (!Recents.getConfiguration().isLowRamDevice && taskView.getTask() !=
+ if (!LegacyRecentsImpl.getConfiguration().isLowRamDevice && taskView.getTask() !=
stackView.getStack().getFrontMostTask()) {
taskRect.bottom = taskRect.top + stackView.getMeasuredHeight();
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/RecentsView.java
similarity index 96%
rename from packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/RecentsView.java
index 5c925fda640e8..0d758df11efc9 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsView.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/RecentsView.java
@@ -56,7 +56,7 @@ import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.settingslib.Utils;
import com.android.systemui.Interpolators;
import com.android.systemui.R;
-import com.android.systemui.recents.Recents;
+import com.android.systemui.recents.LegacyRecentsImpl;
import com.android.systemui.recents.RecentsActivity;
import com.android.systemui.recents.RecentsActivityLaunchState;
import com.android.systemui.recents.RecentsConfiguration;
@@ -88,8 +88,8 @@ import com.android.systemui.recents.events.ui.dragndrop.DragStartEvent;
import com.android.systemui.recents.misc.ReferenceCountedTrigger;
import com.android.systemui.recents.misc.SystemServicesProxy;
import com.android.systemui.shared.recents.model.Task;
-import com.android.systemui.shared.recents.model.TaskStack;
-import com.android.systemui.shared.recents.utilities.Utilities;
+import com.android.systemui.recents.model.TaskStack;
+import com.android.systemui.recents.utilities.Utilities;
import com.android.systemui.shared.recents.view.AppTransitionAnimationSpecCompat;
import com.android.systemui.shared.recents.view.AppTransitionAnimationSpecsFuture;
import com.android.systemui.shared.recents.view.RecentsTransition;
@@ -166,7 +166,7 @@ public class RecentsView extends FrameLayout {
super(context, attrs, defStyleAttr, defStyleRes);
setWillNotDraw(false);
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
mHandler = new Handler();
mTransitionHelper = new RecentsTransitionComposer(getContext());
mDividerSize = ssp.getDockedDividerSize(context);
@@ -182,7 +182,7 @@ public class RecentsView extends FrameLayout {
if (mStackActionButton != null) {
removeView(mStackActionButton);
}
- mStackActionButton = (TextView) inflater.inflate(Recents.getConfiguration()
+ mStackActionButton = (TextView) inflater.inflate(LegacyRecentsImpl.getConfiguration()
.isLowRamDevice
? R.layout.recents_low_ram_stack_action_button
: R.layout.recents_stack_action_button,
@@ -231,7 +231,7 @@ public class RecentsView extends FrameLayout {
* Called from RecentsActivity when it is relaunched.
*/
public void onReload(TaskStack stack, boolean isResumingFromVisible) {
- final RecentsConfiguration config = Recents.getConfiguration();
+ final RecentsConfiguration config = LegacyRecentsImpl.getConfiguration();
final RecentsActivityLaunchState launchState = config.getLaunchState();
final boolean isTaskStackEmpty = stack.getTaskCount() == 0;
@@ -350,7 +350,7 @@ public class RecentsView extends FrameLayout {
/** Launches the task that recents was launched from if possible */
public boolean launchPreviousTask() {
- if (Recents.getConfiguration().getLaunchState().launchedFromPipApp) {
+ if (LegacyRecentsImpl.getConfiguration().getLaunchState().launchedFromPipApp) {
// If the app auto-entered PiP on the way to Recents, then just re-expand it
EventBus.getDefault().send(new ExpandPipEvent());
return true;
@@ -481,14 +481,14 @@ public class RecentsView extends FrameLayout {
mAwaitingFirstLayout = false;
// If launched via dragging from the nav bar, then we should translate the whole view
// down offscreen
- RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
+ RecentsActivityLaunchState launchState = LegacyRecentsImpl.getConfiguration().getLaunchState();
if (launchState.launchedViaDragGesture) {
setTranslationY(getMeasuredHeight());
} else {
setTranslationY(0f);
}
- if (Recents.getConfiguration().isLowRamDevice
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice
&& mEmptyView.getVisibility() == View.VISIBLE) {
animateEmptyView(true /* show */, null /* postAnimationTrigger */);
}
@@ -540,7 +540,7 @@ public class RecentsView extends FrameLayout {
public final void onBusEvent(LaunchTaskEvent event) {
launchTaskFromRecents(getStack(), event.task, mTaskStackView, event.taskView,
event.screenPinningRequested, event.targetWindowingMode, event.targetActivityType);
- if (Recents.getConfiguration().isLowRamDevice) {
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
EventBus.getDefault().send(new HideStackActionButtonEvent(false /* translate */));
}
}
@@ -551,13 +551,13 @@ public class RecentsView extends FrameLayout {
EventBus.getDefault().send(new HideStackActionButtonEvent());
animateBackgroundScrim(0f, taskViewExitToHomeDuration);
- if (Recents.getConfiguration().isLowRamDevice) {
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
animateEmptyView(false /* show */, event.getAnimationTrigger());
}
}
public final void onBusEvent(DragStartEvent event) {
- updateVisibleDockRegions(Recents.getConfiguration().getDockStatesForCurrentOrientation(),
+ updateVisibleDockRegions(LegacyRecentsImpl.getConfiguration().getDockStatesForCurrentOrientation(),
true /* isDefaultDockState */, DockState.NONE.viewState.dockAreaAlpha,
DockState.NONE.viewState.hintTextAlpha,
true /* animateAlpha */, false /* animateBounds */);
@@ -575,7 +575,7 @@ public class RecentsView extends FrameLayout {
public final void onBusEvent(DragDropTargetChangedEvent event) {
if (event.dropTarget == null || !(event.dropTarget instanceof DockState)) {
updateVisibleDockRegions(
- Recents.getConfiguration().getDockStatesForCurrentOrientation(),
+ LegacyRecentsImpl.getConfiguration().getDockStatesForCurrentOrientation(),
true /* isDefaultDockState */, DockState.NONE.viewState.dockAreaAlpha,
DockState.NONE.viewState.hintTextAlpha,
true /* animateAlpha */, true /* animateBounds */);
@@ -695,7 +695,7 @@ public class RecentsView extends FrameLayout {
}
public final void onBusEvent(EnterRecentsWindowAnimationCompletedEvent event) {
- RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
+ RecentsActivityLaunchState launchState = LegacyRecentsImpl.getConfiguration().getLaunchState();
if (!launchState.launchedViaDockGesture && !launchState.launchedFromApp
&& getStack().getTaskCount() > 0) {
animateBackgroundScrim(getOpaqueScrimAlpha(),
@@ -708,7 +708,7 @@ public class RecentsView extends FrameLayout {
}
public final void onBusEvent(DismissAllTaskViewsEvent event) {
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
if (!ssp.hasDockedTask()) {
// Animate the background away only if we are dismissing Recents to home
animateBackgroundScrim(0f, DEFAULT_UPDATE_SCRIM_DURATION);
@@ -741,7 +741,7 @@ public class RecentsView extends FrameLayout {
mStackActionButton.setAlpha(0f);
if (translate) {
mStackActionButton.setTranslationY(mStackActionButton.getMeasuredHeight() *
- (Recents.getConfiguration().isLowRamDevice ? 1 : -0.25f));
+ (LegacyRecentsImpl.getConfiguration().isLowRamDevice ? 1 : -0.25f));
} else {
mStackActionButton.setTranslationY(0f);
}
@@ -780,7 +780,7 @@ public class RecentsView extends FrameLayout {
if (mStackActionButton.getVisibility() == View.VISIBLE) {
if (translate) {
mStackActionButton.animate().translationY(mStackActionButton.getMeasuredHeight()
- * (Recents.getConfiguration().isLowRamDevice ? 1 : -0.25f));
+ * (LegacyRecentsImpl.getConfiguration().isLowRamDevice ? 1 : -0.25f));
}
mStackActionButton.animate()
.alpha(0f)
@@ -896,8 +896,8 @@ public class RecentsView extends FrameLayout {
Rect actionButtonRect = new Rect(
mTaskStackView.mLayoutAlgorithm.getStackActionButtonRect());
int left, top;
- if (Recents.getConfiguration().isLowRamDevice) {
- Rect windowRect = Recents.getSystemServices().getWindowRect();
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
+ Rect windowRect = LegacyRecentsImpl.getSystemServices().getWindowRect();
int spaceLeft = windowRect.width() - mSystemInsets.left - mSystemInsets.right;
left = (spaceLeft - mStackActionButton.getMeasuredWidth()) / 2 + mSystemInsets.left;
top = windowRect.height() - (mStackActionButton.getMeasuredHeight()
@@ -932,7 +932,7 @@ public class RecentsView extends FrameLayout {
// Fetch window rect here already in order not to be blocked on lock contention in WM
// when the future calls it.
- final Rect windowRect = Recents.getSystemServices().getWindowRect();
+ final Rect windowRect = LegacyRecentsImpl.getSystemServices().getWindowRect();
transitionFuture = new AppTransitionAnimationSpecsFuture(stackView.getHandler()) {
@Override
public List composeSpecs() {
@@ -964,7 +964,7 @@ public class RecentsView extends FrameLayout {
}, 350);
}
- if (!Recents.getConfiguration().isLowRamDevice) {
+ if (!LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
// Reset the state where we are waiting for the transition to start
EventBus.getDefault().send(new SetWaitingForTransitionStartEvent(false));
}
@@ -989,7 +989,7 @@ public class RecentsView extends FrameLayout {
EventBus.getDefault().send(new ExitRecentsWindowFirstAnimationFrameEvent());
stackView.cancelAllTaskViewAnimations();
- if (!Recents.getConfiguration().isLowRamDevice) {
+ if (!LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
// Reset the state where we are waiting for the transition to start
EventBus.getDefault().send(new SetWaitingForTransitionStartEvent(false));
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsViewTouchHandler.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/RecentsViewTouchHandler.java
similarity index 97%
rename from packages/SystemUI/src/com/android/systemui/recents/views/RecentsViewTouchHandler.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/RecentsViewTouchHandler.java
index 53a91e536c8a7..1a827d5941c07 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/RecentsViewTouchHandler.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/RecentsViewTouchHandler.java
@@ -16,7 +16,6 @@
package com.android.systemui.recents.views;
-import android.app.ActivityManager;
import android.app.ActivityTaskManager;
import android.graphics.Point;
import android.graphics.Rect;
@@ -28,7 +27,7 @@ import android.view.ViewConfiguration;
import android.view.ViewDebug;
import com.android.internal.policy.DividerSnapAlgorithm;
-import com.android.systemui.recents.Recents;
+import com.android.systemui.recents.LegacyRecentsImpl;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.activity.ConfigurationChangedEvent;
import com.android.systemui.recents.events.activity.HideRecentsEvent;
@@ -115,7 +114,7 @@ public class RecentsViewTouchHandler {
/**** Events ****/
public final void onBusEvent(DragStartEvent event) {
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
mRv.getParent().requestDisallowInterceptTouchEvent(true);
mDragRequested = true;
// We defer starting the actual drag handling until the user moves past the drag slop
@@ -140,13 +139,13 @@ public class RecentsViewTouchHandler {
mVisibleDockStates.clear();
if (ActivityTaskManager.supportsMultiWindow(mRv.getContext()) && !ssp.hasDockedTask()
&& mDividerSnapAlgorithm.isSplitScreenFeasible()) {
- Recents.logDockAttempt(mRv.getContext(), event.task.getTopComponent(),
+ LegacyRecentsImpl.logDockAttempt(mRv.getContext(), event.task.getTopComponent(),
event.task.resizeMode);
if (!event.task.isDockable) {
EventBus.getDefault().send(new ShowIncompatibleAppOverlayEvent());
} else {
// Add the dock state drop targets (these take priority)
- DockState[] dockStates = Recents.getConfiguration()
+ DockState[] dockStates = LegacyRecentsImpl.getConfiguration()
.getDockStatesForCurrentOrientation();
for (DockState dockState : dockStates) {
registerDropTargetForCurrentDrag(dockState);
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/SystemBarScrimViews.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/SystemBarScrimViews.java
similarity index 95%
rename from packages/SystemUI/src/com/android/systemui/recents/views/SystemBarScrimViews.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/SystemBarScrimViews.java
index 170e39dfc3606..22c12b408a132 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/SystemBarScrimViews.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/SystemBarScrimViews.java
@@ -21,7 +21,7 @@ import android.view.View;
import com.android.systemui.Interpolators;
import com.android.systemui.R;
-import com.android.systemui.recents.Recents;
+import com.android.systemui.recents.LegacyRecentsImpl;
import com.android.systemui.recents.RecentsActivity;
import com.android.systemui.recents.events.activity.ConfigurationChangedEvent;
import com.android.systemui.recents.events.activity.DismissRecentsToHomeAnimationStarted;
@@ -30,7 +30,7 @@ import com.android.systemui.recents.events.ui.DismissAllTaskViewsEvent;
import com.android.systemui.recents.events.activity.MultiWindowStateChangedEvent;
import com.android.systemui.recents.events.ui.dragndrop.DragEndCancelledEvent;
import com.android.systemui.recents.events.ui.dragndrop.DragEndEvent;
-import com.android.systemui.shared.recents.utilities.AnimationProps;
+import com.android.systemui.recents.utilities.AnimationProps;
/** Manages the scrims for the various system bars. */
public class SystemBarScrimViews {
@@ -53,8 +53,8 @@ public class SystemBarScrimViews {
mNavBarScrimView.forceHasOverlappingRendering(false);
mNavBarScrimEnterDuration = activity.getResources().getInteger(
R.integer.recents_nav_bar_scrim_enter_duration);
- mHasNavBarScrim = Recents.getSystemServices().hasTransposedNavigationBar();
- mHasDockedTasks = Recents.getSystemServices().hasDockedTask();
+ mHasNavBarScrim = LegacyRecentsImpl.getSystemServices().hasTransposedNavigationBar();
+ mHasDockedTasks = LegacyRecentsImpl.getSystemServices().hasDockedTask();
}
/**
@@ -147,7 +147,7 @@ public class SystemBarScrimViews {
public final void onBusEvent(ConfigurationChangedEvent event) {
if (event.fromDeviceOrientationChange) {
- mHasNavBarScrim = Recents.getSystemServices().hasTransposedNavigationBar();
+ mHasNavBarScrim = LegacyRecentsImpl.getSystemServices().hasTransposedNavigationBar();
}
animateScrimToCurrentNavBarState(event.hasStackTasks);
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackAnimationHelper.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskStackAnimationHelper.java
similarity index 97%
rename from packages/SystemUI/src/com/android/systemui/recents/views/TaskStackAnimationHelper.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskStackAnimationHelper.java
index 67d09787e9f3c..55749348b0044 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackAnimationHelper.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskStackAnimationHelper.java
@@ -28,7 +28,7 @@ import android.view.animation.PathInterpolator;
import com.android.systemui.Interpolators;
import com.android.systemui.R;
-import com.android.systemui.recents.Recents;
+import com.android.systemui.recents.LegacyRecentsImpl;
import com.android.systemui.recents.RecentsActivityLaunchState;
import com.android.systemui.recents.RecentsConfiguration;
import com.android.systemui.recents.RecentsDebugFlags;
@@ -36,9 +36,9 @@ import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.component.SetWaitingForTransitionStartEvent;
import com.android.systemui.recents.misc.ReferenceCountedTrigger;
import com.android.systemui.shared.recents.model.Task;
-import com.android.systemui.shared.recents.model.TaskStack;
+import com.android.systemui.recents.model.TaskStack;
import com.android.systemui.recents.views.lowram.TaskStackLowRamLayoutAlgorithm;
-import com.android.systemui.shared.recents.utilities.AnimationProps;
+import com.android.systemui.recents.utilities.AnimationProps;
import java.util.ArrayList;
import java.util.List;
@@ -115,7 +115,7 @@ public class TaskStackAnimationHelper {
public TaskStackAnimationHelper(Context context, TaskStackView stackView) {
mStackView = stackView;
- mEnterAndExitFromHomeTranslationOffset = Recents.getConfiguration().isGridEnabled
+ mEnterAndExitFromHomeTranslationOffset = LegacyRecentsImpl.getConfiguration().isGridEnabled
? 0 : DOUBLE_FRAME_OFFSET_MS;
}
@@ -124,7 +124,7 @@ public class TaskStackAnimationHelper {
* the in-app enter animations start (after the window-transition completes).
*/
public void prepareForEnterAnimation() {
- RecentsConfiguration config = Recents.getConfiguration();
+ RecentsConfiguration config = LegacyRecentsImpl.getConfiguration();
RecentsActivityLaunchState launchState = config.getLaunchState();
Resources res = mStackView.getResources();
Resources appResources = mStackView.getContext().getApplicationContext().getResources();
@@ -148,7 +148,7 @@ public class TaskStackAnimationHelper {
== Configuration.ORIENTATION_LANDSCAPE;
float top = 0;
- final boolean isLowRamDevice = Recents.getConfiguration().isLowRamDevice;
+ final boolean isLowRamDevice = LegacyRecentsImpl.getConfiguration().isLowRamDevice;
if (isLowRamDevice && launchState.launchedFromApp && !launchState.launchedViaDockGesture) {
stackLayout.getStackTransform(launchTargetTask, stackScroller.getStackScroll(),
mTmpTransform, null /* frontTransform */);
@@ -212,7 +212,7 @@ public class TaskStackAnimationHelper {
* depending on how Recents was triggered.
*/
public void startEnterAnimation(final ReferenceCountedTrigger postAnimationTrigger) {
- RecentsConfiguration config = Recents.getConfiguration();
+ RecentsConfiguration config = LegacyRecentsImpl.getConfiguration();
RecentsActivityLaunchState launchState = config.getLaunchState();
Resources res = mStackView.getResources();
Resources appRes = mStackView.getContext().getApplicationContext().getResources();
@@ -227,7 +227,7 @@ public class TaskStackAnimationHelper {
return;
}
- final boolean isLowRamDevice = Recents.getConfiguration().isLowRamDevice;
+ final boolean isLowRamDevice = LegacyRecentsImpl.getConfiguration().isLowRamDevice;
int taskViewEnterFromAppDuration = res.getInteger(
R.integer.recents_task_enter_from_app_duration);
int taskViewEnterFromAffiliatedAppDuration = res.getInteger(
@@ -342,7 +342,7 @@ public class TaskStackAnimationHelper {
taskAnimation = new AnimationProps()
.setDuration(AnimationProps.BOUNDS, EXIT_TO_HOME_TRANSLATION_DURATION)
.setListener(postAnimationTrigger.decrementOnAnimationEnd());
- if (Recents.getConfiguration().isLowRamDevice) {
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
taskAnimation.setInterpolator(AnimationProps.BOUNDS,
Interpolators.FAST_OUT_SLOW_IN);
} else {
@@ -356,7 +356,7 @@ public class TaskStackAnimationHelper {
}
mTmpTransform.fillIn(tv);
- if (Recents.getConfiguration().isLowRamDevice) {
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
taskAnimation.setInterpolator(AnimationProps.ALPHA,
EXIT_TO_HOME_TRANSLATION_INTERPOLATOR)
.setDuration(AnimationProps.ALPHA, EXIT_TO_HOME_TRANSLATION_DURATION);
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java
similarity index 96%
rename from packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java
index d9f79bb6d34ee..58a3f12c465de 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskStackLayoutAlgorithm.java
@@ -29,15 +29,15 @@ import android.util.SparseIntArray;
import android.view.ViewDebug;
import com.android.systemui.R;
-import com.android.systemui.recents.Recents;
+import com.android.systemui.recents.LegacyRecentsImpl;
import com.android.systemui.recents.RecentsActivityLaunchState;
import com.android.systemui.recents.RecentsConfiguration;
import com.android.systemui.recents.RecentsDebugFlags;
import com.android.systemui.recents.misc.FreePathInterpolator;
import com.android.systemui.recents.misc.SystemServicesProxy;
-import com.android.systemui.shared.recents.utilities.Utilities;
+import com.android.systemui.recents.utilities.Utilities;
import com.android.systemui.shared.recents.model.Task;
-import com.android.systemui.shared.recents.model.TaskStack;
+import com.android.systemui.recents.model.TaskStack;
import com.android.systemui.recents.views.lowram.TaskStackLowRamLayoutAlgorithm;
import com.android.systemui.recents.views.grid.TaskGridLayoutAlgorithm;
@@ -149,7 +149,7 @@ public class TaskStackLayoutAlgorithm {
* @return True if we should use the grid layout.
*/
boolean useGridLayout() {
- return Recents.getConfiguration().isGridEnabled;
+ return LegacyRecentsImpl.getConfiguration().isGridEnabled;
}
// A report of the visibility state of the stack
@@ -432,7 +432,7 @@ public class TaskStackLayoutAlgorithm {
*/
public void update(TaskStack stack, ArraySet ignoreTasksSet,
RecentsActivityLaunchState launchState, float lastScrollPPercent) {
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
// Clear the progress map
mTaskIndexMap.clear();
@@ -494,10 +494,10 @@ public class TaskStackLayoutAlgorithm {
int maxBottomOffset = mStackBottomOffset + mTaskRect.height();
float maxBottomNormX = getNormalizedXFromUnfocusedY(maxBottomOffset, FROM_BOTTOM);
mUnfocusedRange.offset(0f);
- mMinScrollP = Recents.getConfiguration().isLowRamDevice
+ mMinScrollP = LegacyRecentsImpl.getConfiguration().isLowRamDevice
? mTaskStackLowRamLayoutAlgorithm.getMinScrollP()
: 0;
- mMaxScrollP = Recents.getConfiguration().isLowRamDevice
+ mMaxScrollP = LegacyRecentsImpl.getConfiguration().isLowRamDevice
? mTaskStackLowRamLayoutAlgorithm.getMaxScrollP(taskCount)
: Math.max(mMinScrollP, (mNumStackTasks - 1) -
Math.max(0, mUnfocusedRange.getAbsoluteX(maxBottomNormX)));
@@ -508,7 +508,7 @@ public class TaskStackLayoutAlgorithm {
mInitialScrollP = Utilities.clamp(launchTaskIndex, mMinScrollP, mMaxScrollP);
} else if (0 <= lastScrollPPercent && lastScrollPPercent <= 1) {
mInitialScrollP = Utilities.mapRange(lastScrollPPercent, mMinScrollP, mMaxScrollP);
- } else if (Recents.getConfiguration().isLowRamDevice) {
+ } else if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
mInitialScrollP = mTaskStackLowRamLayoutAlgorithm.getInitialScrollP(mNumStackTasks,
scrollToFront);
} else if (scrollToFront) {
@@ -527,7 +527,7 @@ public class TaskStackLayoutAlgorithm {
* Creates task overrides to ensure the initial stack layout if necessary.
*/
public void setTaskOverridesForInitialState(TaskStack stack, boolean ignoreScrollToFront) {
- RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
+ RecentsActivityLaunchState launchState = LegacyRecentsImpl.getConfiguration().getLaunchState();
mTaskIndexOverrideMap.clear();
@@ -620,7 +620,7 @@ public class TaskStackLayoutAlgorithm {
*/
public float updateFocusStateOnScroll(float lastTargetStackScroll, float targetStackScroll,
float lastStackScroll) {
- if (targetStackScroll == lastStackScroll || Recents.getConfiguration().isLowRamDevice) {
+ if (targetStackScroll == lastStackScroll || LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
return targetStackScroll;
}
@@ -665,8 +665,8 @@ public class TaskStackLayoutAlgorithm {
* Returns the default focus state.
*/
public int getInitialFocusState() {
- RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
- RecentsDebugFlags debugFlags = Recents.getDebugFlags();
+ RecentsActivityLaunchState launchState = LegacyRecentsImpl.getConfiguration().getLaunchState();
+ RecentsDebugFlags debugFlags = LegacyRecentsImpl.getDebugFlags();
if (launchState.launchedWithAltTab) {
return STATE_FOCUSED;
} else {
@@ -709,7 +709,7 @@ public class TaskStackLayoutAlgorithm {
return mTaskGridLayoutAlgorithm.computeStackVisibilityReport(tasks);
}
- if (Recents.getConfiguration().isLowRamDevice) {
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
return mTaskStackLowRamLayoutAlgorithm.computeStackVisibilityReport(tasks);
}
@@ -786,7 +786,7 @@ public class TaskStackLayoutAlgorithm {
int taskCount = mTaskIndexMap.size();
mTaskGridLayoutAlgorithm.getTransform(taskIndex, taskCount, transformOut, this);
return transformOut;
- } else if (Recents.getConfiguration().isLowRamDevice) {
+ } else if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
if (task == null) {
transformOut.reset();
return transformOut;
@@ -832,7 +832,7 @@ public class TaskStackLayoutAlgorithm {
Rect windowOverrideRect) {
Rect windowRect = windowOverrideRect != null
? windowOverrideRect
- : Recents.getSystemServices().getWindowRect();
+ : LegacyRecentsImpl.getSystemServices().getWindowRect();
transformOut.rect.offset(windowRect.left, windowRect.top);
if (useGridLayout()) {
// Draw the thumbnail a little lower to perfectly coincide with the view we are
@@ -853,7 +853,7 @@ public class TaskStackLayoutAlgorithm {
public void getStackTransform(float taskProgress, float nonOverrideTaskProgress,
float stackScroll, int focusState, TaskViewTransform transformOut,
TaskViewTransform frontTransform, boolean ignoreSingleTaskCase, boolean forceUpdate) {
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
// Ensure that the task is in range
mUnfocusedRange.offset(stackScroll);
@@ -932,10 +932,12 @@ public class TaskStackLayoutAlgorithm {
}
}
y = (mStackRect.top - mTaskRect.top) +
- (int) Utilities.mapRange(focusState, unfocusedY, focusedY);
+ (int) com.android.systemui.recents.utilities.Utilities
+ .mapRange(focusState, unfocusedY, focusedY);
z = Utilities.mapRange(Utilities.clamp01(boundedScrollUnfocusedNonOverrideRangeX),
mMinTranslationZ, mMaxTranslationZ);
- dimAlpha = Utilities.mapRange(focusState, unfocusedDim, focusedDim);
+ dimAlpha = com.android.systemui.recents.utilities.Utilities
+ .mapRange(focusState, unfocusedDim, focusedDim);
viewOutlineAlpha = Utilities.mapRange(Utilities.clamp01(boundedScrollUnfocusedRangeX),
OUTLINE_ALPHA_MIN_VALUE, OUTLINE_ALPHA_MAX_VALUE);
}
@@ -966,7 +968,7 @@ public class TaskStackLayoutAlgorithm {
*/
float getStackScrollForTask(Task t) {
Float overrideP = mTaskIndexOverrideMap.get(t.key.id, null);
- if (Recents.getConfiguration().isLowRamDevice || overrideP == null) {
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice || overrideP == null) {
return (float) mTaskIndexMap.get(t.key.id, 0);
}
return overrideP;
@@ -985,8 +987,8 @@ public class TaskStackLayoutAlgorithm {
* offset (which is at the task's brightest point).
*/
float getStackScrollForTaskAtInitialOffset(Task t) {
- if (Recents.getConfiguration().isLowRamDevice) {
- RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
+ RecentsActivityLaunchState launchState = LegacyRecentsImpl.getConfiguration().getLaunchState();
return mTaskStackLowRamLayoutAlgorithm.getInitialScrollP(mNumStackTasks,
launchState.launchedFromHome || launchState.launchedFromPipApp
|| launchState.launchedWithNextPipApp);
@@ -1003,7 +1005,7 @@ public class TaskStackLayoutAlgorithm {
* screen along the arc-length proportionally (1/arclength).
*/
public float getDeltaPForY(int downY, int y) {
- if (Recents.getConfiguration().isLowRamDevice) {
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
return mTaskStackLowRamLayoutAlgorithm.scrollToPercentage(downY - y);
}
float deltaP = (float) (y - downY) / mStackRect.height() *
@@ -1016,7 +1018,7 @@ public class TaskStackLayoutAlgorithm {
* of the curve, map back to the screen y.
*/
public int getYForDeltaP(float downScrollP, float p) {
- if (Recents.getConfiguration().isLowRamDevice) {
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
return mTaskStackLowRamLayoutAlgorithm.percentageToScroll(downScrollP - p);
}
int y = (int) ((p - downScrollP) * mStackRect.height() *
@@ -1068,7 +1070,7 @@ public class TaskStackLayoutAlgorithm {
public static int getDimensionForDevice(Context ctx, int phonePortResId, int phoneLandResId,
int tabletPortResId, int tabletLandResId, int xlargeTabletPortResId,
int xlargeTabletLandResId, int gridLayoutResId) {
- RecentsConfiguration config = Recents.getConfiguration();
+ RecentsConfiguration config = LegacyRecentsImpl.getConfiguration();
Resources res = ctx.getResources();
boolean isLandscape = Utilities.getAppConfiguration(ctx).orientation ==
Configuration.ORIENTATION_LANDSCAPE;
@@ -1211,7 +1213,7 @@ public class TaskStackLayoutAlgorithm {
if (mStackRect.isEmpty()) {
return;
}
- if (Recents.getConfiguration().isLowRamDevice) {
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
mTaskStackLowRamLayoutAlgorithm.getBackOfStackTransform(mBackOfStackTransform, this);
mTaskStackLowRamLayoutAlgorithm.getFrontOfStackTransform(mFrontOfStackTransform, this);
return;
@@ -1233,7 +1235,7 @@ public class TaskStackLayoutAlgorithm {
* Returns the proper task rectangle according to the current grid state.
*/
public Rect getTaskRect() {
- if (Recents.getConfiguration().isLowRamDevice) {
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
return mTaskStackLowRamLayoutAlgorithm.getTaskRect();
}
return useGridLayout() ? mTaskGridLayoutAlgorithm.getTaskGridRect() : mTaskRect;
@@ -1250,7 +1252,8 @@ public class TaskStackLayoutAlgorithm {
writer.print("insets="); writer.print(Utilities.dumpRect(mSystemInsets));
writer.print(" stack="); writer.print(Utilities.dumpRect(mStackRect));
writer.print(" task="); writer.print(Utilities.dumpRect(mTaskRect));
- writer.print(" actionButton="); writer.print(Utilities.dumpRect(mStackActionButtonRect));
+ writer.print(" actionButton="); writer.print(
+ Utilities.dumpRect(mStackActionButtonRect));
writer.println();
writer.print(innerPrefix);
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskStackView.java
similarity index 97%
rename from packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskStackView.java
index 89288d84aceb8..14fd149d22f42 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackView.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskStackView.java
@@ -26,7 +26,6 @@ import android.content.res.Configuration;
import android.content.res.Resources;
import android.graphics.Rect;
import android.os.Bundle;
-import android.provider.Settings;
import android.util.ArrayMap;
import android.util.ArraySet;
import android.util.MutableBoolean;
@@ -44,7 +43,7 @@ import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.systemui.Interpolators;
import com.android.systemui.R;
-import com.android.systemui.recents.Recents;
+import com.android.systemui.recents.LegacyRecentsImpl;
import com.android.systemui.recents.RecentsActivity;
import com.android.systemui.recents.RecentsActivityLaunchState;
import com.android.systemui.recents.RecentsConfiguration;
@@ -87,10 +86,10 @@ import com.android.systemui.recents.events.ui.focus.NavigateTaskViewEvent;
import com.android.systemui.recents.misc.DozeTrigger;
import com.android.systemui.recents.misc.ReferenceCountedTrigger;
import com.android.systemui.recents.misc.SystemServicesProxy;
-import com.android.systemui.shared.recents.utilities.AnimationProps;
-import com.android.systemui.shared.recents.utilities.Utilities;
+import com.android.systemui.recents.utilities.AnimationProps;
+import com.android.systemui.recents.utilities.Utilities;
import com.android.systemui.shared.recents.model.Task;
-import com.android.systemui.shared.recents.model.TaskStack;
+import com.android.systemui.recents.model.TaskStack;
import com.android.systemui.recents.views.grid.GridTaskView;
import com.android.systemui.recents.views.grid.TaskGridLayoutAlgorithm;
import com.android.systemui.recents.views.grid.TaskViewFocusFrame;
@@ -247,7 +246,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
public TaskStackView(Context context) {
super(context);
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
Resources res = context.getResources();
// Set the stack first
@@ -259,7 +258,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
mStackScroller = new TaskStackViewScroller(context, this, mLayoutAlgorithm);
mTouchHandler = new TaskStackViewTouchHandler(context, this, mStackScroller);
mAnimationHelper = new TaskStackAnimationHelper(context, this);
- mTaskCornerRadiusPx = Recents.getConfiguration().isGridEnabled ?
+ mTaskCornerRadiusPx = LegacyRecentsImpl.getConfiguration().isGridEnabled ?
res.getDimensionPixelSize(R.dimen.recents_grid_task_view_rounded_corners_radius) :
res.getDimensionPixelSize(R.dimen.recents_task_view_rounded_corners_radius);
mFastFlingVelocity = res.getDimensionPixelSize(R.dimen.recents_fast_fling_velocity);
@@ -269,7 +268,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
mStackActionButtonVisible = false;
// Create a frame to draw around the focused task view
- if (Recents.getConfiguration().isGridEnabled) {
+ if (LegacyRecentsImpl.getConfiguration().isGridEnabled) {
mTaskViewFocusFrame = new TaskViewFocusFrame(mContext, this,
mLayoutAlgorithm.mTaskGridLayoutAlgorithm);
addView(mTaskViewFocusFrame);
@@ -762,7 +761,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
*/
private void clipTaskViews() {
// We never clip task views in grid layout
- if (Recents.getConfiguration().isGridEnabled) {
+ if (LegacyRecentsImpl.getConfiguration().isGridEnabled) {
return;
}
@@ -816,7 +815,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
}
public void updateLayoutAlgorithm(boolean boundScrollToNewMinMax) {
- updateLayoutAlgorithm(boundScrollToNewMinMax, Recents.getConfiguration().getLaunchState());
+ updateLayoutAlgorithm(boundScrollToNewMinMax, LegacyRecentsImpl.getConfiguration().getLaunchState());
}
/**
@@ -1142,7 +1141,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
if (mStackScroller.computeScroll()) {
// Notify accessibility
sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_SCROLLED);
- Recents.getTaskLoader().getHighResThumbnailLoader().setFlingingFast(
+ LegacyRecentsImpl.getTaskLoader().getHighResThumbnailLoader().setFlingingFast(
mStackScroller.getScrollVelocity() > mFastFlingVelocity);
}
if (mDeferredTaskViewLayoutAnimation != null) {
@@ -1327,7 +1326,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
// Set the task focused state without requesting view focus, and leave the focus animations
// until after the enter-animation
- RecentsConfiguration config = Recents.getConfiguration();
+ RecentsConfiguration config = LegacyRecentsImpl.getConfiguration();
RecentsActivityLaunchState launchState = config.getLaunchState();
// We set the initial focused task view iff the following conditions are satisfied:
@@ -1474,7 +1473,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
@Override
public TaskView createView(Context context) {
- if (Recents.getConfiguration().isGridEnabled) {
+ if (LegacyRecentsImpl.getConfiguration().isGridEnabled) {
return (GridTaskView) mInflater.inflate(R.layout.recents_grid_task_view, this, false);
} else {
return (TaskView) mInflater.inflate(R.layout.recents_task_view, this, false);
@@ -1565,7 +1564,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
// If the doze trigger has already fired, then update the state for this task view
if (mUIDozeTrigger.isAsleep() ||
- useGridLayout() || Recents.getConfiguration().isLowRamDevice) {
+ useGridLayout() || LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
tv.setNoUserInteractionState();
}
@@ -1573,17 +1572,17 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
task.notifyTaskDataLoaded(task.thumbnail, task.icon);
} else {
// Load the task data
- Recents.getTaskLoader().loadTaskData(task);
+ LegacyRecentsImpl.getTaskLoader().loadTaskData(task);
}
- Recents.getTaskLoader().getHighResThumbnailLoader().onTaskVisible(task);
+ LegacyRecentsImpl.getTaskLoader().getHighResThumbnailLoader().onTaskVisible(task);
}
private void unbindTaskView(TaskView tv, Task task) {
if (task != mPrefetchingTask) {
// Report that this task's data is no longer being used
- Recents.getTaskLoader().unloadTaskData(task);
+ LegacyRecentsImpl.getTaskLoader().unloadTaskData(task);
}
- Recents.getTaskLoader().getHighResThumbnailLoader().onTaskInvisible(task);
+ LegacyRecentsImpl.getTaskLoader().getHighResThumbnailLoader().onTaskInvisible(task);
}
private void updatePrefetchingTask(ArrayList tasks, int frontIndex, int backIndex) {
@@ -1596,19 +1595,19 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
if (mPrefetchingTask != null) {
int index = tasks.indexOf(mPrefetchingTask);
if (index < backIndex || index > frontIndex) {
- Recents.getTaskLoader().unloadTaskData(mPrefetchingTask);
+ LegacyRecentsImpl.getTaskLoader().unloadTaskData(mPrefetchingTask);
}
}
mPrefetchingTask = t;
if (t != null) {
- Recents.getTaskLoader().loadTaskData(t);
+ LegacyRecentsImpl.getTaskLoader().loadTaskData(t);
}
}
}
private void clearPrefetchingTask() {
if (mPrefetchingTask != null) {
- Recents.getTaskLoader().unloadTaskData(mPrefetchingTask);
+ LegacyRecentsImpl.getTaskLoader().unloadTaskData(mPrefetchingTask);
}
mPrefetchingTask = null;
}
@@ -1644,7 +1643,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
// In grid layout, the stack action button always remains visible.
if (mEnterAnimationComplete && !useGridLayout()) {
- if (Recents.getConfiguration().isLowRamDevice) {
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
// Show stack button when user drags down to show older tasks on low ram devices
if (mStack.getTaskCount() > 0 && !mStackActionButtonVisible
&& mTouchHandler.mIsScrolling && curScroll - prevScroll < 0) {
@@ -1727,7 +1726,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
return;
}
- if (!Recents.getConfiguration().getLaunchState().launchedFromPipApp
+ if (!LegacyRecentsImpl.getConfiguration().getLaunchState().launchedFromPipApp
&& mStack.isNextLaunchTargetPip(RecentsImpl.getLastPipTime())) {
// If the launch task is in the pinned stack, then expand the PiP now
EventBus.getDefault().send(new ExpandPipEvent());
@@ -1831,7 +1830,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
// Remove the task from the stack
mStack.removeTask(event.task, event.animation, false /* fromDockGesture */);
EventBus.getDefault().send(new DeleteTaskDataEvent(event.task));
- if (mStack.getTaskCount() > 0 && Recents.getConfiguration().isLowRamDevice) {
+ if (mStack.getTaskCount() > 0 && LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
EventBus.getDefault().send(new ShowStackActionButtonEvent(false /* translate */));
}
@@ -1878,7 +1877,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
// Poke the doze trigger on user interaction
mUIDozeTrigger.poke();
- RecentsDebugFlags debugFlags = Recents.getDebugFlags();
+ RecentsDebugFlags debugFlags = LegacyRecentsImpl.getDebugFlags();
if (mFocusedTask != null) {
TaskView tv = getChildViewForTask(mFocusedTask);
if (tv != null) {
@@ -2002,7 +2001,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
// animate the focused state if we are alt-tabbing now, after the window enter
// animation is completed
if (mFocusedTask != null) {
- RecentsConfiguration config = Recents.getConfiguration();
+ RecentsConfiguration config = LegacyRecentsImpl.getConfiguration();
RecentsActivityLaunchState launchState = config.getLaunchState();
setFocusedTask(mStack.indexOfTask(mFocusedTask),
false /* scrollToTask */, launchState.launchedWithAltTab);
@@ -2023,7 +2022,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
setTasks(event.stack, true /* allowNotifyStackChanges */);
} else {
// Reset the launch state before handling the multiwindow change
- RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
+ RecentsActivityLaunchState launchState = LegacyRecentsImpl.getConfiguration().getLaunchState();
launchState.reset();
// Defer until the next frame to ensure that we have received all the system insets, and
@@ -2044,7 +2043,7 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
public final void onBusEvent(ConfigurationChangedEvent event) {
if (event.fromDeviceOrientationChange) {
mDisplayOrientation = Utilities.getAppConfiguration(mContext).orientation;
- mDisplayRect = Recents.getSystemServices().getDisplayRect();
+ mDisplayRect = LegacyRecentsImpl.getSystemServices().getDisplayRect();
// Always stop the scroller, otherwise, we may continue setting the stack scroll to the
// wrong bounds in the new layout
@@ -2186,14 +2185,14 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
* Reads current system flags related to accessibility and screen pinning.
*/
private void readSystemFlags() {
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
mTouchExplorationEnabled = ssp.isTouchExplorationEnabled();
mScreenPinningEnabled = ActivityManagerWrapper.getInstance().isScreenPinningEnabled()
&& !ActivityManagerWrapper.getInstance().isLockToAppActive();
}
private void updateStackActionButtonVisibility() {
- if (Recents.getConfiguration().isLowRamDevice) {
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
return;
}
@@ -2260,9 +2259,12 @@ public class TaskStackView extends FrameLayout implements TaskStack.TaskStackCal
writer.print(" screenPinningOn="); writer.print(mScreenPinningEnabled ? "Y" : "N");
writer.print(" numIgnoreTasks="); writer.print(mIgnoreTasks.size());
writer.print(" numViewPool="); writer.print(mViewPool.getViews().size());
- writer.print(" stableStackBounds="); writer.print(Utilities.dumpRect(mStableStackBounds));
- writer.print(" stackBounds="); writer.print(Utilities.dumpRect(mStackBounds));
- writer.print(" stableWindow="); writer.print(Utilities.dumpRect(mStableWindowRect));
+ writer.print(" stableStackBounds="); writer.print(
+ Utilities.dumpRect(mStableStackBounds));
+ writer.print(" stackBounds="); writer.print(
+ Utilities.dumpRect(mStackBounds));
+ writer.print(" stableWindow="); writer.print(
+ Utilities.dumpRect(mStableWindowRect));
writer.print(" window="); writer.print(Utilities.dumpRect(mWindowRect));
writer.print(" display="); writer.print(Utilities.dumpRect(mDisplayRect));
writer.print(" orientation="); writer.print(mDisplayOrientation);
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewScroller.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskStackViewScroller.java
similarity index 97%
rename from packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewScroller.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskStackViewScroller.java
index 6b23977410c78..42efe59da54c3 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewScroller.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskStackViewScroller.java
@@ -31,9 +31,9 @@ import android.widget.OverScroller;
import com.android.systemui.Interpolators;
import com.android.systemui.R;
-import com.android.systemui.recents.Recents;
-import com.android.systemui.shared.recents.utilities.AnimationProps;
-import com.android.systemui.shared.recents.utilities.Utilities;
+import com.android.systemui.recents.LegacyRecentsImpl;
+import com.android.systemui.recents.utilities.AnimationProps;
+import com.android.systemui.recents.utilities.Utilities;
import com.android.systemui.recents.views.lowram.TaskStackLowRamLayoutAlgorithm;
import com.android.systemui.statusbar.FlingAnimationUtils;
@@ -89,7 +89,7 @@ public class TaskStackViewScroller {
mContext = context;
mCb = cb;
mScroller = new OverScroller(context);
- if (Recents.getConfiguration().isLowRamDevice) {
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
mScroller.setFriction(0.06f);
}
mLayoutAlgorithm = layoutAlgorithm;
@@ -206,7 +206,7 @@ public class TaskStackViewScroller {
float stackScroll = getStackScroll();
// Skip if not in low ram layout and if the scroll is out of min and max bounds
- if (!Recents.getConfiguration().isLowRamDevice || stackScroll < mLayoutAlgorithm.mMinScrollP
+ if (!LegacyRecentsImpl.getConfiguration().isLowRamDevice || stackScroll < mLayoutAlgorithm.mMinScrollP
|| stackScroll > mLayoutAlgorithm.mMaxScrollP) {
return;
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java
similarity index 97%
rename from packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java
index c91cdfc379c4b..dd6926c848b4f 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskStackViewTouchHandler.java
@@ -38,14 +38,14 @@ import com.android.systemui.Interpolators;
import com.android.systemui.R;
import com.android.systemui.SwipeHelper;
import com.android.systemui.recents.Constants;
-import com.android.systemui.recents.Recents;
+import com.android.systemui.recents.LegacyRecentsImpl;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.activity.HideRecentsEvent;
import com.android.systemui.recents.events.ui.StackViewScrolledEvent;
import com.android.systemui.recents.events.ui.TaskViewDismissedEvent;
import com.android.systemui.recents.misc.FreePathInterpolator;
-import com.android.systemui.shared.recents.utilities.AnimationProps;
-import com.android.systemui.shared.recents.utilities.Utilities;
+import com.android.systemui.recents.utilities.AnimationProps;
+import com.android.systemui.recents.utilities.Utilities;
import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.statusbar.FlingAnimationUtils;
@@ -296,7 +296,7 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
if (curScrollP < minScrollP || curScrollP > maxScrollP) {
float clampedScrollP = Utilities.clamp(curScrollP, minScrollP, maxScrollP);
float overscrollP = (curScrollP - clampedScrollP);
- float maxOverscroll = Recents.getConfiguration().isLowRamDevice
+ float maxOverscroll = LegacyRecentsImpl.getConfiguration().isLowRamDevice
? layoutAlgorithm.mTaskStackLowRamLayoutAlgorithm.getMaxOverscroll()
: MAX_OVERSCROLL;
float overscrollX = Math.abs(overscrollP) / maxOverscroll;
@@ -339,7 +339,7 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
if (mScroller.isScrollOutOfBounds()) {
mScroller.animateBoundScroll();
} else if (Math.abs(velocity) > mMinimumVelocity &&
- !Recents.getConfiguration().isLowRamDevice) {
+ !LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
float minY = mDownY + layoutAlgorithm.getYForDeltaP(mDownScrollP,
layoutAlgorithm.mMaxScrollP);
float maxY = mDownY + layoutAlgorithm.getYForDeltaP(mDownScrollP,
@@ -352,7 +352,7 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
// Reset the focused task after the user has scrolled, but we have no scrolling
// in grid layout and therefore we don't want to reset the focus there.
if (!mSv.mTouchExplorationEnabled && !mSv.useGridLayout()) {
- if (Recents.getConfiguration().isLowRamDevice) {
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
mScroller.scrollToClosestTask(velocity);
} else {
mSv.resetFocusedTask(mSv.getFocusedTask());
@@ -493,7 +493,7 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
float prevAnchorTaskScroll = 0;
boolean pullStackForward = mCurrentTasks.size() > 0;
if (pullStackForward) {
- if (Recents.getConfiguration().isLowRamDevice) {
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
float index = layoutAlgorithm.getStackScrollForTask(anchorTask);
prevAnchorTaskScroll = mSv.getStackAlgorithm().mTaskStackLowRamLayoutAlgorithm
.getScrollPForTask((int) index);
@@ -513,14 +513,14 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
// Otherwise, offset the scroll by the movement of the anchor task
float anchorTaskScroll =
layoutAlgorithm.getStackScrollForTaskIgnoreOverrides(anchorTask);
- if (Recents.getConfiguration().isLowRamDevice) {
+ if (LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
float index = layoutAlgorithm.getStackScrollForTask(anchorTask);
anchorTaskScroll = mSv.getStackAlgorithm().mTaskStackLowRamLayoutAlgorithm
.getScrollPForTask((int) index);
}
float stackScrollOffset = (anchorTaskScroll - prevAnchorTaskScroll);
if (layoutAlgorithm.getFocusState() != TaskStackLayoutAlgorithm.STATE_FOCUSED
- && !Recents.getConfiguration().isLowRamDevice) {
+ && !LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
// If we are focused, we don't want the front task to move, but otherwise, we
// allow the back task to move up, and the front task to move back
stackScrollOffset *= 0.75f;
@@ -554,7 +554,7 @@ class TaskStackViewTouchHandler implements SwipeHelper.Callback {
// Only update the swipe progress for the surrounding tasks if the dismiss animation was not
// preempted from a call to cancelNonDismissTaskAnimations
if ((mActiveTaskView == v || mSwipeHelperAnimations.containsKey(v)) &&
- !Recents.getConfiguration().isLowRamDevice) {
+ !LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
updateTaskViewTransforms(
Interpolators.FAST_OUT_SLOW_IN.getInterpolation(swipeProgress));
}
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskView.java
similarity index 97%
rename from packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskView.java
index f0278a69e1163..ab0bf9570ffd8 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskView.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskView.java
@@ -39,7 +39,7 @@ import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.systemui.Interpolators;
import com.android.systemui.R;
-import com.android.systemui.recents.Recents;
+import com.android.systemui.recents.LegacyRecentsImpl;
import com.android.systemui.recents.RecentsActivity;
import com.android.systemui.recents.RecentsConfiguration;
import com.android.systemui.recents.events.EventBus;
@@ -51,11 +51,10 @@ import com.android.systemui.recents.events.ui.dragndrop.DragEndEvent;
import com.android.systemui.recents.events.ui.dragndrop.DragStartEvent;
import com.android.systemui.recents.misc.ReferenceCountedTrigger;
import com.android.systemui.recents.misc.SystemServicesProxy;
-import com.android.systemui.shared.recents.utilities.AnimationProps;
-import com.android.systemui.shared.recents.utilities.Utilities;
+import com.android.systemui.recents.utilities.AnimationProps;
+import com.android.systemui.recents.utilities.Utilities;
import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.recents.model.ThumbnailData;
-import com.android.systemui.shared.recents.view.AnimateableViewBounds;
import java.io.PrintWriter;
import java.util.ArrayList;
@@ -175,7 +174,7 @@ public class TaskView extends FixedSizeFrameLayout implements Task.TaskCallbacks
public TaskView(Context context, AttributeSet attrs, int defStyleAttr, int defStyleRes) {
super(context, attrs, defStyleAttr, defStyleRes);
- RecentsConfiguration config = Recents.getConfiguration();
+ RecentsConfiguration config = LegacyRecentsImpl.getConfiguration();
Resources res = context.getResources();
mViewBounds = createOutlineProvider();
if (config.fakeShadows) {
@@ -283,7 +282,7 @@ public class TaskView extends FixedSizeFrameLayout implements Task.TaskCallbacks
void updateViewPropertiesToTaskTransform(TaskViewTransform toTransform,
AnimationProps toAnimation, ValueAnimator.AnimatorUpdateListener updateCallback) {
- RecentsConfiguration config = Recents.getConfiguration();
+ RecentsConfiguration config = LegacyRecentsImpl.getConfiguration();
cancelTransformAnimation();
// Compose the animations for the transform
@@ -412,7 +411,7 @@ public class TaskView extends FixedSizeFrameLayout implements Task.TaskCallbacks
* view.
*/
boolean shouldClipViewInStack() {
- if (getVisibility() != View.VISIBLE || Recents.getConfiguration().isLowRamDevice) {
+ if (getVisibility() != View.VISIBLE || LegacyRecentsImpl.getConfiguration().isLowRamDevice) {
return false;
}
return mClipViewInStack;
@@ -601,7 +600,7 @@ public class TaskView extends FixedSizeFrameLayout implements Task.TaskCallbacks
public void onTaskBound(Task t, boolean touchExplorationEnabled, int displayOrientation,
Rect displayRect) {
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
mTouchExplorationEnabled = touchExplorationEnabled;
mTask = t;
mTaskBound = true;
@@ -679,10 +678,10 @@ public class TaskView extends FixedSizeFrameLayout implements Task.TaskCallbacks
@Override
public boolean onLongClick(View v) {
- if (!Recents.getConfiguration().dragToSplitEnabled) {
+ if (!LegacyRecentsImpl.getConfiguration().dragToSplitEnabled) {
return false;
}
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
boolean inBounds = false;
Rect clipBounds = new Rect(mViewBounds.getClipBounds());
if (!clipBounds.isEmpty()) {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewAccessibilityDelegate.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskViewAccessibilityDelegate.java
similarity index 95%
rename from packages/SystemUI/src/com/android/systemui/recents/views/TaskViewAccessibilityDelegate.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskViewAccessibilityDelegate.java
index 5bb5b2da32b40..7bcad75cefcfe 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewAccessibilityDelegate.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskViewAccessibilityDelegate.java
@@ -25,7 +25,7 @@ import android.view.View;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.accessibility.AccessibilityNodeInfo.AccessibilityAction;
import com.android.systemui.R;
-import com.android.systemui.recents.Recents;
+import com.android.systemui.recents.LegacyRecentsImpl;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.ui.dragndrop.DragEndEvent;
import com.android.systemui.recents.events.ui.dragndrop.DragStartEvent;
@@ -56,8 +56,8 @@ public class TaskViewAccessibilityDelegate extends View.AccessibilityDelegate {
public void onInitializeAccessibilityNodeInfo(View host, AccessibilityNodeInfo info) {
super.onInitializeAccessibilityNodeInfo(host, info);
if (ActivityTaskManager.supportsSplitScreenMultiWindow(mTaskView.getContext())
- && !Recents.getSystemServices().hasDockedTask()) {
- DockState[] dockStates = Recents.getConfiguration()
+ && !LegacyRecentsImpl.getSystemServices().hasDockedTask()) {
+ DockState[] dockStates = LegacyRecentsImpl.getConfiguration()
.getDockStatesForCurrentOrientation();
for (DockState dockState: dockStates) {
if (dockState == DockState.TOP) {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskViewHeader.java
similarity index 98%
rename from packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskViewHeader.java
index de4291446e7cb..21c0234121c43 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewHeader.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskViewHeader.java
@@ -53,14 +53,14 @@ import com.android.internal.logging.MetricsLogger;
import com.android.systemui.Interpolators;
import com.android.systemui.R;
import com.android.systemui.recents.Constants;
-import com.android.systemui.recents.Recents;
+import com.android.systemui.recents.LegacyRecentsImpl;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.activity.LaunchTaskEvent;
import com.android.systemui.recents.events.ui.ShowApplicationInfoEvent;
import com.android.systemui.recents.misc.SystemServicesProxy;
import com.android.systemui.shared.system.ActivityManagerWrapper;
import com.android.systemui.shared.system.PackageManagerWrapper;
-import com.android.systemui.shared.recents.utilities.Utilities;
+import com.android.systemui.recents.utilities.Utilities;
import com.android.systemui.shared.recents.model.Task;
/* The task bar view */
@@ -212,7 +212,7 @@ public class TaskViewHeader extends FrameLayout
Resources res = context.getResources();
mLightDismissDrawable = context.getDrawable(R.drawable.recents_dismiss_light);
mDarkDismissDrawable = context.getDrawable(R.drawable.recents_dismiss_dark);
- mCornerRadius = Recents.getConfiguration().isGridEnabled ?
+ mCornerRadius = LegacyRecentsImpl.getConfiguration().isGridEnabled ?
res.getDimensionPixelSize(R.dimen.recents_grid_task_view_rounded_corners_radius) :
res.getDimensionPixelSize(R.dimen.recents_task_view_rounded_corners_radius);
mHighlightHeight = res.getDimensionPixelSize(R.dimen.recents_task_view_highlight);
@@ -246,7 +246,7 @@ public class TaskViewHeader extends FrameLayout
@Override
protected void onFinishInflate() {
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
// Initialize the icon and description views
mIconView = findViewById(R.id.icon);
@@ -605,7 +605,7 @@ public class TaskViewHeader extends FrameLayout
*/
private void showAppOverlay() {
// Skip early if the task is invalid
- SystemServicesProxy ssp = Recents.getSystemServices();
+ SystemServicesProxy ssp = LegacyRecentsImpl.getSystemServices();
ComponentName cn = mTask.key.getComponent();
int userId = mTask.key.userId;
ActivityInfo activityInfo = PackageManagerWrapper.getInstance().getActivityInfo(cn, userId);
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskViewThumbnail.java
similarity index 99%
rename from packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskViewThumbnail.java
index 4152b05a960ed..68f85a50a9d6a 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewThumbnail.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskViewThumbnail.java
@@ -37,7 +37,7 @@ import android.view.ViewDebug;
import com.android.systemui.R;
import com.android.systemui.recents.events.EventBus;
import com.android.systemui.recents.events.ui.TaskSnapshotChangedEvent;
-import com.android.systemui.shared.recents.utilities.Utilities;
+import com.android.systemui.recents.utilities.Utilities;
import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.recents.model.ThumbnailData;
import java.io.PrintWriter;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewTransform.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskViewTransform.java
similarity index 98%
rename from packages/SystemUI/src/com/android/systemui/recents/views/TaskViewTransform.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskViewTransform.java
index 9b717e0e5e2f6..48a733663fad8 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/TaskViewTransform.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/TaskViewTransform.java
@@ -24,8 +24,8 @@ import android.graphics.RectF;
import android.util.Property;
import android.view.View;
-import com.android.systemui.shared.recents.utilities.AnimationProps;
-import com.android.systemui.shared.recents.utilities.Utilities;
+import com.android.systemui.recents.utilities.AnimationProps;
+import com.android.systemui.recents.utilities.Utilities;
import java.util.ArrayList;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/ViewPool.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/ViewPool.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/views/ViewPool.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/ViewPool.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/grid/AnimateableGridViewBounds.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/grid/AnimateableGridViewBounds.java
similarity index 93%
rename from packages/SystemUI/src/com/android/systemui/recents/views/grid/AnimateableGridViewBounds.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/grid/AnimateableGridViewBounds.java
index 3bdad314d7f3b..a029478c20459 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/grid/AnimateableGridViewBounds.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/grid/AnimateableGridViewBounds.java
@@ -17,7 +17,7 @@
package com.android.systemui.recents.views.grid;
import android.view.View;
-import com.android.systemui.shared.recents.view.AnimateableViewBounds;
+import com.android.systemui.recents.views.AnimateableViewBounds;
/* An outline provider for grid-based task views. */
class AnimateableGridViewBounds extends AnimateableViewBounds {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/grid/GridTaskView.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/grid/GridTaskView.java
similarity index 97%
rename from packages/SystemUI/src/com/android/systemui/recents/views/grid/GridTaskView.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/grid/GridTaskView.java
index 0d5115444b019..8b4700c54b002 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/grid/GridTaskView.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/grid/GridTaskView.java
@@ -19,7 +19,7 @@ package com.android.systemui.recents.views.grid;
import android.content.Context;
import android.util.AttributeSet;
import com.android.systemui.R;
-import com.android.systemui.shared.recents.view.AnimateableViewBounds;
+import com.android.systemui.recents.views.AnimateableViewBounds;
import com.android.systemui.recents.views.TaskView;
public class GridTaskView extends TaskView {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/grid/GridTaskViewThumbnail.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/grid/GridTaskViewThumbnail.java
similarity index 100%
rename from packages/SystemUI/src/com/android/systemui/recents/views/grid/GridTaskViewThumbnail.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/grid/GridTaskViewThumbnail.java
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/grid/TaskGridLayoutAlgorithm.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/grid/TaskGridLayoutAlgorithm.java
similarity index 99%
rename from packages/SystemUI/src/com/android/systemui/recents/views/grid/TaskGridLayoutAlgorithm.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/grid/TaskGridLayoutAlgorithm.java
index ccda4b5aaf1fa..719eaa71f7889 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/grid/TaskGridLayoutAlgorithm.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/grid/TaskGridLayoutAlgorithm.java
@@ -26,7 +26,7 @@ import android.view.WindowManager;
import com.android.systemui.R;
import com.android.systemui.recents.events.ui.focus.NavigateTaskViewEvent.Direction;
-import com.android.systemui.shared.recents.utilities.Utilities;
+import com.android.systemui.recents.utilities.Utilities;
import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.recents.views.TaskStackLayoutAlgorithm;
import com.android.systemui.recents.views.TaskViewTransform;
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/grid/TaskViewFocusFrame.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/grid/TaskViewFocusFrame.java
similarity index 98%
rename from packages/SystemUI/src/com/android/systemui/recents/views/grid/TaskViewFocusFrame.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/grid/TaskViewFocusFrame.java
index fe6bafb27c7c6..1655f6c83c535 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/grid/TaskViewFocusFrame.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/grid/TaskViewFocusFrame.java
@@ -23,7 +23,7 @@ import android.view.View;
import android.view.ViewTreeObserver.OnGlobalFocusChangeListener;
import com.android.systemui.R;
-import com.android.systemui.shared.recents.model.TaskStack;
+import com.android.systemui.recents.model.TaskStack;
import com.android.systemui.recents.views.TaskStackView;
public class TaskViewFocusFrame extends View implements OnGlobalFocusChangeListener {
diff --git a/packages/SystemUI/src/com/android/systemui/recents/views/lowram/TaskStackLowRamLayoutAlgorithm.java b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/lowram/TaskStackLowRamLayoutAlgorithm.java
similarity index 97%
rename from packages/SystemUI/src/com/android/systemui/recents/views/lowram/TaskStackLowRamLayoutAlgorithm.java
rename to packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/lowram/TaskStackLowRamLayoutAlgorithm.java
index 49cac269f51db..15c7c87366d26 100644
--- a/packages/SystemUI/src/com/android/systemui/recents/views/lowram/TaskStackLowRamLayoutAlgorithm.java
+++ b/packages/SystemUI/legacy/recents/src/com/android/systemui/recents/views/lowram/TaskStackLowRamLayoutAlgorithm.java
@@ -21,9 +21,9 @@ import android.graphics.Rect;
import android.view.ViewConfiguration;
import com.android.systemui.R;
-import com.android.systemui.recents.Recents;
+import com.android.systemui.recents.LegacyRecentsImpl;
import com.android.systemui.recents.RecentsActivityLaunchState;
-import com.android.systemui.shared.recents.utilities.Utilities;
+import com.android.systemui.recents.utilities.Utilities;
import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.recents.views.TaskStackLayoutAlgorithm;
import com.android.systemui.recents.views.TaskViewTransform;
@@ -82,7 +82,7 @@ public class TaskStackLowRamLayoutAlgorithm {
}
public VisibilityReport computeStackVisibilityReport(ArrayList tasks) {
- RecentsActivityLaunchState launchState = Recents.getConfiguration().getLaunchState();
+ RecentsActivityLaunchState launchState = LegacyRecentsImpl.getConfiguration().getLaunchState();
int maxVisible = launchState.launchedFromHome || launchState.launchedFromPipApp
|| launchState.launchedWithNextPipApp
? NUM_TASK_VISIBLE_LAUNCHED_FROM_HOME
diff --git a/packages/SystemUI/proguard.flags b/packages/SystemUI/proguard.flags
index fa4c8b51dc45a..ee94aedfe3993 100644
--- a/packages/SystemUI/proguard.flags
+++ b/packages/SystemUI/proguard.flags
@@ -10,6 +10,7 @@
public void setGlowScale(float);
}
+-keep class com.android.systemui.recents.OverviewProxyRecentsImpl
-keep class com.android.systemui.statusbar.car.CarStatusBar
-keep class com.android.systemui.statusbar.phone.StatusBar
-keep class com.android.systemui.statusbar.tv.TvStatusBar
@@ -17,21 +18,6 @@
-keep class com.android.systemui.SystemUIFactory
-keep class * extends com.android.systemui.SystemUI
--keepclassmembers class ** {
- public void onBusEvent(**);
- public void onInterprocessBusEvent(**);
-}
--keepclassmembers class ** extends **.EventBus$InterprocessEvent {
- public (android.os.Bundle);
-}
-
--keep class com.android.systemui.recents.views.TaskView {
- public int getDim();
- public void setDim(int);
- public float getTaskProgress();
- public void setTaskProgress(float);
-}
-
-keepclasseswithmembers class * {
public (android.content.Context, android.util.AttributeSet);
}
diff --git a/packages/SystemUI/res/layout/status_bar_no_recent_apps.xml b/packages/SystemUI/res/layout/status_bar_no_recent_apps.xml
deleted file mode 100644
index adfaed13e0a13..0000000000000
--- a/packages/SystemUI/res/layout/status_bar_no_recent_apps.xml
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
-
-
-
-
diff --git a/packages/SystemUI/res/values-sw600dp/dimens.xml b/packages/SystemUI/res/values-sw600dp/dimens.xml
index eb5c180aa7544..89341838f3e36 100644
--- a/packages/SystemUI/res/values-sw600dp/dimens.xml
+++ b/packages/SystemUI/res/values-sw600dp/dimens.xml
@@ -88,7 +88,4 @@
488dp
-
-
- 192dp
diff --git a/packages/SystemUI/res/values/attrs.xml b/packages/SystemUI/res/values/attrs.xml
index f50ef8261add5..baaf9d6c1260f 100644
--- a/packages/SystemUI/res/values/attrs.xml
+++ b/packages/SystemUI/res/values/attrs.xml
@@ -30,12 +30,6 @@
-
-
-
-
-
-
diff --git a/packages/SystemUI/res/values/colors.xml b/packages/SystemUI/res/values/colors.xml
index d1320a34f3654..0027cc606badd 100644
--- a/packages/SystemUI/res/values/colors.xml
+++ b/packages/SystemUI/res/values/colors.xml
@@ -39,32 +39,6 @@
#ff686868
-
- #ff676767
-
- #ffe6e6e6
-
- #fff3f3f3
-
- #ffeeeeee
-
- #cc000000
-
- #ccffffff
-
- #99000000
-
- #ffe6e6e6
-
- #ff666666
-
- #33FFFFFF
-
-
- #CCFFFFFF
-
- #CC000000
-
#ffffffff
@@ -110,12 +84,6 @@
#30000000
-
- #44000000
-
-
- #03000000
-
#80000000
#14FFFFFF
diff --git a/packages/SystemUI/res/values/config.xml b/packages/SystemUI/res/values/config.xml
index 6378309061247..b31dc50be5d17 100644
--- a/packages/SystemUI/res/values/config.xml
+++ b/packages/SystemUI/res/values/config.xml
@@ -20,19 +20,6 @@
-
- false
-
-
- 10
-
-
- 20
-
-
- false
-
true
@@ -45,6 +32,11 @@
interface. This name is in the ComponentName flattened format (package/class) -->
com.android.systemui.statusbar.phone.StatusBar
+
+ com.android.systemui.recents.OverviewProxyRecentsImpl
+
false
@@ -163,30 +155,6 @@
6000
-
- 1000
-
-
- 200
-
-
- 125
-
-
- 125
-
-
- 400
-
-
- 200
-
-
- 200
-
-
- 0
-
true
@@ -194,16 +162,6 @@
250
-
- - -3
- - 2
-
-
- - -2
- - 2.5
-
true
@@ -362,7 +320,6 @@
- com.android.systemui.Dependency
- com.android.systemui.util.NotificationChannels
- - com.android.systemui.recents.Recents
diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml
index ab7dec9bbb4dc..9fe771868568d 100644
--- a/packages/SystemUI/res/values/dimens.xml
+++ b/packages/SystemUI/res/values/dimens.xml
@@ -793,102 +793,11 @@
4dp
4dp
-
-
-
- 16dp
- 16dp
- 32dp
- 40dp
- 16dp
- 16dp
- 48dp
- 16dp
- 64dp
- 16dp
-
-
- 48dp
-
- 56dp
-
-
- 128dp
- 80dp
- 72dp
- 72dp
- 160dp
- 112dp
-
-
- 3dp
- 24dp
-
-
- 16dp
-
-
- 8dp
-
-
-
-
- 56dp
- 64dp
-
-
- 16dp
- 20dp
-
-
- 2dp
- 6dp
-
-
- 1dp
-
-
- 56dp
- 28dp
-
-
- 24dp
-
-
- 14sp
-
2dp
8dp
-
- - 0.6
-
-
- 32dp
-
-
- 144dp
-
-
- 100dp
-
-
- - 0.5
-
-
- 600dp
-
176dp
diff --git a/packages/SystemUI/res/values/strings.xml b/packages/SystemUI/res/values/strings.xml
index 42e19aace0c3f..b92fcc6c1d312 100644
--- a/packages/SystemUI/res/values/strings.xml
+++ b/packages/SystemUI/res/values/strings.xml
@@ -24,26 +24,6 @@
all of the currently visible notifications. [CHAR LIMIT=10]-->
Clear
-
- Remove from list
-
-
- App info
-
-
- Your recent screens appear here
-
-
- Dismiss recent apps
-
-
-
- - 1 screen in Overview
- - %d screens in Overview
-
-
No notifications
@@ -252,8 +232,6 @@
open voice assist
open camera
-
- Select new task layout
Cancel
@@ -477,16 +455,6 @@
@string/quick_settings_work_mode_label
-
- Dismiss %s.
-
- %s dismissed.
-
- All recent applications dismissed.
-
- Open %s application info.
-
- Starting %s.
Notification dismissed.
@@ -836,42 +804,10 @@
NFC is enabled
-
- No recent items
-
- You\'ve cleared everything
-
- Application Info
-
- screen pinning
-
- search
-
- Could not start %s.
-
- %s is disabled in safe-mode.
-
- Clear all
-
- Drag here to use split screen
Swipe up to switch apps
Drag right to quickly switch apps
-
-
- Split Horizontal
-
- Split Vertical
-
- Split Custom
-
- Split screen to the top
-
- Split screen to the left
-
- Split screen to the right
-
Toggle Overview
diff --git a/packages/SystemUI/res/values/styles.xml b/packages/SystemUI/res/values/styles.xml
index 6446367e19a5e..6bc2a6352e3db 100644
--- a/packages/SystemUI/res/values/styles.xml
+++ b/packages/SystemUI/res/values/styles.xml
@@ -16,35 +16,6 @@
-
-
-
-
-
-
-
-
-
-
-
-