Split home stack into home and recents stack

Refactored functionality of home stack (HOME_STACK_ID) in the code
base to home stack and recents stack (RECENTS_STACK_ID). Also changed
function and variable names from homeStack to homeOrRecentsStack.

Differentiating home and recents stack will allow readablilty and
managing logic between home and recents stacks. For example, for
multi-window minimized dock state, the home and recents stacks can
be set to different rects where the home stack needs to be a fixed
large size while the recents stack is hidden and the dock stack is
animating to be minimized.

Fixes: 32839371
Test: ./run-test android.server.cts and manually tested split and
rotation
Change-Id: I7603359c2dc20e35924664178634eb761e0367a6
diff --git a/services/core/java/com/android/server/am/RecentTasks.java b/services/core/java/com/android/server/am/RecentTasks.java
index bc9bda2f..6a13d36 100644
--- a/services/core/java/com/android/server/am/RecentTasks.java
+++ b/services/core/java/com/android/server/am/RecentTasks.java
@@ -130,8 +130,8 @@
 
     void notifyTaskPersisterLocked(TaskRecord task, boolean flush) {
         final ActivityStack stack = task != null ? task.getStack() : null;
-        if (stack != null && stack.isHomeStack()) {
-            // Never persist the home stack.
+        if (stack != null && stack.isHomeOrRecentsStack()) {
+            // Never persist the home or recents stack.
             return;
         }
         syncPersistentTaskIdsLocked();
@@ -150,7 +150,7 @@
         for (int i = size() - 1; i >= 0; i--) {
             final TaskRecord task = get(i);
             final ActivityStack stack = task.getStack();
-            if (task.isPersistable && (stack == null || !stack.isHomeStack())) {
+            if (task.isPersistable && (stack == null || !stack.isHomeOrRecentsStack())) {
                 // Set of persisted taskIds for task.userId should not be null here
                 // TODO Investigate why it can happen. For now initialize with an empty set
                 if (mPersistedTaskIds.get(task.userId) == null) {