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

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

Merge "Introduce ActivityTransactionItem and reduce null checks"

parents 6deb419e 9b1e9550
Loading
Loading
Loading
Loading
+191 −253
Original line number Diff line number Diff line
@@ -614,7 +614,7 @@ public final class ActivityThread extends ClientTransactionHandler {
                    throw new IllegalStateException(
                            "Received config update for non-existing activity");
                }
                activity.mMainThread.handleActivityConfigurationChanged(token, overrideConfig,
                activity.mMainThread.handleActivityConfigurationChanged(this, overrideConfig,
                        newDisplayId);
            };
        }
@@ -3475,13 +3475,9 @@ public final class ActivityThread extends ClientTransactionHandler {
    }

    @Override
    public void handleStartActivity(IBinder token, PendingTransactionActions pendingActions) {
        final ActivityClientRecord r = mActivities.get(token);
    public void handleStartActivity(ActivityClientRecord r,
            PendingTransactionActions pendingActions) {
        final Activity activity = r.activity;
        if (r.activity == null) {
            // TODO(lifecycler): What do we do in this case?
            return;
        }
        if (!r.stopped) {
            throw new IllegalStateException("Can't start activity that is not stopped.");
        }
@@ -3687,12 +3683,7 @@ public final class ActivityThread extends ClientTransactionHandler {
    }

    @Override
    public void handleNewIntent(IBinder token, List<ReferrerIntent> intents) {
        final ActivityClientRecord r = mActivities.get(token);
        if (r == null) {
            return;
        }

    public void handleNewIntent(ActivityClientRecord r, List<ReferrerIntent> intents) {
        checkAndBlockForNetworkAccess();
        deliverNewIntents(r, intents);
    }
@@ -3881,13 +3872,7 @@ public final class ActivityThread extends ClientTransactionHandler {
    }

    @Override
    public void handlePictureInPictureRequested(IBinder token) {
        final ActivityClientRecord r = mActivities.get(token);
        if (r == null) {
            Log.w(TAG, "Activity to request PIP to no longer exists");
            return;
        }

    public void handlePictureInPictureRequested(ActivityClientRecord r) {
        final boolean receivedByApp = r.activity.onPictureInPictureRequested();
        if (!receivedByApp) {
            // Previous recommendation was for apps to enter picture-in-picture in
@@ -4417,22 +4402,21 @@ public final class ActivityThread extends ClientTransactionHandler {

    /**
     * Resume the activity.
     * @param token Target activity token.
     * @param r Target activity record.
     * @param finalStateRequest Flag indicating if this is part of final state resolution for a
     *                          transaction.
     * @param reason Reason for performing the action.
     *
     * @return The {@link ActivityClientRecord} that was resumed, {@code null} otherwise.
     * @return {@code true} that was resumed, {@code false} otherwise.
     */
    @VisibleForTesting
    public ActivityClientRecord performResumeActivity(IBinder token, boolean finalStateRequest,
    public boolean performResumeActivity(ActivityClientRecord r, boolean finalStateRequest,
            String reason) {
        final ActivityClientRecord r = mActivities.get(token);
        if (localLOGV) {
            Slog.v(TAG, "Performing resume of " + r + " finished=" + r.activity.mFinished);
        }
        if (r == null || r.activity.mFinished) {
            return null;
        if (r.activity.mFinished) {
            return false;
        }
        if (r.getLifecycleState() == ON_RESUME) {
            if (!finalStateRequest) {
@@ -4446,7 +4430,7 @@ public final class ActivityThread extends ClientTransactionHandler {
                // handle two resume requests for the final state. For cases other than this
                // one, we don't expect it to happen.
            }
            return null;
            return false;
        }
        if (finalStateRequest) {
            r.hideForNow = false;
@@ -4477,7 +4461,7 @@ public final class ActivityThread extends ClientTransactionHandler {
                        + r.intent.getComponent().toShortString() + ": " + e.toString(), e);
            }
        }
        return r;
        return true;
    }

    static final void cleanUpPendingRemoveWindows(ActivityClientRecord r, boolean force) {
@@ -4498,20 +4482,19 @@ public final class ActivityThread extends ClientTransactionHandler {
    }

    @Override
    public void handleResumeActivity(IBinder token, boolean finalStateRequest, boolean isForward,
            String reason) {
    public void handleResumeActivity(ActivityClientRecord r, boolean finalStateRequest,
            boolean isForward, String reason) {
        // If we are getting ready to gc after going to the background, well
        // we are back active so skip it.
        unscheduleGcIdler();
        mSomeActivitiesChanged = true;

        // TODO Push resumeArgs into the activity for consideration
        final ActivityClientRecord r = performResumeActivity(token, finalStateRequest, reason);
        if (r == null) {
            // We didn't actually resume the activity, so skipping any follow-up actions.
        // skip below steps for double-resume and r.mFinish = true case.
        if (!performResumeActivity(r, finalStateRequest, reason)) {
            return;
        }
        if (mActivitiesToBeDestroyed.containsKey(token)) {
        if (mActivitiesToBeDestroyed.containsKey(r.token)) {
            // Although the activity is resumed, it is going to be destroyed. So the following
            // UI operations are unnecessary and also prevents exception because its token may
            // be gone that window manager cannot recognize it. All necessary cleanup actions
@@ -4629,13 +4612,8 @@ public final class ActivityThread extends ClientTransactionHandler {


    @Override
    public void handleTopResumedActivityChanged(IBinder token, boolean onTop, String reason) {
        ActivityClientRecord r = mActivities.get(token);
        if (r == null || r.activity == null) {
            Slog.w(TAG, "Not found target activity to report position change for token: " + token);
            return;
        }

    public void handleTopResumedActivityChanged(ActivityClientRecord r, boolean onTop,
            String reason) {
        if (DEBUG_ORDER) {
            Slog.d(TAG, "Received position change to top: " + onTop + " for activity: " + r);
        }
@@ -4668,10 +4646,8 @@ public final class ActivityThread extends ClientTransactionHandler {
    }

    @Override
    public void handlePauseActivity(IBinder token, boolean finished, boolean userLeaving,
    public void handlePauseActivity(ActivityClientRecord r, boolean finished, boolean userLeaving,
            int configChanges, PendingTransactionActions pendingActions, String reason) {
        ActivityClientRecord r = mActivities.get(token);
        if (r != null) {
        if (userLeaving) {
            performUserLeavingActivity(r);
        }
@@ -4685,7 +4661,6 @@ public final class ActivityThread extends ClientTransactionHandler {
        }
        mSomeActivitiesChanged = true;
    }
    }

    final void performUserLeavingActivity(ActivityClientRecord r) {
        mInstrumentation.callActivityOnPictureInPictureRequested(r.activity);
@@ -4781,8 +4756,11 @@ public final class ActivityThread extends ClientTransactionHandler {
        r.setState(ON_PAUSE);
    }

    // TODO(b/127877792): Make LocalActivityManager call performStopActivityInner. We cannot do this
    // since it's a high usage hidden API.
    /** Called from {@link LocalActivityManager}. */
    @UnsupportedAppUsage
    @UnsupportedAppUsage(maxTargetSdk = Build.VERSION_CODES.R, trackingBug = 127877792,
            publicAlternatives = "{@code N/A}")
    final void performStopActivity(IBinder token, boolean saveState, String reason) {
        ActivityClientRecord r = mActivities.get(token);
        performStopActivityInner(r, null /* stopInfo */, saveState, false /* finalStateRequest */,
@@ -4823,7 +4801,6 @@ public final class ActivityThread extends ClientTransactionHandler {
    private void performStopActivityInner(ActivityClientRecord r, StopInfo info,
            boolean saveState, boolean finalStateRequest, String reason) {
        if (localLOGV) Slog.v(TAG, "Performing stop of " + r);
        if (r != null) {
        if (r.stopped) {
            if (r.activity.mFinished) {
                // If we are finishing, we won't call onResume() in certain
@@ -4857,7 +4834,6 @@ public final class ActivityThread extends ClientTransactionHandler {
                            + ": " + e.toString(), e);
                }
            }
            }

            callActivityOnStop(r, saveState, reason);
        }
@@ -4927,9 +4903,8 @@ public final class ActivityThread extends ClientTransactionHandler {
    }

    @Override
    public void handleStopActivity(IBinder token, int configChanges,
    public void handleStopActivity(ActivityClientRecord r, int configChanges,
            PendingTransactionActions pendingActions, boolean finalStateRequest, String reason) {
        final ActivityClientRecord r = mActivities.get(token);
        r.activity.mConfigChangeFlags |= configChanges;

        final StopInfo stopInfo = new StopInfo();
@@ -4965,8 +4940,7 @@ public final class ActivityThread extends ClientTransactionHandler {
    }

    @Override
    public void performRestartActivity(IBinder token, boolean start) {
        ActivityClientRecord r = mActivities.get(token);
    public void performRestartActivity(ActivityClientRecord r, boolean start) {
        if (r.stopped) {
            r.activity.performRestart(start, "performRestartActivity");
            if (start) {
@@ -5053,10 +5027,8 @@ public final class ActivityThread extends ClientTransactionHandler {
    }

    @Override
    public void handleSendResult(IBinder token, List<ResultInfo> results, String reason) {
        ActivityClientRecord r = mActivities.get(token);
    public void handleSendResult(ActivityClientRecord r, List<ResultInfo> results, String reason) {
        if (DEBUG_RESULTS) Slog.v(TAG, "Handling send result to " + r);
        if (r != null) {
        final boolean resumed = !r.paused;
        if (!r.activity.mFinished && r.activity.mDecor != null
                && r.hideForNow && resumed) {
@@ -5092,15 +5064,12 @@ public final class ActivityThread extends ClientTransactionHandler {
            r.activity.performResume(false, reason);
        }
    }
    }

    /** Core implementation of activity destroy call. */
    ActivityClientRecord performDestroyActivity(IBinder token, boolean finishing,
    ActivityClientRecord performDestroyActivity(ActivityClientRecord r, boolean finishing,
            int configChanges, boolean getNonConfigInstance, String reason) {
        ActivityClientRecord r = mActivities.get(token);
        Class<? extends Activity> activityClass = null;
        if (localLOGV) Slog.v(TAG, "Performing finish of " + r);
        if (r != null) {
        activityClass = r.activity.getClass();
        r.activity.mConfigChangeFlags |= configChanges;
        if (finishing) {
@@ -5114,8 +5083,7 @@ public final class ActivityThread extends ClientTransactionHandler {
        }
        if (getNonConfigInstance) {
            try {
                    r.lastNonConfigurationInstances
                            = r.activity.retainNonConfigurationInstances();
                r.lastNonConfigurationInstances = r.activity.retainNonConfigurationInstances();
            } catch (Exception e) {
                if (!mInstrumentation.onException(r.activity, e)) {
                    throw new RuntimeException(
@@ -5124,14 +5092,16 @@ public final class ActivityThread extends ClientTransactionHandler {
                            + ": " + e.toString(), e);
                }
            }
            r.setState(ON_DESTROY);
            mLastReportedWindowingMode.remove(r.activity.getActivityToken());
        }
        try {
            r.activity.mCalled = false;
            mInstrumentation.callActivityOnDestroy(r.activity);
            if (!r.activity.mCalled) {
                throw new SuperNotCalledException(
                        "Activity " + safeToComponentShortString(r.intent) +
                        " did not call through to super.onDestroy()");
                    "Activity " + safeToComponentShortString(r.intent)
                            + " did not call through to super.onDestroy()");
            }
            if (r.window != null) {
                r.window.closeAllPanels();
@@ -5146,14 +5116,12 @@ public final class ActivityThread extends ClientTransactionHandler {
            }
        }
        r.setState(ON_DESTROY);
            mLastReportedWindowingMode.remove(r.activity.getActivityToken());
        }
        schedulePurgeIdler();
        // updatePendingActivityConfiguration() reads from mActivities to update
        // ActivityClientRecord which runs in a different thread. Protect modifications to
        // mActivities to avoid race.
        synchronized (mResourcesManager) {
            mActivities.remove(token);
            mActivities.remove(r.token);
        }
        StrictMode.decrementExpectedActivityCount(activityClass);
        return r;
@@ -5170,11 +5138,9 @@ public final class ActivityThread extends ClientTransactionHandler {
    }

    @Override
    public void handleDestroyActivity(IBinder token, boolean finishing, int configChanges,
    public void handleDestroyActivity(ActivityClientRecord r, boolean finishing, int configChanges,
            boolean getNonConfigInstance, String reason) {
        ActivityClientRecord r = performDestroyActivity(token, finishing,
                configChanges, getNonConfigInstance, reason);
        if (r != null) {
        r = performDestroyActivity(r, finishing, configChanges, getNonConfigInstance, reason);
        cleanUpPendingRemoveWindows(r, finishing);
        WindowManager wm = r.activity.getWindowManager();
        View v = r.activity.mDecor;
@@ -5205,7 +5171,7 @@ public final class ActivityThread extends ClientTransactionHandler {
                // will be detached before the final tear down. It should be done now because
                // some components (e.g. WebView) rely on detach callbacks to perform receiver
                // unregister and other cleanup.
                    WindowManagerGlobal.getInstance().closeAllExceptView(token, v,
                WindowManagerGlobal.getInstance().closeAllExceptView(r.token, v,
                        r.activity.getClass().getName(), "Activity");
            }
            r.activity.mDecor = null;
@@ -5217,7 +5183,7 @@ public final class ActivityThread extends ClientTransactionHandler {
            // by the app will leak.  Well we try to warning them a lot
            // about leaking windows, because that is a bug, so if they are
            // using this recreate facility then they get to live with leaks.
                WindowManagerGlobal.getInstance().closeAll(token,
            WindowManagerGlobal.getInstance().closeAll(r.token,
                    r.activity.getClass().getName(), "Activity");
        }

@@ -5230,10 +5196,9 @@ public final class ActivityThread extends ClientTransactionHandler {
            ((ContextImpl) c).scheduleFinalCleanup(
                    r.activity.getClass().getName(), "Activity");
        }
        }
        if (finishing) {
            try {
                ActivityTaskManager.getService().activityDestroyed(token);
                ActivityTaskManager.getService().activityDestroyed(r.token);
            } catch (RemoteException ex) {
                throw ex.rethrowFromSystemServer();
            }
@@ -5456,7 +5421,7 @@ public final class ActivityThread extends ClientTransactionHandler {
            callActivityOnStop(r, true /* saveState */, reason);
        }

        handleDestroyActivity(r.token, false, configChanges, true, reason);
        handleDestroyActivity(r, false, configChanges, true, reason);

        r.activity = null;
        r.window = null;
@@ -5484,12 +5449,10 @@ public final class ActivityThread extends ClientTransactionHandler {
    }

    @Override
    public void reportRelaunch(IBinder token, PendingTransactionActions pendingActions) {
    public void reportRelaunch(ActivityClientRecord r, PendingTransactionActions pendingActions) {
        try {
            ActivityTaskManager.getService().activityRelaunched(token);
            final ActivityClientRecord r = mActivities.get(token);
            if (pendingActions.shouldReportRelaunchToWindowManager() && r != null
                    && r.window != null) {
            ActivityTaskManager.getService().activityRelaunched(r.token);
            if (pendingActions.shouldReportRelaunchToWindowManager() && r.window != null) {
                r.window.reportActivityRelaunched();
            }
        } catch (RemoteException e) {
@@ -5648,13 +5611,7 @@ public final class ActivityThread extends ClientTransactionHandler {
     */
    private Configuration performActivityConfigurationChanged(Activity activity,
            Configuration newConfig, Configuration amOverrideConfig, int displayId) {
        if (activity == null) {
            throw new IllegalArgumentException("No activity provided.");
        }
        final IBinder activityToken = activity.getActivityToken();
        if (activityToken == null) {
            throw new IllegalArgumentException("Activity token not set. Is the activity attached?");
        }

        final boolean movedToDifferentDisplay = isDifferentDisplay(activity, displayId);
        boolean shouldReportChange = false;
@@ -5954,20 +5911,8 @@ public final class ActivityThread extends ClientTransactionHandler {
     * processing any configurations older than {@code overrideConfig}.
     */
    @Override
    public void updatePendingActivityConfiguration(IBinder activityToken,
    public void updatePendingActivityConfiguration(ActivityClientRecord r,
            Configuration overrideConfig) {
        final ActivityClientRecord r;
        synchronized (mResourcesManager) {
            r = mActivities.get(activityToken);
        }

        if (r == null) {
            if (DEBUG_CONFIGURATION) {
                Slog.w(TAG, "Not found target activity to update its pending config.");
            }
            return;
        }

        synchronized (r) {
            if (r.mPendingOverrideConfig != null
                    && !r.mPendingOverrideConfig.isOtherSeqNewer(overrideConfig)) {
@@ -5987,21 +5932,14 @@ public final class ActivityThread extends ClientTransactionHandler {
     * if {@link #updatePendingActivityConfiguration(IBinder, Configuration)} has been called with
     * a newer config than {@code overrideConfig}.
     *
     * @param activityToken Target activity token.
     * @param r Target activity record.
     * @param overrideConfig Activity override config.
     * @param displayId Id of the display where activity was moved to, -1 if there was no move and
     *                  value didn't change.
     */
    @Override
    public void handleActivityConfigurationChanged(IBinder activityToken,
    public void handleActivityConfigurationChanged(ActivityClientRecord r,
            @NonNull Configuration overrideConfig, int displayId) {
        ActivityClientRecord r = mActivities.get(activityToken);
        // Check input params.
        if (r == null || r.activity == null) {
            if (DEBUG_CONFIGURATION) Slog.w(TAG, "Not found target activity to report to: " + r);
            return;
        }

        synchronized (r) {
            if (overrideConfig.isOtherSeqNewer(r.mPendingOverrideConfig)) {
                if (DEBUG_CONFIGURATION) {
+30 −24
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@
 */
package android.app;

import android.annotation.NonNull;
import android.app.ActivityThread.ActivityClientRecord;
import android.app.servertransaction.ClientTransaction;
import android.app.servertransaction.ClientTransactionItem;
import android.app.servertransaction.PendingTransactionActions;
@@ -89,37 +91,38 @@ public abstract class ClientTransactionHandler {
    public abstract Map<IBinder, ClientTransactionItem> getActivitiesToBeDestroyed();

    /** Destroy the activity. */
    public abstract void handleDestroyActivity(IBinder token, boolean finishing, int configChanges,
            boolean getNonConfigInstance, String reason);
    public abstract void handleDestroyActivity(@NonNull ActivityClientRecord r, boolean finishing,
            int configChanges, boolean getNonConfigInstance, String reason);

    /** Pause the activity. */
    public abstract void handlePauseActivity(IBinder token, boolean finished, boolean userLeaving,
            int configChanges, PendingTransactionActions pendingActions, String reason);
    public abstract void handlePauseActivity(@NonNull ActivityClientRecord r, boolean finished,
            boolean userLeaving, int configChanges, PendingTransactionActions pendingActions,
            String reason);

    /**
     * Resume the activity.
     * @param token Target activity token.
     * @param r Target activity record.
     * @param finalStateRequest Flag indicating if this call is handling final lifecycle state
     *                          request for a transaction.
     * @param isForward Flag indicating if next transition is forward.
     * @param reason Reason for performing this operation.
     */
    public abstract void handleResumeActivity(IBinder token, boolean finalStateRequest,
            boolean isForward, String reason);
    public abstract void handleResumeActivity(@NonNull ActivityClientRecord r,
            boolean finalStateRequest, boolean isForward, String reason);

    /**
     * Notify the activity about top resumed state change.
     * @param token Target activity token.
     * @param r Target activity record.
     * @param isTopResumedActivity Current state of the activity, {@code true} if it's the
     *                             topmost resumed activity in the system, {@code false} otherwise.
     * @param reason Reason for performing this operation.
     */
    public abstract void handleTopResumedActivityChanged(IBinder token,
    public abstract void handleTopResumedActivityChanged(@NonNull ActivityClientRecord r,
            boolean isTopResumedActivity, String reason);

    /**
     * Stop the activity.
     * @param token Target activity token.
     * @param r Target activity record.
     * @param configChanges Activity configuration changes.
     * @param pendingActions Pending actions to be used on this or later stages of activity
     *                       transaction.
@@ -127,38 +130,40 @@ public abstract class ClientTransactionHandler {
     *                          request for a transaction.
     * @param reason Reason for performing this operation.
     */
    public abstract void handleStopActivity(IBinder token, int configChanges,
    public abstract void handleStopActivity(@NonNull ActivityClientRecord r, int configChanges,
            PendingTransactionActions pendingActions, boolean finalStateRequest, String reason);

    /** Report that activity was stopped to server. */
    public abstract void reportStop(PendingTransactionActions pendingActions);

    /** Restart the activity after it was stopped. */
    public abstract void performRestartActivity(IBinder token, boolean start);
    public abstract void performRestartActivity(@NonNull ActivityClientRecord r, boolean start);

    /** Set pending activity configuration in case it will be updated by other transaction item. */
    public abstract void updatePendingActivityConfiguration(IBinder activityToken,
    public abstract void updatePendingActivityConfiguration(@NonNull ActivityClientRecord r,
            Configuration overrideConfig);

    /** Deliver activity (override) configuration change. */
    public abstract void handleActivityConfigurationChanged(IBinder activityToken,
    public abstract void handleActivityConfigurationChanged(@NonNull ActivityClientRecord r,
            Configuration overrideConfig, int displayId);

    /** Deliver result from another activity. */
    public abstract void handleSendResult(IBinder token, List<ResultInfo> results, String reason);
    public abstract void handleSendResult(
            @NonNull ActivityClientRecord r, List<ResultInfo> results, String reason);

    /** Deliver new intent. */
    public abstract void handleNewIntent(IBinder token, List<ReferrerIntent> intents);
    public abstract void handleNewIntent(
            @NonNull ActivityClientRecord r, List<ReferrerIntent> intents);

    /** Request that an activity enter picture-in-picture. */
    public abstract void handlePictureInPictureRequested(IBinder token);
    public abstract void handlePictureInPictureRequested(@NonNull ActivityClientRecord r);

    /** Perform activity launch. */
    public abstract Activity handleLaunchActivity(ActivityThread.ActivityClientRecord r,
    public abstract Activity handleLaunchActivity(@NonNull ActivityClientRecord r,
            PendingTransactionActions pendingActions, Intent customIntent);

    /** Perform activity start. */
    public abstract void handleStartActivity(IBinder token,
    public abstract void handleStartActivity(@NonNull ActivityClientRecord r,
            PendingTransactionActions pendingActions);

    /** Get package info. */
@@ -176,7 +181,7 @@ public abstract class ClientTransactionHandler {
     * Get {@link android.app.ActivityThread.ActivityClientRecord} instance that corresponds to the
     * provided token.
     */
    public abstract ActivityThread.ActivityClientRecord getActivityClient(IBinder token);
    public abstract ActivityClientRecord getActivityClient(IBinder token);

    /**
     * Prepare activity relaunch to update internal bookkeeping. This is used to track multiple
@@ -191,7 +196,7 @@ public abstract class ClientTransactionHandler {
     * @return An initialized instance of {@link ActivityThread.ActivityClientRecord} to use during
     *         relaunch, or {@code null} if relaunch cancelled.
     */
    public abstract ActivityThread.ActivityClientRecord prepareRelaunchActivity(IBinder token,
    public abstract ActivityClientRecord prepareRelaunchActivity(IBinder token,
            List<ResultInfo> pendingResults, List<ReferrerIntent> pendingNewIntents,
            int configChanges, MergedConfiguration config, boolean preserveWindow);

@@ -200,14 +205,15 @@ public abstract class ClientTransactionHandler {
     * @param r Activity client record prepared for relaunch.
     * @param pendingActions Pending actions to be used on later stages of activity transaction.
     * */
    public abstract void handleRelaunchActivity(ActivityThread.ActivityClientRecord r,
    public abstract void handleRelaunchActivity(@NonNull ActivityClientRecord r,
            PendingTransactionActions pendingActions);

    /**
     * Report that relaunch request was handled.
     * @param token Target activity token.
     * @param r Target activity record.
     * @param pendingActions Pending actions initialized on earlier stages of activity transaction.
     *                       Used to check if we should report relaunch to WM.
     * */
    public abstract void reportRelaunch(IBinder token, PendingTransactionActions pendingActions);
    public abstract void reportRelaunch(@NonNull ActivityClientRecord r,
            PendingTransactionActions pendingActions);
}
+20 −11

File changed.

Preview size limit exceeded, changes collapsed.

+7 −5

File changed.

Preview size limit exceeded, changes collapsed.

+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ import java.lang.annotation.RetentionPolicy;
 * Request for lifecycle state that an activity should reach.
 * @hide
 */
public abstract class ActivityLifecycleItem extends ClientTransactionItem {
public abstract class ActivityLifecycleItem extends ActivityTransactionItem {

    @IntDef(prefix = { "UNDEFINED", "PRE_", "ON_" }, value = {
            UNDEFINED,
Loading