Loading core/java/android/inputmethodservice/ExtractEditLayout.java +20 −4 Original line number Diff line number Diff line Loading @@ -16,9 +16,6 @@ package android.inputmethodservice; import com.android.internal.view.menu.MenuBuilder; import com.android.internal.view.menu.MenuPopupHelper; import android.content.Context; import android.util.AttributeSet; import android.view.ActionMode; Loading @@ -29,6 +26,9 @@ import android.view.View; import android.widget.Button; import android.widget.LinearLayout; import com.android.internal.view.menu.MenuBuilder; import com.android.internal.view.menu.MenuPopupHelper; /** * ExtractEditLayout provides an ActionMode presentation for the * limited screen real estate in extract mode. Loading Loading @@ -61,6 +61,22 @@ public class ExtractEditLayout extends LinearLayout { return null; } /** * @return true if an action mode is currently active. */ public boolean isActionModeStarted() { return mActionMode != null; } /** * Finishes a possibly started action mode. */ public void finishActionMode() { if (mActionMode != null) { mActionMode.finish(); } } @Override public void onFinishInflate() { super.onFinishInflate(); Loading Loading @@ -92,7 +108,7 @@ public class ExtractEditLayout extends LinearLayout { @Override public void setTitle(int resId) { // Title will nor be shown. // Title will not be shown. } @Override Loading core/java/android/inputmethodservice/InputMethodService.java +20 −3 Original line number Diff line number Diff line Loading @@ -637,6 +637,7 @@ public class InputMethodService extends AbstractInputMethodService { * configuration change happens. */ public void onInitializeInterface() { // Intentionally empty } void initialize() { Loading Loading @@ -876,8 +877,7 @@ public class InputMethodService extends AbstractInputMethodService { } if (changed) { onConfigureWindow(mWindow.getWindow(), isFullscreen, !mShowInputRequested); onConfigureWindow(mWindow.getWindow(), isFullscreen, !mShowInputRequested); mLastShowInputRequested = mShowInputRequested; } } Loading Loading @@ -1242,6 +1242,7 @@ public class InputMethodService extends AbstractInputMethodService { * same text field as before. */ public void onStartInputView(EditorInfo info, boolean restarting) { // Intentionally empty } /** Loading Loading @@ -1286,6 +1287,7 @@ public class InputMethodService extends AbstractInputMethodService { * same text field as before. */ public void onStartCandidatesView(EditorInfo info, boolean restarting) { // Intentionally empty } /** Loading Loading @@ -1455,6 +1457,7 @@ public class InputMethodService extends AbstractInputMethodService { * for the window has occurred (creating its views etc). */ public void onWindowShown() { // Intentionally empty } /** Loading @@ -1462,6 +1465,7 @@ public class InputMethodService extends AbstractInputMethodService { * after previously being visible. */ public void onWindowHidden() { // Intentionally empty } /** Loading @@ -1472,6 +1476,7 @@ public class InputMethodService extends AbstractInputMethodService { * and {@link #getCurrentInputConnection} return valid objects. */ public void onBindInput() { // Intentionally empty } /** Loading @@ -1481,6 +1486,7 @@ public class InputMethodService extends AbstractInputMethodService { * valid objects. */ public void onUnbindInput() { // Intentionally empty } /** Loading @@ -1496,6 +1502,7 @@ public class InputMethodService extends AbstractInputMethodService { * session with the editor. */ public void onStartInput(EditorInfo attribute, boolean restarting) { // Intentionally empty } void doFinishInput() { Loading Loading @@ -1570,6 +1577,7 @@ public class InputMethodService extends AbstractInputMethodService { * <p>The default implementation here does nothing. */ public void onDisplayCompletions(CompletionInfo[] completions) { // Intentionally empty } /** Loading Loading @@ -1626,6 +1634,7 @@ public class InputMethodService extends AbstractInputMethodService { * @param focusChanged true if the user changed the focused view by this click. */ public void onViewClicked(boolean focusChanged) { // Intentionally empty } /** Loading @@ -1634,6 +1643,7 @@ public class InputMethodService extends AbstractInputMethodService { * The default implementation does nothing. */ public void onUpdateCursor(Rect newCursor) { // Intentionally empty } /** Loading Loading @@ -1664,6 +1674,13 @@ public class InputMethodService extends AbstractInputMethodService { private boolean handleBack(boolean doIt) { if (mShowInputRequested) { if (isExtractViewShown() && mExtractView instanceof ExtractEditLayout) { ExtractEditLayout extractEditLayout = (ExtractEditLayout) mExtractView; if (extractEditLayout.isActionModeStarted()) { if (doIt) extractEditLayout.finishActionMode(); return true; } } // If the soft input area is shown, back closes it and we // consume the back key. if (doIt) requestHideSelf(0); Loading Loading
core/java/android/inputmethodservice/ExtractEditLayout.java +20 −4 Original line number Diff line number Diff line Loading @@ -16,9 +16,6 @@ package android.inputmethodservice; import com.android.internal.view.menu.MenuBuilder; import com.android.internal.view.menu.MenuPopupHelper; import android.content.Context; import android.util.AttributeSet; import android.view.ActionMode; Loading @@ -29,6 +26,9 @@ import android.view.View; import android.widget.Button; import android.widget.LinearLayout; import com.android.internal.view.menu.MenuBuilder; import com.android.internal.view.menu.MenuPopupHelper; /** * ExtractEditLayout provides an ActionMode presentation for the * limited screen real estate in extract mode. Loading Loading @@ -61,6 +61,22 @@ public class ExtractEditLayout extends LinearLayout { return null; } /** * @return true if an action mode is currently active. */ public boolean isActionModeStarted() { return mActionMode != null; } /** * Finishes a possibly started action mode. */ public void finishActionMode() { if (mActionMode != null) { mActionMode.finish(); } } @Override public void onFinishInflate() { super.onFinishInflate(); Loading Loading @@ -92,7 +108,7 @@ public class ExtractEditLayout extends LinearLayout { @Override public void setTitle(int resId) { // Title will nor be shown. // Title will not be shown. } @Override Loading
core/java/android/inputmethodservice/InputMethodService.java +20 −3 Original line number Diff line number Diff line Loading @@ -637,6 +637,7 @@ public class InputMethodService extends AbstractInputMethodService { * configuration change happens. */ public void onInitializeInterface() { // Intentionally empty } void initialize() { Loading Loading @@ -876,8 +877,7 @@ public class InputMethodService extends AbstractInputMethodService { } if (changed) { onConfigureWindow(mWindow.getWindow(), isFullscreen, !mShowInputRequested); onConfigureWindow(mWindow.getWindow(), isFullscreen, !mShowInputRequested); mLastShowInputRequested = mShowInputRequested; } } Loading Loading @@ -1242,6 +1242,7 @@ public class InputMethodService extends AbstractInputMethodService { * same text field as before. */ public void onStartInputView(EditorInfo info, boolean restarting) { // Intentionally empty } /** Loading Loading @@ -1286,6 +1287,7 @@ public class InputMethodService extends AbstractInputMethodService { * same text field as before. */ public void onStartCandidatesView(EditorInfo info, boolean restarting) { // Intentionally empty } /** Loading Loading @@ -1455,6 +1457,7 @@ public class InputMethodService extends AbstractInputMethodService { * for the window has occurred (creating its views etc). */ public void onWindowShown() { // Intentionally empty } /** Loading @@ -1462,6 +1465,7 @@ public class InputMethodService extends AbstractInputMethodService { * after previously being visible. */ public void onWindowHidden() { // Intentionally empty } /** Loading @@ -1472,6 +1476,7 @@ public class InputMethodService extends AbstractInputMethodService { * and {@link #getCurrentInputConnection} return valid objects. */ public void onBindInput() { // Intentionally empty } /** Loading @@ -1481,6 +1486,7 @@ public class InputMethodService extends AbstractInputMethodService { * valid objects. */ public void onUnbindInput() { // Intentionally empty } /** Loading @@ -1496,6 +1502,7 @@ public class InputMethodService extends AbstractInputMethodService { * session with the editor. */ public void onStartInput(EditorInfo attribute, boolean restarting) { // Intentionally empty } void doFinishInput() { Loading Loading @@ -1570,6 +1577,7 @@ public class InputMethodService extends AbstractInputMethodService { * <p>The default implementation here does nothing. */ public void onDisplayCompletions(CompletionInfo[] completions) { // Intentionally empty } /** Loading Loading @@ -1626,6 +1634,7 @@ public class InputMethodService extends AbstractInputMethodService { * @param focusChanged true if the user changed the focused view by this click. */ public void onViewClicked(boolean focusChanged) { // Intentionally empty } /** Loading @@ -1634,6 +1643,7 @@ public class InputMethodService extends AbstractInputMethodService { * The default implementation does nothing. */ public void onUpdateCursor(Rect newCursor) { // Intentionally empty } /** Loading Loading @@ -1664,6 +1674,13 @@ public class InputMethodService extends AbstractInputMethodService { private boolean handleBack(boolean doIt) { if (mShowInputRequested) { if (isExtractViewShown() && mExtractView instanceof ExtractEditLayout) { ExtractEditLayout extractEditLayout = (ExtractEditLayout) mExtractView; if (extractEditLayout.isActionModeStarted()) { if (doIt) extractEditLayout.finishActionMode(); return true; } } // If the soft input area is shown, back closes it and we // consume the back key. if (doIt) requestHideSelf(0); Loading