Skip to content
Commit 2f91fbf9 authored by Bernardo Rufino's avatar Bernardo Rufino
Browse files

Window Z rule for closing the notification shade

We found a few use-cases where the app was displaying a window on top of
the notification shade and wanted to start an activity as a result of
user interaction. In order to show the activity to the user, the app
closes the notification shade using Intent.ACSD. For example, the
accessibility menu (b/119653645) and the IME when replying to a
notification inline (b/74180647), which makes it stay above the shade.

Since these apps already have the privilege to show windows on top of
the shade (because they are doing so), they could already prevent the
user from accessing the shade, so we can allow them to close the shade.
So, exempting this use-case from Intent.ACSD restrictions for apps w/
targetSdk < S.

For targetSdk S+, we don't want apps to be using Intent.ACSD and we
judged that the valid use-case to close the shade is tied to the
activity start. So, in S, we'll automatically close the shade for apps
in that situtation on activity start.

Bug: 159105552
Test: CTS coming
Test: 1. As an a11y service, display a11y windows and send Intent.ACSD
      2. Verify it collapses the shade
      3. Deactivate the service and verify Intent.ACSD doesn't close the
      shade
Test: 1. As an a11y service, display a11y windows and start an activity
      2. Verify the shade is closed
      3. Deactivate the service and verify the shade is not closed when
      activity is started
Change-Id: I783610c1b56739e2926fe9db0c941d40f74121ae
parent d09c22c4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment