summaryrefslogtreecommitdiff
path: root/core/java/android/app/ClientTransactionHandler.java
diff options
context:
space:
mode:
authorDavid Srbecky <dsrbecky@google.com>2020-08-17 11:37:53 +0000
committerDavid Srbecky <dsrbecky@google.com>2020-08-17 11:42:35 +0000
commitfd2be2c17882c7db2833ed35c2b4da975801e527 (patch)
treefcb499468533b19c217499eb0753f07e5adcb25b /core/java/android/app/ClientTransactionHandler.java
parent9b1e955021ce4ce8c09b26c5fb38a2bb9c5a2d6d (diff)
Revert "Introduce ActivityTransactionItem and reduce null checks"
This reverts commit 9b1e955021ce4ce8c09b26c5fb38a2bb9c5a2d6d. Reason for revert: Breaks many tests Bug: 164982975 Change-Id: I86e7b158ae593aab6d73950bbb2b9dc6a7d5093c
Diffstat (limited to 'core/java/android/app/ClientTransactionHandler.java')
-rw-r--r--core/java/android/app/ClientTransactionHandler.java54
1 files changed, 24 insertions, 30 deletions
diff --git a/core/java/android/app/ClientTransactionHandler.java b/core/java/android/app/ClientTransactionHandler.java
index ac50676ff46b..2df756e80fde 100644
--- a/core/java/android/app/ClientTransactionHandler.java
+++ b/core/java/android/app/ClientTransactionHandler.java
@@ -15,8 +15,6 @@
*/
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;
@@ -91,38 +89,37 @@ public abstract class ClientTransactionHandler {
public abstract Map<IBinder, ClientTransactionItem> getActivitiesToBeDestroyed();
/** Destroy the activity. */
- public abstract void handleDestroyActivity(@NonNull ActivityClientRecord r, boolean finishing,
- int configChanges, boolean getNonConfigInstance, String reason);
+ public abstract void handleDestroyActivity(IBinder token, boolean finishing, int configChanges,
+ boolean getNonConfigInstance, String reason);
/** Pause the activity. */
- public abstract void handlePauseActivity(@NonNull ActivityClientRecord r, boolean finished,
- boolean userLeaving, int configChanges, PendingTransactionActions pendingActions,
- String reason);
+ public abstract void handlePauseActivity(IBinder token, boolean finished, boolean userLeaving,
+ int configChanges, PendingTransactionActions pendingActions, String reason);
/**
* Resume the activity.
- * @param r Target activity record.
+ * @param token Target activity token.
* @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(@NonNull ActivityClientRecord r,
- boolean finalStateRequest, boolean isForward, String reason);
+ public abstract void handleResumeActivity(IBinder token, boolean finalStateRequest,
+ boolean isForward, String reason);
/**
* Notify the activity about top resumed state change.
- * @param r Target activity record.
+ * @param token Target activity token.
* @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(@NonNull ActivityClientRecord r,
+ public abstract void handleTopResumedActivityChanged(IBinder token,
boolean isTopResumedActivity, String reason);
/**
* Stop the activity.
- * @param r Target activity record.
+ * @param token Target activity token.
* @param configChanges Activity configuration changes.
* @param pendingActions Pending actions to be used on this or later stages of activity
* transaction.
@@ -130,40 +127,38 @@ public abstract class ClientTransactionHandler {
* request for a transaction.
* @param reason Reason for performing this operation.
*/
- public abstract void handleStopActivity(@NonNull ActivityClientRecord r, int configChanges,
+ public abstract void handleStopActivity(IBinder token, 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(@NonNull ActivityClientRecord r, boolean start);
+ public abstract void performRestartActivity(IBinder token, boolean start);
/** Set pending activity configuration in case it will be updated by other transaction item. */
- public abstract void updatePendingActivityConfiguration(@NonNull ActivityClientRecord r,
+ public abstract void updatePendingActivityConfiguration(IBinder activityToken,
Configuration overrideConfig);
/** Deliver activity (override) configuration change. */
- public abstract void handleActivityConfigurationChanged(@NonNull ActivityClientRecord r,
+ public abstract void handleActivityConfigurationChanged(IBinder activityToken,
Configuration overrideConfig, int displayId);
/** Deliver result from another activity. */
- public abstract void handleSendResult(
- @NonNull ActivityClientRecord r, List<ResultInfo> results, String reason);
+ public abstract void handleSendResult(IBinder token, List<ResultInfo> results, String reason);
/** Deliver new intent. */
- public abstract void handleNewIntent(
- @NonNull ActivityClientRecord r, List<ReferrerIntent> intents);
+ public abstract void handleNewIntent(IBinder token, List<ReferrerIntent> intents);
/** Request that an activity enter picture-in-picture. */
- public abstract void handlePictureInPictureRequested(@NonNull ActivityClientRecord r);
+ public abstract void handlePictureInPictureRequested(IBinder token);
/** Perform activity launch. */
- public abstract Activity handleLaunchActivity(@NonNull ActivityClientRecord r,
+ public abstract Activity handleLaunchActivity(ActivityThread.ActivityClientRecord r,
PendingTransactionActions pendingActions, Intent customIntent);
/** Perform activity start. */
- public abstract void handleStartActivity(@NonNull ActivityClientRecord r,
+ public abstract void handleStartActivity(IBinder token,
PendingTransactionActions pendingActions);
/** Get package info. */
@@ -181,7 +176,7 @@ public abstract class ClientTransactionHandler {
* Get {@link android.app.ActivityThread.ActivityClientRecord} instance that corresponds to the
* provided token.
*/
- public abstract ActivityClientRecord getActivityClient(IBinder token);
+ public abstract ActivityThread.ActivityClientRecord getActivityClient(IBinder token);
/**
* Prepare activity relaunch to update internal bookkeeping. This is used to track multiple
@@ -196,7 +191,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 ActivityClientRecord prepareRelaunchActivity(IBinder token,
+ public abstract ActivityThread.ActivityClientRecord prepareRelaunchActivity(IBinder token,
List<ResultInfo> pendingResults, List<ReferrerIntent> pendingNewIntents,
int configChanges, MergedConfiguration config, boolean preserveWindow);
@@ -205,15 +200,14 @@ 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(@NonNull ActivityClientRecord r,
+ public abstract void handleRelaunchActivity(ActivityThread.ActivityClientRecord r,
PendingTransactionActions pendingActions);
/**
* Report that relaunch request was handled.
- * @param r Target activity record.
+ * @param token Target activity token.
* @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(@NonNull ActivityClientRecord r,
- PendingTransactionActions pendingActions);
+ public abstract void reportRelaunch(IBinder token, PendingTransactionActions pendingActions);
}