Fix race between WM launching app and AMS freezer
If the next top activity is in cached and frozen mode, WM should raise its priority to unfreeze it. This is done by calling AMS.updateOomAdj that will lower its oom adj. However, WM cannot hold the AMS clock here so the updateOomAdj operation is performed in a separate thread asynchronously. Therefore WM can't guarantee AMS will unfreeze next top activity on time. This race will fail the following binder transactions WM sends to the activity. After this race issue between WM/ATMS and AMS is solved, this workaround can be removed. Bug: 213288355 Test: manual stress test, launching all installed apps in a loop Change-Id: I8ac781ee3faf5711984dab22063083e93217d46e
Loading
Please register or sign in to comment