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

Remove WM lock from the path of service operations

The method WPC#areBackgroundFgsStartsAllowed may be called
frequently from ActiveServices when checking if foreground
service is allowed to start. Because it usually has no window
related operation, there should not have lock contention
from window manager.

This only changes to use fine grained lock and volatile fields.
The logic is the same as original.

Bug: 177268056
Test: BackgroundActivityLaunchTest ActivityRecordTests

Change-Id: Ia3ef5b436ff09ea0968776fa7c8ea86112e356d2
parent 8241f19a
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