Commit Graph

8627 Commits

Author SHA1 Message Date
Nikita Dubrovsky
ceccd33e9a Merge "Fix double-tap detection in TextView's SelectionModifierCursorController" into rvc-dev am: 2d4921d1f5 am: fc434c9308 am: 23f005c365 am: 7d20f8a8ac
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11959987

Change-Id: I01a97796cceaaedd17be7d04eca17bfe2d075123
2020-06-23 20:05:53 +00:00
Nikita Dubrovsky
7d20f8a8ac Merge "Fix double-tap detection in TextView's SelectionModifierCursorController" into rvc-dev am: 2d4921d1f5 am: fc434c9308 am: 23f005c365
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11959987

Change-Id: I66493550b84b8f26e465a08540a36a8ed6f1beff
2020-06-23 19:40:35 +00:00
Nikita Dubrovsky
e97b0ecadc Fix double-tap detection in TextView's SelectionModifierCursorController
This restores the logic removed from SelectionModifierCursorController
in ag/9994946. A quick sequence of "tap", "drag", "tap" events (such
as when quickly scrolling a small input field) should *not* be treated
as a double-tap.

Bug: 158948887
Test: Manual and unit tests
  atest FrameworksCoreTests:EditorTouchStateTest
  atest FrameworksCoreTests:EditorCursorDragTest
Change-Id: I9fb9cb06b1e208946566a0f70697c62ee7684ca0
2020-06-22 17:14:03 -07:00
TreeHugger Robot
596e2ab468 Merge "Apply max char length when setSingleLine is called." 2020-06-18 19:47:17 +00:00
Yuncheol Heo
a6845a1447 Merge "Gets the userId from Context for AccessibilityManager in ToastPresenter." into rvc-dev am: c53014cbf6 am: b5d47c488c am: 3c73242952 am: 20b4c2c341
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11898404

Change-Id: Ibcf4a0c29bcfb1c7586a5cd44f7e883f6878bfae
2020-06-18 18:12:51 +00:00
Seigo Nonaka
459f35ac86 Apply max char length when setSingleLine is called.
Bug: 145128646
Test: atest android.widget.cts.EditTextTest
Change-Id: I1f2fd6c97c5cdeb7be5017d4c6aeb19fd269e939
2020-06-18 10:55:17 -07:00
Yuncheol Heo
b5d47c488c Merge "Gets the userId from Context for AccessibilityManager in ToastPresenter." into rvc-dev am: c53014cbf6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11898404

Change-Id: I260b328315eff02019436bcc12f1b718bf9ac407
2020-06-18 17:41:38 +00:00
Yuncheol Heo
c53014cbf6 Merge "Gets the userId from Context for AccessibilityManager in ToastPresenter." into rvc-dev 2020-06-18 17:29:13 +00:00
TreeHugger Robot
6e298bdc1a Merge "Make underlying SurfaceView respect visibility of InlineContentView." into rvc-dev am: f2ba813a62 am: a2252bc324 am: 98abb1ca57 am: f5b4f3d54b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11855564

Change-Id: Ic8b9e6fb398c60328d20b5ffb899cce0f5004df0
2020-06-17 23:35:36 +00:00
Yuncheol Heo
a3ad557655 Gets the userId from Context for AccessibilityManager in ToastPresenter.
- In Android Auto, android.widget.cts.ToastTest#testShow_whenTextToast_sendsAccessibilityEvent failed is failed, since AccessibilityManager in ToastPresenter is initialized with the wrong userId.
- ToastUI creates the Context from the uid of the received message, so we can get the correct userId from the Context.

Bug: 154644563
Test: atest android.widget.cts29.ToastTest android.widget.cts.ToastTest
      android.server.wm.ToastWindowTest ToastUITest
      NotificationManagerServiceTest LegacyToastTest
Change-Id: I138620a0a52e65429157719f588c4be56b075368
2020-06-17 22:53:43 +00:00
TreeHugger Robot
a2252bc324 Merge "Make underlying SurfaceView respect visibility of InlineContentView." into rvc-dev am: f2ba813a62
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11855564

Change-Id: Iac0b9cda3fd33d60a4d97661c21935beafb88f04
2020-06-17 22:51:55 +00:00
Qi (wangqi) Wang
d0292964f3 Make underlying SurfaceView respect visibility of InlineContentView.
SurfaceView doesn't respect its ancestor's visibility change, so we need
a OnPreDrawListener listener to update it according to visibility change
in the view hierarchy.

Bug: 158714351

Test: verified locally

Change-Id: I7d6a7db48e037ed7d4ec2ecb23a158e8d1c43240
2020-06-12 18:53:34 -07:00
Automerger Merge Worker
5730eabbd6 Merge "Merge "Disable language logging in TextClassifier/TranslateEvent" into rvc-dev am: 934df62467 am: 57c56e91d8" into rvc-d1-dev-plus-aosp am: f0a6ee9ad7 am: a78f532c70
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11744901

Change-Id: Iae910dac6f6a0f1da47b47dacef3d5bb082f9b8b
2020-06-11 17:38:38 +00:00
Abodunrinwa Toki
8156fb251a Merge "Disable language logging in TextClassifier/TranslateEvent" into rvc-dev am: 934df62467 am: 57c56e91d8
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11744901

Change-Id: Ic4a05b570af049f5f821c24d8a357c4b797bdf84
2020-06-11 17:16:38 +00:00
Abodunrinwa Toki
45100c7c7a Merge "Disable language logging in TextClassifier/TranslateEvent" into rvc-dev am: 934df62467
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11744901

Change-Id: I4529c03f482eeb2741f127fdd7b6cc434ba9909e
2020-06-11 17:16:04 +00:00
Abodunrinwa Toki
934df62467 Merge "Disable language logging in TextClassifier/TranslateEvent" into rvc-dev 2020-06-11 16:40:13 +00:00
TreeHugger Robot
e114dc0ce8 Merge "Fix NPE in InlineContentView" into rvc-dev am: 854b0d1a89 am: cc2d440d90 am: aa9b18aadf am: d57f28de3b
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11784246

Change-Id: I7cb7bfd398755b78bb1371743356ad0587fc2d1f
2020-06-09 04:35:41 +00:00
TreeHugger Robot
aa9b18aadf Merge "Fix NPE in InlineContentView" into rvc-dev am: 854b0d1a89 am: cc2d440d90
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11784246

Change-Id: I2eacf1d3ef55fc80bcee86331fed062e20adc66c
2020-06-09 04:09:59 +00:00
TreeHugger Robot
a2b71f725c Merge "Fix NPE in InlineContentView" into rvc-dev am: 854b0d1a89
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11784246

Change-Id: I243379817566a7ba433f4fdb5f6840fe6e4039b3
2020-06-09 03:50:01 +00:00
Feng Cao
10e6217a8d Fix NPE in InlineContentView
* The NPE is due to in the InlineContentView we try to reparent the
  surface view which is no longer attached to the window, this can
  happen if the InlineContentView is attached to window and then
  immediately detached from the window, before the surface package
  is returned from the remote view process.
* Release the surface package immediately in this case, so the
  remote view can be released.

Test: atest android.autofillservice.cts.inline
Bug: 158139090

Change-Id: I9efdf8ba182a1d66334362edcfb6ba58fcdc222a
2020-06-08 18:52:21 -07:00
Tony Mak
a67cba7381 Disable language logging in TextClassifier/TranslateEvent
Bug: 158481016
Test: atest android.widget.cts.TextViewTest
Test: atest tests/tests/textclassifier/src/android/view/textclassifier/cts
Change-Id: I7e9ea69f67858714a7fd3b0d06ad1b88000999e0
2020-06-08 17:54:47 +00:00
Mihai Popa
f956fa9727 Merge "Remove reduntant variable" am: 5241a207fb am: 202dd72169 am: 7bd1fc8b4e am: f824d9bd81 am: a37b1a65df
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1318280

Change-Id: I0d3076f2bb8f89df33a02d8fbbe0cea77ef980da
2020-06-05 22:47:56 +00:00
Mihai Popa
7bd1fc8b4e Merge "Remove reduntant variable" am: 5241a207fb am: 202dd72169
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1318280

Change-Id: Ie8bd86ae505cddb133844c6808b1e9e3cba5e32b
2020-06-05 22:24:14 +00:00
Seigo Nonaka
3d6153d0ab Merge "Set upper-limit for the single line edit text." 2020-06-04 03:44:40 +00:00
Seigo Nonaka
9140d2b2e3 Set upper-limit for the single line edit text.
Bug: 145128646
Test: atest EditTextTest#testSingleLineMaxLength
Change-Id: I32b28dcc8c18386839b5adea5b73c77896036567
2020-06-02 15:34:28 -07:00
jiajia tang
3dfd84718d Remove reduntant variable
Magnifier#mDestroyLock was introduced by below change:
Idf0373ab0d5033d56da0f6f45d7d953f7e796813

Then related code was removed by below change:
Ia4c75b5b997e0ed94d5a3814dd4507a8fffa124d
With this change, Magnifier#mDestroyLock becomes redundant,
useless lock.

This change intends to remove this redundant lock.

Change-Id: Ifa3f83f8953a3d992e26a952d9ac2f3343b0dc9e
Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
2020-05-28 16:45:40 +08:00
Shu Chen
967e14f9a7 Makes the line slop ratio configurable.
Bug: 157187942
Test: locally verfied.
Change-Id: I9d7f4e21bc22800350b35cbee8dbcf445f55eb1f
2020-05-21 11:26:32 +08:00
Tetsutoki Shiozawa
18a6c10e71 [ProgressBar] Fix: Media volume bar indicates a wrong value
Symptom:
Media volume bar shows non-zero value even during the mute state.

Root cause:
A request for updating progress of ProgressBar has 2 kind of updating
ways, animated and non-animated. If a non-animated request is invoked
before completing an animated request, the visual progress can be
overwritten by the old animated request. As a result, the visual
progress value becomes different from the actual value.

Solution:
A running animation on the primary progress should be canceled
before handling a new non-animated request.

Bug: 148759348
Test: atest CtsWidgetTestCases:ProgressBarTest
Merged-In: I569dbea4c6346ecfff8141d8378b4952fb1fa530
Change-Id: I569dbea4c6346ecfff8141d8378b4952fb1fa530
(cherry picked from commit 589552766c)
2020-05-18 20:41:18 +00:00
Tetsutoki Shiozawa
2e2664fa50 [ProgressBar] Fix: Media volume bar indicates a wrong value
Symptom:
Media volume bar shows non-zero value even during the mute state.

Root cause:
A request for updating progress of ProgressBar has 2 kind of updating
ways, animated and non-animated. If a non-animated request is invoked
before completing an animated request, the visual progress can be
overwritten by the old animated request. As a result, the visual
progress value becomes different from the actual value.

Solution:
A running animation on the primary progress should be canceled
before handling a new non-animated request.

Bug: 148759348
Test: atest CtsWidgetTestCases:ProgressBarTest
Change-Id: I569dbea4c6346ecfff8141d8378b4952fb1fa530
Merged-In: I569dbea4c6346ecfff8141d8378b4952fb1fa530
2020-05-18 18:29:40 +00:00
Automerger Merge Worker
707bea8340 Merge "Merge "Revert tab key behavior on multiline EditTexts." into rvc-dev am: 4d857ccce5 am: 2980d35ee8 am: 6d3158bd91" into rvc-qpr-dev-plus-aosp am: 94db0b39b0
Change-Id: I1aebbcdaf3000acd10a440b4a528f455b8a98c22
2020-05-13 23:17:02 +00:00
Yuichiro Hanada
93ec9b85e5 Revert tab key behavior on multiline EditTexts.
This CL reverts ag/10267783 effectively.
ag/10267783 makes tab key insert \t character on multiline text fields,
however, it broke the existing apps which depends on the previous
behavior.

Bug: 154290658
Test: manual - Tab key on multiline text fields advance focus
Test: atest TextViewTest#testKeyNavigation
Change-Id: I9836ce29321ca789bce6636514ce9a8dbf923ada
2020-05-13 21:26:36 +09:00
Feng Cao
571fa86530 Merge "Support re-attaching the inline suggestion view to window" into rvc-dev am: 254545cae5 am: f9748230fd am: 35c8ea2a8b am: 9c116694b4
Change-Id: Ic8bdf26c2194d779d9d313d8cfb30b65857064c4
2020-05-07 06:15:23 +00:00
Feng Cao
b46851c964 Support re-attaching the inline suggestion view to window
* Before this change, when the inline suggestion view is detached from
  the IME window (e.g. due to layout change), the remote view content
  will not show again even after the view is reattached to the window
  on the IME side. This patch fixes it by requesting the remote view
  owner (the ext services) for a new SurfacePackage when the view is
  re-attached to the window (see javadoc of SurfaceControlViewHost for
  why this works).
* This patch also fixes the issue where the SurfaceControlViewHost was
  never released in the ext services. This is done by notifying the
  ext services (through system server) when the view is detached from
  the IME window, and then the system server will release the
  SurfaceControlViewHost if after N(=500) ms the view is not re-attached
  to a window.
* After the SurfaceControlViewHost is released, if the view is
  re-attached to the window later, a new SurfaceControlViewHost will be
  created to back the same InlineContentView.
* The current code structure also lays a foundation for a subsequent
  change to allow reusing the same remote view for inline suggestions
  during filtering.

Test: atest CtsAutofillServiceTestCases (sanity test)

Bug: 153615023
Bug: 154683107

Change-Id: Idc587e1e82a96b792c351796464821b7aad7cd89
2020-05-06 19:30:39 -07:00
Andrew Sapperstein
8fe35e5f21 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Exempt-From-Owner-Approval: cherry-picked from master
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
Merged-In: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
(cherry picked from commit e0624c7a40)
2020-05-01 18:25:32 +00:00
TreeHugger Robot
755e3dfafb Merge "Update the documentation for inline suggestion APIs" into rvc-dev am: d725389a55 am: e27ed6a551 am: de871487f3 am: e54bdc1509
Change-Id: I6b3e5fcc212a27e89d7660c752a4babb68b9dbd1
2020-05-01 02:30:17 +00:00
TreeHugger Robot
d725389a55 Merge "Update the documentation for inline suggestion APIs" into rvc-dev 2020-05-01 01:42:05 +00:00
Andrew Sapperstein
6b1e3188a3 Merge "Fix broken @see tags in public documentation." 2020-05-01 00:27:47 +00:00
TreeHugger Robot
940913056d Merge "Use TextClassicationSession to call smart selection APIs." into rvc-dev am: 5630dc86ed am: ff16872e06 am: b4af13b8b7 am: 6e458dac55
Change-Id: I5205e8372aa74b6f86f922985d07b52c33bdc0c0
2020-04-29 19:14:30 +00:00
TreeHugger Robot
5630dc86ed Merge "Use TextClassicationSession to call smart selection APIs." into rvc-dev 2020-04-29 17:34:09 +00:00
TYM Tsai
e79aa09f87 Update the documentation for inline suggestion APIs
Update the APIs documentation and add test cases

Bug: 152316540
Test: atest InlinePresentationStyleUtilsTest
Change-Id: Icff5d5b36fecd94ceb7db5446eefa16b4b1aac3b
2020-04-29 17:21:01 +08:00
TreeHugger Robot
6a0db46054 Merge "Move ImeAwareTextEdit from Settings to android.widget" into rvc-dev am: d3b000cafe am: 04ef13f4d6 am: 24ba41099a am: 91be4c0266
Change-Id: I67ab36d2bf9f29b28722dc3708bab32b6befc894
2020-04-29 06:20:50 +00:00
Kevin Chyn
412bd81933 Move ImeAwareTextEdit from Settings to android.widget
Also use it for AuthCredentialPasswordView

Bug: 154161590

Test: BiometricPromptDemo, authenticate with password
Change-Id: I17601848dd9be3d0580988e3ff613c3793dfed51
2020-04-28 18:06:25 -07:00
Andrew Sapperstein
e0624c7a40 Fix broken @see tags in public documentation.
These were previously being suppressed by doclava but with this change,
all failures are fixed and the suppression logic has been removed.

To fix the issues, there were a few possible changes made:
- broken reference to a public API (such as incorrect parameters): fixed
- unnecessary @link inside an @see tag: fixed
- @see referring to an @hide or @SystemApi: reference removed
- broken references to inner class constructors
 - worked around by fully qualifying the constructor

Bug: 6963924
Test: make doc-comment-check-docs
Change-Id: Ifbdce2de96cdffa560bd90f549fa7184d1f9af85
2020-04-28 12:37:15 -07:00
Nikita Dubrovsky
bed2294074 Merge "Add debug logging for RichContentReceiver" 2020-04-27 22:46:56 +00:00
Aran Ink
1dfa9f62af Merge "Add dismissImmediate to ListPopupWindow to prevent window leaks in GlobalActionsDialog." into rvc-dev am: 82e9872732 am: 1b6a93a2a3 am: fcc722dbf9 am: a75662e33d
Change-Id: I1143cf6d75ff7b34a11fba2618a8df9d03b724db
2020-04-27 18:40:20 +00:00
Aran Ink
d397b9084d Add dismissImmediate to ListPopupWindow to prevent window leaks in GlobalActionsDialog.
Fixes: 154640131
Test: Manual -- Use 'adb shell dumpsys window windows || grep "PopupWindow"' to confirm number of PopupWindows displayed (should be zero at home screen.)
Open GlobalActions. Tap the power overflow menu and check number of PopupWindows while the overflow dropdown is visible (should be 1).
Put the phone to sleep by pressing the power button. Wake phone and make sure number of PopupWindows is 0.
Repeat with Controls structure switcher dropdown and add controls dropdown.

Change-Id: I4ae2d86e981465e8e6c0adf924a6fc2eabfc88ee
2020-04-24 18:06:14 -04:00
Tony Mak
6f4e063edb Use TextClassicationSession to call smart selection APIs.
We used to use TextClassicationSession to send us logging only (i.e.
onSelectionEvent()). Now we use TCSession to call smart selection APIs
(i.e. suggestSelection and classifyText). This allows the TCS to
obtain the session ID in onSuggestSelection and onClassifyText.

BUG: 149077320

Test: atest TextViewActivityTest
Test: Try a few smart selections and log the sessionID of each TC APIs.

Change-Id: I320249735aa08fb7e8612060955b2aa5496da94b
2020-04-24 12:35:48 +01:00
TYM Tsai
41447be309 Merge "Filter the content of the Bundles used as extras and styling APIs" into rvc-dev am: 4ddfdaf641 am: 5c913aeacc am: 6cce28ebbc am: 009fb7ec44
Change-Id: I4d317f36033a59baf9001f7017ffd3beffc20c2b
2020-04-24 09:49:21 +00:00
TYM Tsai
4ddfdaf641 Merge "Filter the content of the Bundles used as extras and styling APIs" into rvc-dev 2020-04-24 08:42:56 +00:00
TreeHugger Robot
4ec82fdd06 Merge "Process numpad enter key along with enter key." into rvc-dev am: b22931a0fb am: eb9484cc55 am: 5fdaabbacd am: f3bca3a0d4
Change-Id: Ibca91a0e7ecc8943b8cf6bd0b687048b6f9b8791
2020-04-23 02:01:43 +00:00