Skip to content
Commit b8728418 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Remove ActivityRecord#okToShowLocked

ActivityRecord#showToCurrentUser also checks show-for-all-users flag
and current user/profile, so replace it by showToCurrentUser() that
will be consistent with the condition for window.

This eliminates unnecessary clearing binder identity and massive
invocations to StorageManagerService that acquires another lock.
In general the check becomes 10x faster.

The encryption check was added in commit 8558ec7d. Since start process
is changed to async, and the lock in handling user switch and
activities are separated, the recursive restart case no longer happens.
So it can be removed now.

Bug: 193661576
Test: atest RootWindowContainerTests
Test: Create a profile user with credential.
      Launch some activities of the profile user.
      Invoke UserManager#evictCredentialEncryptionKey and observe
      there should be no crash and exception from apps.

Change-Id: If088cf1712c7f784826ccbcf6c38aeff84f22e7e
parent 34ea03d9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment