Commit Graph

105097 Commits

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

Change-Id: Ib03c02c0846e1deb1a92b793f3564a649a71ff52
2020-06-23 19:11:40 +00:00
Nikita Dubrovsky
2d4921d1f5 Merge "Fix double-tap detection in TextView's SelectionModifierCursorController" into rvc-dev 2020-06-23 18:59:38 +00:00
TreeHugger Robot
b1fc28b4f5 Merge "Clear inline suggestions before onFinishInput" into rvc-dev am: e11fa9a741
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11920284

Change-Id: Id1ab2bc96a48a67295cba553e80e49fca740d39c
2020-06-23 17:51:17 +00:00
TreeHugger Robot
e11fa9a741 Merge "Clear inline suggestions before onFinishInput" into rvc-dev 2020-06-23 17:49:19 +00:00
Jeff Sharkey
1939ad73cf Merge "Override MIME type to match MediaStore behavior." into rvc-dev am: 38a6333ff6
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11962282

Change-Id: I505d035b203dfeb4433c192d2ca32b38a9064cfe
2020-06-23 16:23:06 +00:00
Jeff Sharkey
38a6333ff6 Merge "Override MIME type to match MediaStore behavior." into rvc-dev 2020-06-23 15:56:44 +00:00
Jeff Sharkey
83aaf908a6 Override MIME type to match MediaStore behavior.
Internally, DownloadManager synchronizes its contents with MediaStore,
which relies heavily on using file extensions to determine MIME types.

To prevent these two databases from getting confused, this change
adjusts DownloadManager to force the MIME type of already-completed
downloads based on the file extension, matching what MediaStore does.

Bug: 159594536
Test: atest PublicApiAccessTest#testAddCompletedWithoutExtension
Change-Id: I60c613eafcfe55007dffcac2d7d1fe375b753c19
2020-06-23 07:13:13 -06:00
Issei Suzuki
34e1bd049d Merge "Update virtual display size before turning it on." into rvc-dev am: 16868fbef0
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11931082

Change-Id: I4500631c4873ff564ba7cf5cab04de8a93c1416f
2020-06-23 11:58:54 +00:00
Issei Suzuki
16868fbef0 Merge "Update virtual display size before turning it on." into rvc-dev 2020-06-23 11:46:16 +00:00
Adrian Roos
ba68b71a5c Merge "IME animation: hide IME-related navbar icons until perceptible" into rvc-dev am: e658c76b5c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11837615

Change-Id: I0aa4d62d6b03a108060c3d74cc260cc63d3297ee
2020-06-23 07:11:17 +00:00
Adrian Roos
e658c76b5c Merge "IME animation: hide IME-related navbar icons until perceptible" into rvc-dev 2020-06-23 07:06:48 +00:00
Kweku Adams
0be5b82868 Merge "Disable restricted bucket." into rvc-dev am: 6cca001863
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11740346

Change-Id: Icec5e338a99b3e9650054810b9acebc138a4617e
2020-06-23 00:18:28 +00:00
Jing Ji
7298b685dd Merge "Fix memory leak in StrictMode violation throttling" into rvc-dev am: 471ef84e33
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11902484

Change-Id: Ie1fdf6c77d35c113b8a22502e41b18c2cd963934
2020-06-23 00:16:15 +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
Kweku Adams
6cca001863 Merge "Disable restricted bucket." into rvc-dev 2020-06-23 00:13:41 +00:00
Jing Ji
471ef84e33 Merge "Fix memory leak in StrictMode violation throttling" into rvc-dev 2020-06-23 00:04:49 +00:00
Feng Cao
908126d4a7 Clear inline suggestions before onFinishInput
* The problem with sending empty response to IME is that the IME
  may want to handle the following two cases differently:
  a) all suggestions are filtered out due to user typing: ime may
     want to immediately delete the existing suggestions to make
     place for other types of things, such as IME's own word
     completion or next word prediction.
  b) the current input connection is finished and a new connection
     will be created with the same field or a different field:
     ime may want to delay removing the suggestions so that if there
     is new inline suggestions coming soon after for the next
     connection, the UI transition can be smoothed out by skipping
     the gap of deleting the old suggestions and showing the new
     suggestions.
* We used to rely on the IME impl to clear the suggestions when input
  is finished. That was done to give the IME the flexibility to
  smooth out the UI updates. Otherwise in case the input connection
  is finished and immediately started again on the same field,
  and there is another non-empty suggestion coming after short after,
  it would cause UI flicker. Because the suggsetion chips would
  disappear for a short moment and then appear again.
* The previously implemented solution was to have the IME impl post a
  delayed deletion of the suggestions when onFinishInput is called.
* In this patch, we get around this issue by synchronously clearing
  the inline suggestions right before the onFinishInput. Then the
  IME impl can post a callback to the main thread to do the actual
  delection. And in the callback it can check whether onFinishInput
  and onStartInput was called right before to determine whether
  it needs to delay the delection or delete immediately.
* Also done in this patch is to clear existing inline suggestions,
  if any, before IME creating a new callback connection to the
  framework.

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

Change-Id: I6fd5d294cf8676a24b8576ea554824608672ce49
2020-06-22 16:52:39 -07:00
Jing Ji
6985fb39f0 Fix memory leak in StrictMode violation throttling
* Add hashCode() to the base Violation class for dup detections
* Discard obsoleted violation fingerprints if possible

Bug: 159128771
Bug: 159626227
Test: run cts -m CtsOsTestCases -t android.os.cts.StrictModeTest
Test: Manual - Loop generation of StrictMode violations
Test: Manual - Check heap dump
Change-Id: I19a0922fe010fad97b6b819e73acb7db08f84930
2020-06-22 14:22:32 -07:00
TreeHugger Robot
35d7e8ba30 Merge "Revert non-API changes to not throw UserOperationException any more" into rvc-dev am: 960e49335a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11859726

Change-Id: I197377de583563a9aca85b8837443ed3c735109e
2020-06-22 21:13:27 +00:00
TreeHugger Robot
960e49335a Merge "Revert non-API changes to not throw UserOperationException any more" into rvc-dev 2020-06-22 21:05:23 +00:00
Michael Groover
64baddcb32 Merge "Update docs for methods that require subscriberId" into rvc-dev am: 2bcb70322c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11932150

Change-Id: I310f0ac101c670b251a3cbf07408d3d7033d72c5
2020-06-22 19:31:46 +00:00
Michael Groover
2bcb70322c Merge "Update docs for methods that require subscriberId" into rvc-dev 2020-06-22 19:30:10 +00:00
Taran Singh
85ba727a85 Merge "Fix InsetsConsumer leak" into rvc-dev am: 296855fe76
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11935094

Change-Id: Ib75a41ed810e430ba302cfca1fd2043f1d3941af
2020-06-22 19:13:18 +00:00
Taran Singh
296855fe76 Merge "Fix InsetsConsumer leak" into rvc-dev 2020-06-22 18:53:20 +00:00
Hongwei Wang
b1d028531b Merge "Updates enterPictureInPicture API doc" into rvc-dev am: 997150ee0a
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/10961377

Change-Id: I800000c876df75cac0d736b73f1daf99e545492b
2020-06-22 18:28:47 +00:00
Hongwei Wang
997150ee0a Merge "Updates enterPictureInPicture API doc" into rvc-dev 2020-06-22 18:14:10 +00:00
Taran Singh
531404721f Fix InsetsConsumer leak
Activity was still referred from ImeInsetsSourceConsumer after
ViewRootImpl's mView was destroyed when ViewRoot's surface is cleared
using die signal.
This CL makes sure we still free-up resources at die signal.

Fix: 157955883
Test: atest NexusLauncherTests
Change-Id: Ia48f7b7a8cf6b867ce75b2b7393a60ba73b0c3d0
2020-06-22 15:32:47 +00:00
TreeHugger Robot
2d8df39d7c Merge "Ignore onStartInput when WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR" into rvc-dev am: 70ad33113f
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11863061

Change-Id: If8d0a8fc85b7c595665d6b6cfe1cc8d31889fb67
2020-06-22 14:59:51 +00:00
Adrian Roos
c22eec9d35 IME animation: hide IME-related navbar icons until perceptible
During transitions and while the IME is controlled by the app,
the IME may be "visible" as far as the IME framework is concerned,
but not actually perceptible by the user due to offsets or alpha
applied to the leash.

This may lead to out-of-place navbar symbols for the IME, especially
in gesture nav.

To avoid this, the ImeInsetsSourceConsumer now notifies the IMF of
whether it has made the IME unperceptible to the user.

For now, we ignore the cases where the IME is controlled by something
other than the client window - in that case, we just revert to the
previous behavior of it being always considered perceptible.

Fixes: 158079255
Test: manual, launch email compose activity, observe that back button only indicates once IME appears
Test: atest InsetsAnimationControlImplTest
Change-Id: I4dc9d6513d0559156f7da39244f3fc5ebc952ed4
2020-06-22 16:55:54 +02:00
TreeHugger Robot
70ad33113f Merge "Ignore onStartInput when WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR" into rvc-dev 2020-06-22 14:51:15 +00:00
Stanislav Zholnin
113387f309 Merge "Prevent developer provided strings from being uploaded through statsd." into rvc-dev am: 7a65a7a37c
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11930479

Change-Id: Iccfaf0a632131722b130b932796a0386fa5bd559
2020-06-22 08:25:11 +00:00
Stanislav Zholnin
7a65a7a37c Merge "Prevent developer provided strings from being uploaded through statsd." into rvc-dev 2020-06-22 08:10:52 +00:00
Ming-Shin Lu
48bfc3165c Ignore onStartInput when WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR
CL[1] introduces new WINDOW_FOCUS_GAIN_REPORT_ONLY flows to notify
InputMethodService only reports IME input target to WM when focusing to
the next window and its input connection remains.

Originally in android Q and prior devices, we don't need such report
mechnism but just skip to start new input connection and ignore
onStartInput / onFinishInput for the above use case.

Since starts from Android R, new IME insets control APIs relying on this
mechanism (see CL[2]) to keep the actual IME input target up-to-date.

As we expected there should be no new input connection and additional
onFinishInput when CL[1] landed.

However, in IMMS, startInputUncheckedLocked will be called
to callback additional onStartInput for InputMethodService, which mostly
is not expected, except when focusing the same window after device
turned screen on, we need to start input and callback onStartInput to
align with the behavior of android Q or the prior platform.

Besides, to have more clear code logic and debugging concept of
ignoring onStartInput and onFinishInput only when focused the same editor
with input connection remains, we remove WINDOW_FOCUS_GAIN_REPORT_ONLY
reason and introduced 2 more start input reasons to distinguish the
different behavior:
    - WINDOW_FOCUS_GAIN_REPORT_WITH_SAME_EDITOR
    - WINDOW_FOCUS_GAIN_REPORT_WITHOUT_EDITOR

[1]: I45a9814d812ad906f417c24200fd4219959e2423
[2]: I9e8984b7e5aa989a53ece9e2576393f795b9ef94

Fix: 158624922
Test: atest FocusHandlingTest InputMethodStartInputLifecycleTest
Test: manual as below steps:
    1. Use Gboard, Open the emoji keyboard
    2. Swipe down to reveal notification shade
    3. Swipe up to dismiss notifications
    4. Expect the Emoji keyboard is still open without close

Change-Id: I2da99ae67b9ce4051dec0c0f0e975ebe6e1ab118
2020-06-22 12:22:33 +08:00
TreeHugger Robot
ba0db734e6 Merge "Revert "Fix transition return issues when more than 1 level depth"" into rvc-dev am: 48e9dc67f1
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11936460

Change-Id: Ib88c1bfe684cf8bab47fde2b8771a120bf659726
2020-06-22 03:18:35 +00:00
TreeHugger Robot
48e9dc67f1 Merge "Revert "Fix transition return issues when more than 1 level depth"" into rvc-dev 2020-06-22 03:04:37 +00:00
TreeHugger Robot
1a4d6dcd73 Merge "Camera: Adjust documentation and comments for insensitive language." into rvc-dev am: 8b3783c8e5
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11936406

Change-Id: I6378c940e5a94e9d2529a42f5b14130249bcb250
2020-06-21 23:14:10 +00:00
TreeHugger Robot
8b3783c8e5 Merge "Camera: Adjust documentation and comments for insensitive language." into rvc-dev 2020-06-21 22:53:21 +00:00
TreeHugger Robot
5208fccc52 Merge "Animate IME with zero insets" into rvc-dev am: cc498f3e69
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11829827

Change-Id: I6808eefe5773915286f641970f09970feb0a271a
2020-06-20 17:18:59 +00:00
Jeff Chang
79f5a49b3c Revert "Fix transition return issues when more than 1 level depth"
This reverts commit 6d834d86fb.

Reason for revert: <http://b/159230864 WhatsApp image is visible after existing a chat>
Bug: 159230864

Change-Id: Ib266cff2e06a82ae9a0e85142ef80ae00328a040
2020-06-20 06:09:04 +00:00
Taran Singh
4291410118 Animate IME with zero insets
When IME has zero insets, it doesn't map to any side and doesn't have
can't be animated.
IME can have zero insets in following cases:
1. Floating IME
2. Fullscreen IME (in landscape)
3. IME doesn't overlap with IME target window.

In order to animate a type, it must have insets. We can animate IME
from negative insets to zero and vice-versa. This makes zero insets IME a
special case of ISIDE_BOTTOM.
Deprecate SIDE_FLOATING because it shouldn't logically map to a side.

Fix: 153909316
Test: atest WindowInsetsAnimationImeTests#testZeroInsetsImeAnimates
Change-Id: I6d1d3430888db4632cb2f93e9042f692b35ebaeb
2020-06-20 03:51:00 +00:00
Michael Groover
f4f6a7adac Update docs for methods that require subscriberId
In Android 10 additional restrictions were required to access the
subscriberId. The NetworkStatsManager has several methods that accept
a subscriberId of the mobile network for which usage should be queried.
This commit updates the docs for these methods to reference the new
access restrictions and offer null as an option to obtain the usage
for all mobile networks.

Fixes: 157871064
Test: m docs
Change-Id: I95c730c9418fced6312eb3ba4e0d69e6299f3ded
2020-06-19 19:48:07 -07:00
TreeHugger Robot
6affc2707b Merge changes I4fdf368e,Ibc6be890 into rvc-dev am: 48dc192499
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11932511

Change-Id: I9e3ca572d985cd4486fd26eac54ff23670229cdb
2020-06-20 00:12:58 +00:00
TreeHugger Robot
48dc192499 Merge changes I4fdf368e,Ibc6be890 into rvc-dev
* changes:
  SurfaceControlViewHost: Release ViewRoot from finalizer
  SurfaceControlViewHost: Call doDie with true
2020-06-20 00:07:56 +00:00
Beth Thibodeau
b11486a94b [DO NOT MERGE] Support toggling resumption in Settings am: c1bc307bce
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11817534

Change-Id: Ib1a556d8e8a7d24d049d62f6628ab38163b21c79
2020-06-19 22:40:24 +00:00
Beth Thibodeau
ab9e7facdf Merge "[DO NOT MERGE] Support toggling resumption in Settings" into rvc-dev 2020-06-19 22:26:57 +00:00
Eino-Ville Talvala
14c753626e Camera: Adjust documentation and comments for insensitive language.
Test: Builds
Bug: 159480149
Change-Id: I0daadbfa6505339bdcec4a49c6e4577424832f75
2020-06-19 15:26:39 -07:00
TreeHugger Robot
4b94dff328 Merge "Save AsyncOps for later forwarding instead of SyncOps." into rvc-dev am: 7ec25249ab
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11913241

Change-Id: I464f47c0f6ff9b6977abac65675b3ab2bbda1b59
2020-06-19 21:43:04 +00:00
TreeHugger Robot
7ec25249ab Merge "Save AsyncOps for later forwarding instead of SyncOps." into rvc-dev 2020-06-19 21:29:40 +00:00
TreeHugger Robot
67d8e4ba14 Merge "Camera: Relax physical stream cropping behavior" into rvc-dev am: 08465447a2
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11457099

Change-Id: Ib9fc64d11cbc3efa8df08fcc0a422bdba677be88
2020-06-19 21:12:10 +00:00
TreeHugger Robot
08465447a2 Merge "Camera: Relax physical stream cropping behavior" into rvc-dev 2020-06-19 21:10:22 +00:00