Show Toast on applying SensitiveContentProtection
This happens on two paths: * Window already visible: When the SensitiveContentProtection system service adds a new window/app into the protected list, find all visible windows and Toast for any that are protected. This also covers the case where projection is started after the window is visible. * Window becomes visible: Notify WMS and Toast if the window is in the protected list. We can't reuse the approach taken for recording detection callbacks to listen for visibility changes since that works at an app-level, while we need window-level visibility events. Also the new approach handles non-Activity windows. The logic is kept in WMS since it holds both the protected list and the visibility of windows. Additionally, this works better for applying the Toast to FLAG_SECURE windows in the future (for a consistent UX). Fixes: 323580163 Test: manual - for both login and otp-app hiding: trigger protection after window is shown; minimize app and re-open. Test: manual - send OTP to bubble conversation and expand bubble Test: atest CtsSensitiveContentProtectionTestCases Change-Id: If6628b445d6351160c66ff89411f798ce44bf770
Showing
- core/res/res/values/strings.xml 3 additions, 0 deletionscore/res/res/values/strings.xml
- core/res/res/values/symbols.xml 2 additions, 1 deletioncore/res/res/values/symbols.xml
- data/etc/core.protolog.pb 0 additions, 0 deletionsdata/etc/core.protolog.pb
- services/core/java/com/android/server/wm/WindowManagerService.java 35 additions, 0 deletions...core/java/com/android/server/wm/WindowManagerService.java
- services/core/java/com/android/server/wm/WindowState.java 4 additions, 0 deletionsservices/core/java/com/android/server/wm/WindowState.java
Loading
Please register or sign in to comment