OSDN Git Service

RESTRICT AUTOMERGE
authorSterling Huber <hubers@google.com>
Thu, 7 Nov 2019 19:04:03 +0000 (11:04 -0800)
committerManjae Park <manjaepark@google.com>
Mon, 16 Dec 2019 20:46:39 +0000 (12:46 -0800)
commit71509777b4c16f9e42fae92a287c4287a2fd9a06
tree36aea9b04ca0b336152c28823fd72a5ea31c0c56
parent52c2856394ac8010ff3eba09ee385709d510953b
RESTRICT AUTOMERGE
Make toasts non-clickable

Since enforcement was only on client-side, in Toast class, an app could
use reflection (or other means) to make the Toast clickable. This is a
security vulnerability since it allows tapjacking, that is, intercept touch
events and do stuff like steal PINs and passwords.

This CL brings the enforcement to the system by applying flag
FLAG_NOT_TOUCHABLE.

Test: Construct app that uses reflection to remove flag FLAG_NOT_TOUCHABLE and
      log click events. Then:
      1) Observe click events are logged without this CL.
      2) Observer click events are not logged with this CL.
Bug: 128674520

Change-Id: Ica346c853dcb9a1e494f7143ba1c38d22c0003d0
(cherry picked from commit 54e6a3c4fbf2eb70541932074ed650dcf22113ed)
services/core/java/com/android/server/policy/PhoneWindowManager.java