Determine if the activity is the topmost one

ActivityStack#mTopActivityOccludesKeyguard may be
incorrectly updated by a non-top activity.

Bug: 149837574
Test: start emergency dialer from lockscreen
Change-Id: I830e572f008cbebb95f0d76416c70d948063dd97
This commit is contained in:
Louis Chang
2020-04-09 13:15:34 +08:00
parent 0f82965251
commit d73abe2bbf

View File

@@ -7355,7 +7355,8 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
}
final ActivityStack stack = getRootTask();
return stack != null &&
stack.checkKeyguardVisibility(this, true /* shouldBeVisible */, true /* isTop */);
stack.checkKeyguardVisibility(this, true /* shouldBeVisible */,
stack.topRunningActivity() == this /* isTop */);
}
void setTurnScreenOn(boolean turnScreenOn) {