Loading packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java +14 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.inputmethod.InputMethodManager; import com.android.printspooler.R; /** Loading Loading @@ -301,6 +302,7 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis mSummaryContent.setLayerType(View.LAYER_TYPE_HARDWARE, null); mDraggableContent.setLayerType(View.LAYER_TYPE_HARDWARE, null); mMoreOptionsContainer.setLayerType(View.LAYER_TYPE_HARDWARE, null); ensureImeClosedAndInputFocusCleared(); } if ((mDragProgress > 0 && progress == 0) || (mDragProgress < 1.0f && progress == 1.0f)) { Loading Loading @@ -351,6 +353,18 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis } } private void ensureImeClosedAndInputFocusCleared() { View focus = findFocus(); if (focus != null) { InputMethodManager imm = (InputMethodManager) mContext.getSystemService( Context.INPUT_METHOD_SERVICE); if (imm.isActive(focus)) { imm.hideSoftInputFromWindow(getWindowToken(), 0); } focus.clearFocus(); } } private final class DragCallbacks extends ViewDragHelper.Callback { @Override public boolean tryCaptureView(View child, int pointerId) { Loading Loading
packages/PrintSpooler/src/com/android/printspooler/widget/PrintContentView.java +14 −0 Original line number Diff line number Diff line Loading @@ -22,6 +22,7 @@ import android.util.AttributeSet; import android.view.MotionEvent; import android.view.View; import android.view.ViewGroup; import android.view.inputmethod.InputMethodManager; import com.android.printspooler.R; /** Loading Loading @@ -301,6 +302,7 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis mSummaryContent.setLayerType(View.LAYER_TYPE_HARDWARE, null); mDraggableContent.setLayerType(View.LAYER_TYPE_HARDWARE, null); mMoreOptionsContainer.setLayerType(View.LAYER_TYPE_HARDWARE, null); ensureImeClosedAndInputFocusCleared(); } if ((mDragProgress > 0 && progress == 0) || (mDragProgress < 1.0f && progress == 1.0f)) { Loading Loading @@ -351,6 +353,18 @@ public final class PrintContentView extends ViewGroup implements View.OnClickLis } } private void ensureImeClosedAndInputFocusCleared() { View focus = findFocus(); if (focus != null) { InputMethodManager imm = (InputMethodManager) mContext.getSystemService( Context.INPUT_METHOD_SERVICE); if (imm.isActive(focus)) { imm.hideSoftInputFromWindow(getWindowToken(), 0); } focus.clearFocus(); } } private final class DragCallbacks extends ViewDragHelper.Callback { @Override public boolean tryCaptureView(View child, int pointerId) { Loading