Add the check for UID presence to Display#hasAccess()

It would be nice if there is a common & reliable method for both outer
& internal modules to check the UID presense of the display.

Add more check in Display#hasAccess() to ask system if calling UID can
precense on the specific display, to consolidate only few special UIDs
& display flag checking.

Bug: 117347985
Test: atest ActivityManagerMultiDisplayTests
Change-Id: I2f8989598c99c0962e925c5aa65500972b4fc62b
9 files changed