Loading core/java/android/widget/Editor.java +3 −3 Original line number Diff line number Diff line Loading @@ -3721,9 +3721,9 @@ public class Editor { public void show() { super.show(); final long durationSinceCutOrCopy = SystemClock.uptimeMillis() - TextView.LAST_CUT_OR_COPY_TIME; if (durationSinceCutOrCopy < RECENT_CUT_COPY_DURATION) { final long durationSinceLastCutCopyOrTextChanged = SystemClock.uptimeMillis() - TextView.sLastCutCopyOrTextChangedTime; if (durationSinceLastCutCopyOrTextChanged < RECENT_CUT_COPY_DURATION) { startSelectionActionModeWithoutSelection(); } Loading core/java/android/widget/TextView.java +6 −4 Original line number Diff line number Diff line Loading @@ -292,8 +292,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener // New state used to change background based on whether this TextView is multiline. private static final int[] MULTILINE_STATE_SET = { R.attr.state_multiline }; // System wide time for last cut or copy action. static long LAST_CUT_OR_COPY_TIME; // System wide time for last cut, copy or text changed action. static long sLastCutCopyOrTextChangedTime; /** * @hide Loading Loading @@ -8005,6 +8005,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * through a thunk. */ void sendAfterTextChanged(Editable text) { sLastCutCopyOrTextChangedTime = 0; if (mListeners != null) { final ArrayList<TextWatcher> list = mListeners; final int count = list.size(); Loading Loading @@ -9291,7 +9293,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } } stopSelectionActionMode(); LAST_CUT_OR_COPY_TIME = 0; sLastCutCopyOrTextChangedTime = 0; } } Loading @@ -9311,7 +9313,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener ClipboardManager clipboard = (ClipboardManager) getContext(). getSystemService(Context.CLIPBOARD_SERVICE); clipboard.setPrimaryClip(clip); LAST_CUT_OR_COPY_TIME = SystemClock.uptimeMillis(); sLastCutCopyOrTextChangedTime = SystemClock.uptimeMillis(); } /** Loading Loading
core/java/android/widget/Editor.java +3 −3 Original line number Diff line number Diff line Loading @@ -3721,9 +3721,9 @@ public class Editor { public void show() { super.show(); final long durationSinceCutOrCopy = SystemClock.uptimeMillis() - TextView.LAST_CUT_OR_COPY_TIME; if (durationSinceCutOrCopy < RECENT_CUT_COPY_DURATION) { final long durationSinceLastCutCopyOrTextChanged = SystemClock.uptimeMillis() - TextView.sLastCutCopyOrTextChangedTime; if (durationSinceLastCutCopyOrTextChanged < RECENT_CUT_COPY_DURATION) { startSelectionActionModeWithoutSelection(); } Loading
core/java/android/widget/TextView.java +6 −4 Original line number Diff line number Diff line Loading @@ -292,8 +292,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener // New state used to change background based on whether this TextView is multiline. private static final int[] MULTILINE_STATE_SET = { R.attr.state_multiline }; // System wide time for last cut or copy action. static long LAST_CUT_OR_COPY_TIME; // System wide time for last cut, copy or text changed action. static long sLastCutCopyOrTextChangedTime; /** * @hide Loading Loading @@ -8005,6 +8005,8 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener * through a thunk. */ void sendAfterTextChanged(Editable text) { sLastCutCopyOrTextChangedTime = 0; if (mListeners != null) { final ArrayList<TextWatcher> list = mListeners; final int count = list.size(); Loading Loading @@ -9291,7 +9293,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener } } stopSelectionActionMode(); LAST_CUT_OR_COPY_TIME = 0; sLastCutCopyOrTextChangedTime = 0; } } Loading @@ -9311,7 +9313,7 @@ public class TextView extends View implements ViewTreeObserver.OnPreDrawListener ClipboardManager clipboard = (ClipboardManager) getContext(). getSystemService(Context.CLIPBOARD_SERVICE); clipboard.setPrimaryClip(clip); LAST_CUT_OR_COPY_TIME = SystemClock.uptimeMillis(); sLastCutCopyOrTextChangedTime = SystemClock.uptimeMillis(); } /** Loading