Commit Graph

106410 Commits

Author SHA1 Message Date
Ameer Armaly
db5409ae02 [DO NOT MERGE] Bring back touch events for double tap and double tap and hold. am: 9e83d07824
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11955493

Change-Id: If4f1c944a4d2560a0e5835544883a8625a31d83f
2020-06-23 22:26:18 +00:00
Nikita Dubrovsky
470f2a61e2 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: I91a52520004d9e41d582a4ee66c2f34d8785e383
2020-06-23 19:11:35 +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
0d5c10c25d 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: If49aa26ead8225934190414193b96e5ea85114cd
2020-06-23 17:51:36 +00:00
TreeHugger Robot
e11fa9a741 Merge "Clear inline suggestions before onFinishInput" into rvc-dev 2020-06-23 17:49:19 +00:00
Jeff Sharkey
157bd31af9 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: I2c67138e54e1fb6c5149317c960a2727aef64e98
2020-06-23 16:22:56 +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
99722aad6d 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: Idc8047b94dfdd52bd719a2a4b711b2d654fd1a56
2020-06-23 11:59:08 +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
f771bf5301 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: I8f32e4d6109277b36303fe1c3b1a94d49040a34b
2020-06-23 07:11:19 +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
aea41aec2b Merge "Disable restricted bucket." into rvc-dev am: 6cca001863
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11740346

Change-Id: If3eb3f5bcb9b99e3bed7f89ba03048bb8f7d3f05
2020-06-23 00:18:30 +00:00
Jing Ji
341fd0c6c7 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: I88b40ce6b018492e4e329e06c9718aa55dd76ca7
2020-06-23 00:17:00 +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
0880adf50a 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: I75960fdfde95eb786b612aa911853d6cd2501b54
2020-06-22 21:13:11 +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
Ameer Armaly
9e83d07824 [DO NOT MERGE] Bring back touch events for double tap and double tap and hold.
Bug: 159168795
Test: atest TouchExplorerTest
Change-Id: I427b98c71ce8a2ac5b9285b2f34c1864f48c4a32
2020-06-22 13:58:51 -07:00
Michael Groover
b9e3d1a84c 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: I627d3015c0e2cad832a8fd9926fc2079241bd9cd
2020-06-22 19:31:31 +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
808f341a17 Merge "Fix InsetsConsumer leak" into rvc-dev am: 296855fe76
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11935094

Change-Id: Ifa5a992cdfd575ddde442f1e7df4ceb5c6a786c3
2020-06-22 19:13:14 +00:00
Taran Singh
296855fe76 Merge "Fix InsetsConsumer leak" into rvc-dev 2020-06-22 18:53:20 +00:00
Hongwei Wang
4cac31dde3 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: Ic4d994aa3635098e269dc3e198a96ad84f976910
2020-06-22 18:27:57 +00:00
Hongwei Wang
997150ee0a Merge "Updates enterPictureInPicture API doc" into rvc-dev 2020-06-22 18:14:10 +00:00
Treehugger Robot
adeef01787 Merge "A2DP: Check AAC bitrate mode by its CodecSpecific1" am: bdc57bef81 am: bb606cfc11
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1207444

Change-Id: I0e6cab7597bbdf12292feb7c5b8a03bcd05df7f8
2020-06-22 17:59:33 +00:00
Treehugger Robot
bdc57bef81 Merge "A2DP: Check AAC bitrate mode by its CodecSpecific1" 2020-06-22 17:22:54 +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
d3a0198031 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: I44a6add590bdc70b99201a2c0e517d0815b8f9b5
2020-06-22 15:01:26 +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
b234c0a600 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: I8fc36dcc5d7a1769e302735a1a613356329926ff
2020-06-22 08:25:18 +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
35b794f35e 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: I9eb11d6ad4f4583269811ba77e8aa4b76f17c3e0
2020-06-22 03:18:55 +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
a6426587e0 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: Ia0a513bb6b827f41deffa9af9e2603b422b15122
2020-06-21 23:14:06 +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
e90e845c1c 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: I26e9cda9554f917122ba9df96c851409677c5ba8
2020-06-20 17:19:08 +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
04fb24d142 Merge changes I4fdf368e,Ibc6be890 into rvc-dev am: 48dc192499
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11932511

Change-Id: I31c9b6250db94def939b3e7a13eeab6e7b527808
2020-06-20 00:08:10 +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
7a2dfd3422 [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: Ie0520c407c27112a05049ef6627528e204ffdff2
2020-06-19 22:40:39 +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