Skip to content

Commit

Permalink
Revert "remove logging"
Browse files Browse the repository at this point in the history
This reverts commit e43e849.
  • Loading branch information
GaryQian committed Apr 7, 2020
1 parent a834764 commit 1dd29ed
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -135,19 +135,22 @@ public Editable getEditable() {
@Override
public boolean beginBatchEdit() {
mBatchCount++;
Log.e("flutter", " # beg " + mBatchCount);
return super.beginBatchEdit();
}

@Override
public boolean endBatchEdit() {
boolean result = super.endBatchEdit();
mBatchCount--;
Log.e("flutter", " # end " + mBatchCount);
updateEditingState();
return result;
}

@Override
public boolean commitText(CharSequence text, int newCursorPosition) {
Log.e("flutter", "commitText");
boolean result = super.commitText(text, newCursorPosition);
markDirty();
updateEditingState();
Expand All @@ -156,6 +159,7 @@ public boolean commitText(CharSequence text, int newCursorPosition) {

@Override
public boolean deleteSurroundingText(int beforeLength, int afterLength) {
Log.e("flutter", "deleteSurroundingText");
if (Selection.getSelectionStart(mEditable) == -1) return true;

boolean result = super.deleteSurroundingText(beforeLength, afterLength);
Expand All @@ -174,6 +178,7 @@ public boolean deleteSurroundingTextInCodePoints(int beforeLength, int afterLeng

@Override
public boolean setComposingRegion(int start, int end) {
Log.e("flutter", "setComposingRegion(" + start + "," + end + ")");
boolean result = super.setComposingRegion(start, end);
markDirty();
updateEditingState();
Expand All @@ -182,6 +187,7 @@ public boolean setComposingRegion(int start, int end) {

@Override
public boolean setComposingText(CharSequence text, int newCursorPosition) {
Log.e("flutter", "setComposingText(" + text + "," + newCursorPosition + ")");
boolean result;
if (text.length() == 0) {
result = super.commitText(text, newCursorPosition);
Expand All @@ -195,11 +201,13 @@ public boolean setComposingText(CharSequence text, int newCursorPosition) {

@Override
public boolean finishComposingText() {
Log.e("flutter", "finishComposingText");
boolean result = super.finishComposingText();

// Apply Samsung hacks. Samsung caches composing region data strangely, causing text
// duplication.
if (isSamsung) {
Log.e("flutter", "finishComposingText: Samsung hacks");
if (Build.VERSION.SDK_INT >= 21) {
// Samsung keyboards don't clear the composing region on finishComposingText.
// Update the keyboard with a reset/empty composing region. Critical on
Expand Down Expand Up @@ -256,6 +264,7 @@ private boolean isSamsung() {

@Override
public boolean setSelection(int start, int end) {
Log.e("flutter", "setSelection");
boolean result = super.setSelection(start, end);
markDirty();
updateEditingState();
Expand All @@ -280,6 +289,7 @@ private static int clampIndexToEditable(int index, Editable editable) {

@Override
public boolean sendKeyEvent(KeyEvent event) {
Log.e("flutter", "sendKeyEvent(" + event + ")");
markDirty();
if (event.getAction() == KeyEvent.ACTION_DOWN) {
if (event.getKeyCode() == KeyEvent.KEYCODE_DEL) {
Expand Down Expand Up @@ -406,6 +416,7 @@ public boolean sendKeyEvent(KeyEvent event) {

@Override
public boolean performContextMenuAction(int id) {
Log.e("flutter", "performContextMenuAction(" + id + ")");
markDirty();
if (id == android.R.id.selectAll) {
setSelection(0, mEditable.length());
Expand Down

0 comments on commit 1dd29ed

Please sign in to comment.