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

Commit 7aee681b authored by Craig Mautner's avatar Craig Mautner Committed by Android (Google) Code Review
Browse files

Merge "Set task and activity types when adding to task."

parents 7ea1ab60 2c1faed4
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ final class ActivityRecord {
    static final int APPLICATION_ACTIVITY_TYPE = 0;
    static final int HOME_ACTIVITY_TYPE = 1;
    static final int RECENTS_ACTIVITY_TYPE = 2;
    final int mActivityType;
    int mActivityType;

    final String baseDir;   // where activity source (resources etc) located
    final String resDir;   // where public activity source (public resources etc) located
+9 −5
Original line number Diff line number Diff line
@@ -57,7 +57,8 @@ final class TaskRecord extends ThumbnailHolder {
    /** Current stack */
    ActivityStack stack;

    private boolean mApplicationTask = true;
    /** Takes on same set of values as ActivityRecord.mActivityType */
    private int mTaskType;

    TaskRecord(int _taskId, ActivityInfo info, Intent _intent) {
        taskId = _taskId;
@@ -163,9 +164,12 @@ final class TaskRecord extends ThumbnailHolder {
            // Was not previously in list.
            numFullscreen++;
        }
        // Only set this to be an application task if it has not already been set as home task.
        if (mApplicationTask) {
            mApplicationTask = r.isApplicationActivity();
        // Only set this based on the first activity
        if (mActivities.isEmpty()) {
            mTaskType = r.mActivityType;
        } else {
            // Otherwise make all added activities match this one.
            r.mActivityType = mTaskType;
        }
        mActivities.add(index, r);
    }
@@ -319,7 +323,7 @@ final class TaskRecord extends ThumbnailHolder {
    }

    boolean isApplicationTask() {
        return mApplicationTask;
        return mTaskType == ActivityRecord.APPLICATION_ACTIVITY_TYPE;
    }

    public TaskAccessInfo getTaskAccessInfoLocked(boolean inclThumbs) {