Search code examples
androidandroid-sourcedisplayq

AOSP: Disable default display


I'm trying to disable the default/built in display in AOSP. Is there a default flag i can enable/disable to achieve this?. Note: I am compiling Android 10.

I suspect his is possible because of a comment in /core/java/android/view/Display.java I tried removing the builtin or internal flags in frameworks/base/services/core/java/com/android/server/display/LocalDisplayAdapter.java but that causes DisplayManagerService to throw an exception onBootPhase. Any pointer is appreciated.


Solution

  • Workaround only since i couldn't find the actual place to disable it but this worked. In DisplayManager on the public Display[] getDisplays(String category) method i checked. If there's two displays, then ignore whatever display is not the default display. Terrible temporary workaround but this is my solution. Accepting until someone posts a better soltuion!