[automerger skipped] Change InputWindowInfo::isTrustedOverlay() to be permission and flag based. am: 39bc6117dd am: 8bec11e493 -s ours am: 139309f468 -s ours am: e250f28a52 -s ours am: 5e6b3a1440 -s ours am: dc97a9093a -s ours

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

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

Change-Id: Ie5ff97f0d3cbed30bcc26b7146bf111b723b7baa