[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 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: I1d1a87381dff68329f1d768f4a7274f1510a6201