From f3ae7ab1ea5c5fb098f38f200e602a833c61aaea Mon Sep 17 00:00:00 2001 From: Louis Chang Date: Tue, 20 Apr 2021 13:09:23 +0800 Subject: [PATCH] Fix the ActivityLifecycleTests#testLocalRecreate flakiness IACC#activityTopResumedStateLost was reported to ATMS later than IACC#activityPaused sometimes because one is one-way binder call while the other one is two-way binder. Also make IACC#activityTopResumedStateLost a two-way binder Bug: 185810414 Test: atest ActivityLifecycleTests Change-Id: Ib87de693f5ebcfd836208924aa8fc2a035ca7c82 --- core/java/android/app/IActivityClientController.aidl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/java/android/app/IActivityClientController.aidl b/core/java/android/app/IActivityClientController.aidl index ed4836e312092..09b0c2f96b136 100644 --- a/core/java/android/app/IActivityClientController.aidl +++ b/core/java/android/app/IActivityClientController.aidl @@ -37,7 +37,11 @@ import com.android.internal.policy.IKeyguardDismissCallback; interface IActivityClientController { oneway void activityIdle(in IBinder token, in Configuration config, in boolean stopProfiling); oneway void activityResumed(in IBinder token, in boolean handleSplashScreenExit); - oneway void activityTopResumedStateLost(); + /** + * This call is not one-way because {@link #activityPaused()) is not one-way, or + * the top-resumed-lost could be reported after activity paused. + */ + void activityTopResumedStateLost(); /** * Notifies that the activity has completed paused. This call is not one-way because it can make * consecutive launch in the same process more coherent. About the order of binder call, it