Fix testRelaunchConfigurationChangedWhileBecomingVisible flakiness
The #getOccludingActivityAbove should stop searching occluding once reached the given boundary. It didn't stop searching due to the given activity was a translucent activity. Bug: 195493245 Test: atest ActivityLifecycleTests Change-Id: Idb16a5477650ba1113be0c07a98c40933a256ebc
This commit is contained in:
@@ -2969,14 +2969,15 @@ class Task extends TaskFragment {
|
||||
@Nullable
|
||||
ActivityRecord getOccludingActivityAbove(ActivityRecord activity) {
|
||||
final ActivityRecord top = getActivity(r -> {
|
||||
if (!r.occludesParent()) {
|
||||
return false;
|
||||
}
|
||||
if (r == activity) {
|
||||
// Reached the given activity, return the activity to stop searching.
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!r.occludesParent()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
TaskFragment parent = r.getTaskFragment();
|
||||
if (parent == activity.getTaskFragment()) {
|
||||
// Found it. This activity on top of the given activity on the same TaskFragment.
|
||||
|
||||
Reference in New Issue
Block a user