Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fadda8f3 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge changes I3f60ce50,I44d494a5,If17586cd,I26730461

* changes:
  4/Clean up use of hidden recent task flags
  3/Removing unnecessary filtering logic for recent tasks in SystemUI
  2/Trimming tasks based on active and visibility
  1/Clean up RecentTasks list
parents 1a1cee72 5fa39753
Loading
Loading
Loading
Loading
+1 −61
Original line number Diff line number Diff line
@@ -16,13 +16,6 @@

package android.app;

import static android.app.WindowConfiguration.WINDOWING_MODE_FREEFORM;
import static android.app.WindowConfiguration.WINDOWING_MODE_FULLSCREEN;
import static android.app.WindowConfiguration.WINDOWING_MODE_PINNED;
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_PRIMARY;
import static android.app.WindowConfiguration.WINDOWING_MODE_SPLIT_SCREEN_SECONDARY;
import static android.app.WindowConfiguration.WINDOWING_MODE_UNDEFINED;

import android.Manifest;
import android.annotation.IntDef;
import android.annotation.NonNull;
@@ -1439,7 +1432,6 @@ public class ActivityManager {
            }
            dest.writeInt(stackId);
            dest.writeInt(userId);
            dest.writeLong(firstActiveTime);
            dest.writeLong(lastActiveTime);
            dest.writeInt(affiliatedTaskId);
            dest.writeInt(affiliatedTaskColor);
@@ -1468,7 +1460,6 @@ public class ActivityManager {
                    TaskDescription.CREATOR.createFromParcel(source) : null;
            stackId = source.readInt();
            userId = source.readInt();
            firstActiveTime = source.readLong();
            lastActiveTime = source.readLong();
            affiliatedTaskId = source.readInt();
            affiliatedTaskColor = source.readInt();
@@ -1510,31 +1501,6 @@ public class ActivityManager {
     */
    public static final int RECENT_IGNORE_UNAVAILABLE = 0x0002;

    /**
     * Provides a list that contains recent tasks for all
     * profiles of a user.
     * @hide
     */
    public static final int RECENT_INCLUDE_PROFILES = 0x0004;

    /**
     * Ignores all tasks that are on the home stack.
     * @hide
     */
    public static final int RECENT_IGNORE_HOME_AND_RECENTS_STACK_TASKS = 0x0008;

    /**
     * Ignores the top task in the docked stack.
     * @hide
     */
    public static final int RECENT_INGORE_DOCKED_STACK_TOP_TASK = 0x0010;

    /**
     * Ignores all tasks that are on the pinned stack.
     * @hide
     */
    public static final int RECENT_INGORE_PINNED_STACK_TASKS = 0x0020;

    /**
     * <p></p>Return a list of the tasks that the user has recently launched, with
     * the most recent being first and older ones after in order.
@@ -1570,33 +1536,7 @@ public class ActivityManager {
    public List<RecentTaskInfo> getRecentTasks(int maxNum, int flags)
            throws SecurityException {
        try {
            return getService().getRecentTasks(maxNum,
                    flags, UserHandle.myUserId()).getList();
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
    }

    /**
     * Same as {@link #getRecentTasks(int, int)} but returns the recent tasks for a
     * specific user. It requires holding
     * the {@link android.Manifest.permission#INTERACT_ACROSS_USERS_FULL} permission.
     * @param maxNum The maximum number of entries to return in the list.  The
     * actual number returned may be smaller, depending on how many tasks the
     * user has started and the maximum number the system can remember.
     * @param flags Information about what to return.  May be any combination
     * of {@link #RECENT_WITH_EXCLUDED} and {@link #RECENT_IGNORE_UNAVAILABLE}.
     *
     * @return Returns a list of RecentTaskInfo records describing each of
     * the recent tasks. Most recently activated tasks go first.
     *
     * @hide
     */
    public List<RecentTaskInfo> getRecentTasksForUser(int maxNum, int flags, int userId)
            throws SecurityException {
        try {
            return getService().getRecentTasks(maxNum,
                    flags, userId).getList();
            return getService().getRecentTasks(maxNum, flags, UserHandle.myUserId()).getList();
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
        }
+2 −2
Original line number Diff line number Diff line
@@ -178,8 +178,8 @@ interface IActivityManager {
     * SIGUSR1 is delivered. All others are ignored.
     */
    void signalPersistentProcesses(int signal);
    ParceledListSlice getRecentTasks(int maxNum,
            int flags, int userId);

    ParceledListSlice getRecentTasks(int maxNum, int flags, int userId);
    oneway void serviceDoneExecuting(in IBinder token, int type, int startId, int res);
    oneway void activityDestroyed(in IBinder token);
    IIntentSender getIntentSender(int type, in String packageName, in IBinder token,
+0 −8
Original line number Diff line number Diff line
@@ -6791,14 +6791,6 @@ public final class Settings {
        public static final String LOCK_SCREEN_SHOW_NOTIFICATIONS =
                "lock_screen_show_notifications";

        /**
         * This preference stores the last stack active task time for each user, which affects what
         * tasks will be visible in Overview.
         * @hide
         */
        public static final String OVERVIEW_LAST_STACK_ACTIVE_TIME =
                "overview_last_stack_active_time";

        /**
         * List of TV inputs that are currently hidden. This is a string
         * containing the IDs of all hidden TV inputs. Each ID is encoded by
+29 −1
Original line number Diff line number Diff line
@@ -2352,9 +2352,37 @@
    <!-- Package name for default network scorer app; overridden by product overlays. -->
    <string name="config_defaultNetworkScorerPackageName"></string>

    <!-- default device has recents property -->
    <!-- Determines whether recent tasks are provided to the user. Default device has recents
         property. If this is false, then the following recents config flags are ignored. -->
    <bool name="config_hasRecents">true</bool>

    <!-- The minimum number of visible recent tasks to be presented to the user through the
         SystemUI. Can be -1 if there is no minimum limit. -->
    <integer name="config_minNumVisibleRecentTasks_grid">-1</integer>

    <!-- The maximum number of visible recent tasks to be presented to the user through the
         SystemUI. Can be -1 if there is no maximum limit. -->
    <integer name="config_maxNumVisibleRecentTasks_grid">9</integer>

    <!-- The minimum number of visible recent tasks to be presented to the user through the
         SystemUI. Can be -1 if there is no minimum limit. -->
    <integer name="config_minNumVisibleRecentTasks_lowRam">-1</integer>

    <!-- The maximum number of visible recent tasks to be presented to the user through the
         SystemUI. Can be -1 if there is no maximum limit. -->
    <integer name="config_maxNumVisibleRecentTasks_lowRam">9</integer>

    <!-- The minimum number of visible recent tasks to be presented to the user through the
         SystemUI. Can be -1 if there is no minimum limit. -->
    <integer name="config_minNumVisibleRecentTasks">5</integer>

    <!-- The maximum number of visible recent tasks to be presented to the user through the
         SystemUI. Can be -1 if there is no maximum limit. -->
    <integer name="config_maxNumVisibleRecentTasks">-1</integer>

    <!-- The duration in which a recent task is considered in session and should be visible. -->
    <integer name="config_activeTaskDurationHours">6</integer>

    <!-- default window ShowCircularMask property -->
    <bool name="config_windowShowCircularMask">false</bool>

+7 −0
Original line number Diff line number Diff line
@@ -311,6 +311,13 @@
  <java-symbol type="bool" name="config_enableMultiUserUI"/>
  <java-symbol type="bool" name="config_disableUsbPermissionDialogs"/>
  <java-symbol type="bool" name="config_hasRecents" />
  <java-symbol type="integer" name="config_minNumVisibleRecentTasks_lowRam" />
  <java-symbol type="integer" name="config_maxNumVisibleRecentTasks_lowRam" />
  <java-symbol type="integer" name="config_minNumVisibleRecentTasks_grid" />
  <java-symbol type="integer" name="config_maxNumVisibleRecentTasks_grid" />
  <java-symbol type="integer" name="config_minNumVisibleRecentTasks" />
  <java-symbol type="integer" name="config_maxNumVisibleRecentTasks" />
  <java-symbol type="integer" name="config_activeTaskDurationHours" />
  <java-symbol type="bool" name="config_windowShowCircularMask" />
  <java-symbol type="bool" name="config_windowEnableCircularEmulatorDisplayOverlay" />
  <java-symbol type="bool" name="config_wifi_framework_enable_associated_network_selection" />
Loading