summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator_test.cpp
diff options
context:
space:
mode:
authorSvet Ganov <svetoslavganov@google.com>2016-07-26 11:41:42 -0700
committerSvetoslav Ganov <svetoslavganov@google.com>2016-08-01 11:46:02 -0700
commitdc24f937b031f5f4e153dbfeaa51e96415a09b71 (patch)
treefdfddcf8359f3931bfd6a118bd6471d844916c79 /tools/aapt2/java/JavaClassGenerator_test.cpp
parent94ae1e739fd84a308609fff3b913d0963900ed6e (diff)
Prevent apps to overlay other apps via toast windows
It was possible for apps to put toast type windows that overlay other apps which toast winodws aren't removed after a timeout. Now for apps targeting SDK greater than N MR1 to add a toast window one needs to have a special token. The token is added by the notificatoion manager service only for the lifetime of the shown toast and is then removed including all windows associated with this token. This prevents apps to add arbitrary toast windows. Since legacy apps may rely on the ability to directly add toasts we mitigate by allowing these apps to still add such windows for unlimited duration if this app is the currently focused one, i.e. the user interacts with it then it can overlay itself, otherwise we make sure these toast windows are removed after a timeout like a toast would be. We don't allow more that one toast window per UID being added at a time which prevents 1) legacy apps to put the same toast after a timeout to go around our new policy of hiding toasts after a while; 2) modern apps to reuse the passed token to add more than one window; Note that the notification manager shows toasts one at a time. bug:30150688 Change-Id: Icc8f8dbd060762ae1a7b1720e96c5afdb8aff3fd
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator_test.cpp')
0 files changed, 0 insertions, 0 deletions