[automerger skipped] Change InputWindowInfo::isTrustedOverlay() to be permission and flag based. am: 39bc6117dd am: 020dd044a6 -s ours am: 5d53e37fe0 -s ours am: 6baa59fcbf -s ours am: 6558e1f39c -s ours

am skip reason: Merged-In I58cf9f38c496e0ae8b2193dca45c0805e831bc9e with SHA-1 39bc6117dd is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/native/+/15975347

Change-Id: I0ec0c7632b283146ba8e8ea1757cc9a1b2693cd1