summaryrefslogtreecommitdiff
path: root/core/java/android/app/ClientTransactionHandler.java
diff options
context:
space:
mode:
authorAndrii Kulian <akulian@google.com>2019-10-17 23:11:54 -0700
committerAndrii Kulian <akulian@google.com>2020-01-08 15:29:57 -0800
commitb9faa03b905abe3a630491ce0c768328757910cd (patch)
tree5595d5094151a5d39a92fa7fc73cb6e135fea45d /core/java/android/app/ClientTransactionHandler.java
parent9e87abdcda1e378a6ac58562c4483bbb4e8d87ac (diff)
Use START/STOP messages to update visibility
Activity visibility messages simply move the activity to STOPPED or STARTED state. We can use the lifecycle messages to do the same and simplify the logic/remove duplicated code. This CL also removes the option to send STOP message without making the client invisible and actually calling onStop(). This option caused a mismatch of the state between server (STOPPED) and client (PAUSED). Also, in cases when the device was going to sleep, STOP message was always followed by SLEEP message, which called onStop() anyway. Bug: 137329632 Bug: 129750406 Test: AM/WM CTS and unit tests Change-Id: I487575520ce301bb2f65519f0c0a30b6b9edac0c
Diffstat (limited to 'core/java/android/app/ClientTransactionHandler.java')
-rw-r--r--core/java/android/app/ClientTransactionHandler.java8
1 files changed, 2 insertions, 6 deletions
diff --git a/core/java/android/app/ClientTransactionHandler.java b/core/java/android/app/ClientTransactionHandler.java
index f9a689a7e1de..d2235f10da99 100644
--- a/core/java/android/app/ClientTransactionHandler.java
+++ b/core/java/android/app/ClientTransactionHandler.java
@@ -119,7 +119,6 @@ public abstract class ClientTransactionHandler {
/**
* Stop the activity.
* @param token Target activity token.
- * @param show Flag indicating whether activity is still shown.
* @param configChanges Activity configuration changes.
* @param pendingActions Pending actions to be used on this or later stages of activity
* transaction.
@@ -127,7 +126,7 @@ public abstract class ClientTransactionHandler {
* request for a transaction.
* @param reason Reason for performing this operation.
*/
- public abstract void handleStopActivity(IBinder token, boolean show, int configChanges,
+ public abstract void handleStopActivity(IBinder token, int configChanges,
PendingTransactionActions pendingActions, boolean finalStateRequest, String reason);
/** Report that activity was stopped to server. */
@@ -161,15 +160,12 @@ public abstract class ClientTransactionHandler {
/** Request that an activity enter picture-in-picture. */
public abstract void handlePictureInPictureRequested(IBinder token);
- /** Update window visibility. */
- public abstract void handleWindowVisibility(IBinder token, boolean show);
-
/** Perform activity launch. */
public abstract Activity handleLaunchActivity(ActivityThread.ActivityClientRecord r,
PendingTransactionActions pendingActions, Intent customIntent);
/** Perform activity start. */
- public abstract void handleStartActivity(ActivityThread.ActivityClientRecord r,
+ public abstract void handleStartActivity(IBinder token,
PendingTransactionActions pendingActions);
/** Get package info. */