Consider only the top most stacks for visibility test
Bug: 69121908
Test: Open app in recents, then go home and open another app, turn screen
off and ensure the device does not start the home activity.
Change-Id: I814cf177247b7fbba79dbd9ec2600f30dee23054
This commit is contained in:
@@ -208,6 +208,8 @@ public class SystemServicesProxy {
|
||||
*
|
||||
* @param isHomeStackVisible if provided, will return whether the home stack is visible
|
||||
* regardless of the recents visibility
|
||||
*
|
||||
* TODO(winsonc): Refactor this check to just use the recents activity lifecycle
|
||||
*/
|
||||
public boolean isRecentsActivityVisible(MutableBoolean isHomeStackVisible) {
|
||||
if (mIam == null) return false;
|
||||
@@ -222,13 +224,13 @@ public class SystemServicesProxy {
|
||||
final WindowConfiguration winConfig = stackInfo.configuration.windowConfiguration;
|
||||
final int activityType = winConfig.getActivityType();
|
||||
final int windowingMode = winConfig.getWindowingMode();
|
||||
if (activityType == ACTIVITY_TYPE_HOME) {
|
||||
if (homeStackInfo == null && activityType == ACTIVITY_TYPE_HOME) {
|
||||
homeStackInfo = stackInfo;
|
||||
} else if (activityType == ACTIVITY_TYPE_STANDARD
|
||||
} else if (fullscreenStackInfo == null && activityType == ACTIVITY_TYPE_STANDARD
|
||||
&& (windowingMode == WINDOWING_MODE_FULLSCREEN
|
||||
|| windowingMode == WINDOWING_MODE_SPLIT_SCREEN_SECONDARY)) {
|
||||
fullscreenStackInfo = stackInfo;
|
||||
} else if (activityType == ACTIVITY_TYPE_RECENTS) {
|
||||
} else if (recentsStackInfo == null && activityType == ACTIVITY_TYPE_RECENTS) {
|
||||
recentsStackInfo = stackInfo;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user