Prevents screenshot layer from dismissing IME.
Add code to adjustWindowLw to force the flag FLAG_NOT_FOCUSABLE to be set for layer type TYPE_SCREENSHOT. Bug: 30485483 Change-Id: I11725eb89fda59b6d50fa1700845cdfe9ffb930b
This commit is contained in:
@@ -636,7 +636,7 @@ public interface WindowManager extends ViewManager {
|
||||
|
||||
/**
|
||||
* Window type: shares similar characteristics with {@link #TYPE_DREAM}. The layer is
|
||||
* reserved for screenshot region selection.
|
||||
* reserved for screenshot region selection. These windows must not take input focus.
|
||||
* @hide
|
||||
*/
|
||||
public static final int TYPE_SCREENSHOT = FIRST_SYSTEM_WINDOW + 36;
|
||||
|
||||
@@ -2229,6 +2229,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
|
||||
attrs.privateFlags &= ~WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD;
|
||||
}
|
||||
break;
|
||||
case TYPE_SCREENSHOT:
|
||||
attrs.flags |= WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
|
||||
break;
|
||||
}
|
||||
|
||||
if (attrs.type != TYPE_STATUS_BAR) {
|
||||
|
||||
Reference in New Issue
Block a user