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

Commit 0f155293 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Renamed a few methods in ActivityRecord (42/n)."

parents 0893c2e3 8b19de94
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -1242,7 +1242,7 @@ class ActivityDisplay extends ConfigurationContainer<ActivityStack>
            for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) {
            for (int activityNdx = activities.size() - 1; activityNdx >= 0; --activityNdx) {
                final ActivityRecord r = activities.get(activityNdx);
                final ActivityRecord r = activities.get(activityNdx);
                if (r.isActivityTypeHome()
                if (r.isActivityTypeHome()
                        && ((userId == UserHandle.USER_ALL) || (r.userId == userId))) {
                        && ((userId == UserHandle.USER_ALL) || (r.mUserId == userId))) {
                    return r;
                    return r;
                }
                }
            }
            }
+3 −3
Original line number Original line Diff line number Diff line
@@ -254,7 +254,7 @@ class ActivityMetricsLogger {
            type = getTransitionType(info);
            type = getTransitionType(info);
            processRecord = findProcessForActivity(launchedActivity);
            processRecord = findProcessForActivity(launchedActivity);
            processName = launchedActivity.processName;
            processName = launchedActivity.processName;
            userId = launchedActivity.userId;
            userId = launchedActivity.mUserId;
            launchedActivityShortComponentName = launchedActivity.shortComponentName;
            launchedActivityShortComponentName = launchedActivity.shortComponentName;
            activityRecordIdHashCode = System.identityHashCode(launchedActivity);
            activityRecordIdHashCode = System.identityHashCode(launchedActivity);
            this.windowsFullyDrawnDelayMs = windowsFullyDrawnDelayMs;
            this.windowsFullyDrawnDelayMs = windowsFullyDrawnDelayMs;
@@ -520,7 +520,7 @@ class ActivityMetricsLogger {
        if (info.launchedActivity != activityRecord) {
        if (info.launchedActivity != activityRecord) {
            return;
            return;
        }
        }
        final TaskRecord t = activityRecord.getTask();
        final TaskRecord t = activityRecord.getTaskRecord();
        final SomeArgs args = SomeArgs.obtain();
        final SomeArgs args = SomeArgs.obtain();
        args.arg1 = t;
        args.arg1 = t;
        args.arg2 = activityRecord;
        args.arg2 = activityRecord;
@@ -893,7 +893,7 @@ class ActivityMetricsLogger {
            builder.addTaggedData(FIELD_ACTIVITY_RECORD_TARGET_ACTIVITY, r.info.targetActivity);
            builder.addTaggedData(FIELD_ACTIVITY_RECORD_TARGET_ACTIVITY, r.info.targetActivity);
            builder.addTaggedData(FIELD_ACTIVITY_RECORD_FLAGS, r.info.flags);
            builder.addTaggedData(FIELD_ACTIVITY_RECORD_FLAGS, r.info.flags);
            builder.addTaggedData(FIELD_ACTIVITY_RECORD_REAL_ACTIVITY,
            builder.addTaggedData(FIELD_ACTIVITY_RECORD_REAL_ACTIVITY,
                    r.realActivity.toShortString());
                    r.mActivityComponent.toShortString());
            builder.addTaggedData(FIELD_ACTIVITY_RECORD_SHORT_COMPONENT_NAME, r.shortComponentName);
            builder.addTaggedData(FIELD_ACTIVITY_RECORD_SHORT_COMPONENT_NAME, r.shortComponentName);
            builder.addTaggedData(FIELD_ACTIVITY_RECORD_PROCESS_NAME, r.processName);
            builder.addTaggedData(FIELD_ACTIVITY_RECORD_PROCESS_NAME, r.processName);
            builder.addTaggedData(FIELD_ACTIVITY_RECORD_IS_FULLSCREEN, r.fullscreen ? 1 : 0);
            builder.addTaggedData(FIELD_ACTIVITY_RECORD_IS_FULLSCREEN, r.fullscreen ? 1 : 0);
+106 −106

File changed.

Preview size limit exceeded, changes collapsed.

+61 −61

File changed.

Preview size limit exceeded, changes collapsed.

+17 −21
Original line number Original line Diff line number Diff line
@@ -91,9 +91,6 @@ import android.app.AppOpsManager;
import android.app.ProfilerInfo;
import android.app.ProfilerInfo;
import android.app.ResultInfo;
import android.app.ResultInfo;
import android.app.WaitResult;
import android.app.WaitResult;
import android.app.WindowConfiguration;
import android.app.WindowConfiguration.ActivityType;
import android.app.WindowConfiguration.WindowingMode;
import android.app.servertransaction.ActivityLifecycleItem;
import android.app.servertransaction.ActivityLifecycleItem;
import android.app.servertransaction.ClientTransaction;
import android.app.servertransaction.ClientTransaction;
import android.app.servertransaction.LaunchActivityItem;
import android.app.servertransaction.LaunchActivityItem;
@@ -111,7 +108,6 @@ import android.content.pm.UserInfo;
import android.content.res.Configuration;
import android.content.res.Configuration;
import android.graphics.Rect;
import android.graphics.Rect;
import android.os.Binder;
import android.os.Binder;
import android.os.Build;
import android.os.Bundle;
import android.os.Bundle;
import android.os.Debug;
import android.os.Debug;
import android.os.Handler;
import android.os.Handler;
@@ -544,7 +540,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
        mActivitiesWaitingForVisibleActivity.remove(r);
        mActivitiesWaitingForVisibleActivity.remove(r);


        for (int i = mWaitingForActivityVisible.size() - 1; i >= 0; --i) {
        for (int i = mWaitingForActivityVisible.size() - 1; i >= 0; --i) {
            if (mWaitingForActivityVisible.get(i).matches(r.realActivity)) {
            if (mWaitingForActivityVisible.get(i).matches(r.mActivityComponent)) {
                mWaitingForActivityVisible.remove(i);
                mWaitingForActivityVisible.remove(i);
            }
            }
        }
        }
@@ -558,7 +554,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
        boolean changed = false;
        boolean changed = false;
        for (int i = mWaitingForActivityVisible.size() - 1; i >= 0; --i) {
        for (int i = mWaitingForActivityVisible.size() - 1; i >= 0; --i) {
            final WaitInfo w = mWaitingForActivityVisible.get(i);
            final WaitInfo w = mWaitingForActivityVisible.get(i);
            if (w.matches(r.realActivity)) {
            if (w.matches(r.mActivityComponent)) {
                final WaitResult result = w.getResult();
                final WaitResult result = w.getResult();
                changed = true;
                changed = true;
                result.timeout = false;
                result.timeout = false;
@@ -592,7 +588,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
                // Unlike START_TASK_TO_FRONT, When an intent is delivered to top, there
                // Unlike START_TASK_TO_FRONT, When an intent is delivered to top, there
                // will be no followup launch signals. Assign the result and launched component.
                // will be no followup launch signals. Assign the result and launched component.
                if (result == START_DELIVERED_TO_TOP) {
                if (result == START_DELIVERED_TO_TOP) {
                    w.who = r.realActivity;
                    w.who = r.mActivityComponent;
                }
                }
            }
            }
        }
        }
@@ -713,7 +709,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
            return false;
            return false;
        }
        }


        final TaskRecord task = r.getTask();
        final TaskRecord task = r.getTaskRecord();
        final ActivityStack stack = task.getStack();
        final ActivityStack stack = task.getStack();


        beginDeferResume();
        beginDeferResume();
@@ -742,7 +738,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
                        false /* markFrozenIfConfigChanged */, true /* deferResume */);
                        false /* markFrozenIfConfigChanged */, true /* deferResume */);
            }
            }


            if (r.getStack().checkKeyguardVisibility(r, true /* shouldBeVisible */,
            if (r.getActivityStack().checkKeyguardVisibility(r, true /* shouldBeVisible */,
                    true /* isTop */)) {
                    true /* isTop */)) {
                // We only set the visibility to true if the activity is allowed to be visible
                // We only set the visibility to true if the activity is allowed to be visible
                // based on
                // based on
@@ -754,7 +750,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {


            final int applicationInfoUid =
            final int applicationInfoUid =
                    (r.info.applicationInfo != null) ? r.info.applicationInfo.uid : -1;
                    (r.info.applicationInfo != null) ? r.info.applicationInfo.uid : -1;
            if ((r.userId != proc.mUserId) || (r.appInfo.uid != applicationInfoUid)) {
            if ((r.mUserId != proc.mUserId) || (r.appInfo.uid != applicationInfoUid)) {
                Slog.wtf(TAG,
                Slog.wtf(TAG,
                        "User ID for activity changing for " + r
                        "User ID for activity changing for " + r
                                + " appInfo.uid=" + r.appInfo.uid
                                + " appInfo.uid=" + r.appInfo.uid
@@ -795,7 +791,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
                if (DEBUG_SWITCH) Slog.v(TAG_SWITCH,
                if (DEBUG_SWITCH) Slog.v(TAG_SWITCH,
                        "Launching: " + r + " icicle=" + r.icicle + " with results=" + results
                        "Launching: " + r + " icicle=" + r.icicle + " with results=" + results
                                + " newIntents=" + newIntents + " andResume=" + andResume);
                                + " newIntents=" + newIntents + " andResume=" + andResume);
                EventLog.writeEvent(EventLogTags.AM_RESTART_ACTIVITY, r.userId,
                EventLog.writeEvent(EventLogTags.AM_RESTART_ACTIVITY, r.mUserId,
                        System.identityHashCode(r), task.taskId, r.shortComponentName);
                        System.identityHashCode(r), task.taskId, r.shortComponentName);
                if (r.isActivityTypeHome()) {
                if (r.isActivityTypeHome()) {
                    // Home process is the root process of the task.
                    // Home process is the root process of the task.
@@ -1312,7 +1308,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
        // waiting for the next one to start.
        // waiting for the next one to start.
        for (int i = 0; i < NS; i++) {
        for (int i = 0; i < NS; i++) {
            r = stops.get(i);
            r = stops.get(i);
            final ActivityStack stack = r.getStack();
            final ActivityStack stack = r.getActivityStack();
            if (stack != null) {
            if (stack != null) {
                if (r.finishing) {
                if (r.finishing) {
                    stack.finishCurrentActivityLocked(r, ActivityStack.FINISH_IMMEDIATELY, false,
                    stack.finishCurrentActivityLocked(r, ActivityStack.FINISH_IMMEDIATELY, false,
@@ -1327,7 +1323,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
        // waiting for the next one to start.
        // waiting for the next one to start.
        for (int i = 0; i < NF; i++) {
        for (int i = 0; i < NF; i++) {
            r = finishes.get(i);
            r = finishes.get(i);
            final ActivityStack stack = r.getStack();
            final ActivityStack stack = r.getActivityStack();
            if (stack != null) {
            if (stack != null) {
                activityRemoved |= stack.destroyActivityLocked(r, true, "finish-idle");
                activityRemoved |= stack.destroyActivityLocked(r, true, "finish-idle");
            }
            }
@@ -2009,7 +2005,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {


    void activitySleptLocked(ActivityRecord r) {
    void activitySleptLocked(ActivityRecord r) {
        mGoingToSleepActivities.remove(r);
        mGoingToSleepActivities.remove(r);
        final ActivityStack s = r.getStack();
        final ActivityStack s = r.getActivityStack();
        if (s != null) {
        if (s != null) {
            s.checkReadyForSleep();
            s.checkReadyForSleep();
        } else {
        } else {
@@ -2045,7 +2041,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
        // A resumed activity cannot be stopping. remove from list
        // A resumed activity cannot be stopping. remove from list
        mStoppingActivities.remove(r);
        mStoppingActivities.remove(r);


        final ActivityStack stack = r.getStack();
        final ActivityStack stack = r.getActivityStack();
        if (mRootActivityContainer.isTopDisplayFocusedStack(stack)) {
        if (mRootActivityContainer.isTopDisplayFocusedStack(stack)) {
            mService.updateUsageStats(r, true);
            mService.updateUsageStats(r, true);
        }
        }
@@ -2061,7 +2057,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {


    // Called when WindowManager has finished animating the launchingBehind activity to the back.
    // Called when WindowManager has finished animating the launchingBehind activity to the back.
    private void handleLaunchTaskBehindCompleteLocked(ActivityRecord r) {
    private void handleLaunchTaskBehindCompleteLocked(ActivityRecord r) {
        final TaskRecord task = r.getTask();
        final TaskRecord task = r.getTaskRecord();
        final ActivityStack stack = task.getStack();
        final ActivityStack stack = task.getStack();


        r.mLaunchTaskBehind = false;
        r.mLaunchTaskBehind = false;
@@ -2073,7 +2069,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
        // task has been shown briefly
        // task has been shown briefly
        final ActivityRecord top = stack.getTopActivity();
        final ActivityRecord top = stack.getTopActivity();
        if (top != null) {
        if (top != null) {
            top.getTask().touchActiveTime();
            top.getTaskRecord().touchActiveTime();
        }
        }
    }
    }


@@ -2128,7 +2124,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
                }
                }
            }
            }
            if (remove) {
            if (remove) {
                final ActivityStack stack = s.getStack();
                final ActivityStack stack = s.getActivityStack();
                final boolean shouldSleepOrShutDown = stack != null
                final boolean shouldSleepOrShutDown = stack != null
                        ? stack.shouldSleepOrShutDownActivities()
                        ? stack.shouldSleepOrShutDownActivities()
                        : mService.isSleepingOrShuttingDownLocked();
                        : mService.isSleepingOrShuttingDownLocked();
@@ -2218,8 +2214,8 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
                pw.println(header);
                pw.println(header);
                header = null;
                header = null;
            }
            }
            if (lastTask != r.getTask()) {
            if (lastTask != r.getTaskRecord()) {
                lastTask = r.getTask();
                lastTask = r.getTaskRecord();
                pw.print(prefix);
                pw.print(prefix);
                pw.print(full ? "* " : "  ");
                pw.print(full ? "* " : "  ");
                pw.println(lastTask);
                pw.println(lastTask);
@@ -2376,7 +2372,7 @@ public class ActivityStackSupervisor implements RecentTasks.Callbacks {
        mWindowManager.notifyAppRelaunchingFinished(token);
        mWindowManager.notifyAppRelaunchingFinished(token);
        final ActivityRecord r = ActivityRecord.isInStackLocked(token);
        final ActivityRecord r = ActivityRecord.isInStackLocked(token);
        if (r != null) {
        if (r != null) {
            if (r.getStack().shouldSleepOrShutDownActivities()) {
            if (r.getActivityStack().shouldSleepOrShutDownActivities()) {
                r.setSleeping(true, true);
                r.setSleeping(true, true);
            }
            }
        }
        }
Loading