Prevents screenshot layer from dismissing IME. am: 36ca72c6c2

am: 4e6d496674

Change-Id: Ica057285c78c0c67183e1e50f7d22a7e684214e2
This commit is contained in:
Muyuan Li
2016-08-08 18:01:55 +00:00
committed by android-build-merger
2 changed files with 4 additions and 1 deletions

View File

@@ -636,7 +636,7 @@ public interface WindowManager extends ViewManager {
/** /**
* Window type: shares similar characteristics with {@link #TYPE_DREAM}. The layer is * 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 * @hide
*/ */
public static final int TYPE_SCREENSHOT = FIRST_SYSTEM_WINDOW + 36; public static final int TYPE_SCREENSHOT = FIRST_SYSTEM_WINDOW + 36;

View File

@@ -2310,6 +2310,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
attrs.privateFlags &= ~WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD; attrs.privateFlags &= ~WindowManager.LayoutParams.PRIVATE_FLAG_KEYGUARD;
} }
break; break;
case TYPE_SCREENSHOT:
attrs.flags |= WindowManager.LayoutParams.FLAG_NOT_FOCUSABLE;
break;
} }
if (attrs.type != TYPE_STATUS_BAR) { if (attrs.type != TYPE_STATUS_BAR) {