Apply top scheduling group for non-occluded freeform app
Give a higher priority if the freeform task of an app is almost not
occluded by other freeform task.
Assume 3 freeform tasks:
The top 2 tasks will have top shed group.
If the 3rd task is not occluded by the top 2 tasks, the 3rd task will
also have top shed group. But if the area of 3rd task has 10% area
occluded by the top 2 tasks, its shed group will down to multi-window.
Bug: 200769420
Test: atest RootWindowContainerTests#testTaskLayerRankFreeform
Test: Resize/move freeform and check
adb shell dumpsys activity oom | grep TOP
Flag: com.android.window.flags.process_priority_policy_for_multi_window_mode
Change-Id: If9510f83ccb16e59dcad9cef5f94792711d7cfa0
6 files changed