Allow WindowManager.TYPE_SCREENSHOT to be focusable
Pre-R, the screenshot window was used just for screenshot animation. In
R, the window is also hosting tappable screenshot actions, which require
focus.
This change modifies TYPE_SCREENSHOT to no longer force it to be
unfocusable.
Test: Verify that screenshot window UI elements can work with talkback
and accessibility scanner.
Bug: 153517161
Bug: 152583784
Change-Id: If81d9f94dff801c3483a2d834e692b4c77d80d7b
This commit is contained in:
@@ -1162,7 +1162,7 @@ public interface WindowManager extends ViewManager {
|
||||
|
||||
/**
|
||||
* Window type: shows directly above the keyguard. The layer is
|
||||
* reserved for screenshot region selection. These windows must not take input focus.
|
||||
* reserved for screenshot animation, region selection and UI.
|
||||
* In multiuser systems shows only on the owning user's window.
|
||||
* @hide
|
||||
*/
|
||||
|
||||
@@ -874,10 +874,6 @@ public class DisplayPolicy {
|
||||
}
|
||||
break;
|
||||
|
||||
case TYPE_SCREENSHOT:
|
||||
attrs.flags |= WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
|
||||
break;
|
||||
|
||||
case TYPE_TOAST:
|
||||
// While apps should use the dedicated toast APIs to add such windows
|
||||
// it possible legacy apps to add the window directly. Therefore, we
|
||||
|
||||
Reference in New Issue
Block a user