Change InputWindowInfo::isTrustedOverlay() to be permission and flag based.

Add private flag to WindowManager.LayoutParams. If the flag is set,
check if caller has INTERNAL_SYSTEM_WINDOW permission.

Bug: 155781676
Bug: 196389741
Test: atest WindowManagerServiceTests
Change-Id: I58cf9f38c496e0ae8b2193dca45c0805e831bc9e
Merged-In: I58cf9f38c496e0ae8b2193dca45c0805e831bc9e
3 files changed