[automerger skipped] Change InputWindowInfo::isTrustedOverlay() to be permission and flag based. am: 39bc6117dd am: 020dd044a6 -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: Iac9f5d211d7ab954ab94d8824917b621044f3d54