Remove lock of getLockTaskModeState

The state field is declared as volatile. And the field is always
written on display thread without lock. So it is unnecessary to
lock the getter method.

Bug: 173467481
Test: CtsWindowManagerDeviceTestCases
Change-Id: I6324f6745fd849438b7b0d326bd63bd2d0580421
This commit is contained in:
Riddle Hsu
2020-12-11 22:08:29 +08:00
parent a72217f738
commit 0e08c81e98

View File

@@ -2538,9 +2538,7 @@ public class ActivityTaskManagerService extends IActivityTaskManager.Stub {
@Override
public int getLockTaskModeState() {
synchronized (mGlobalLock) {
return getLockTaskController().getLockTaskModeState();
}
return getLockTaskController().getLockTaskModeState();
}
@Override