Commit Graph

16542 Commits

Author SHA1 Message Date
Adam He
50a637b1e5 Changed createOnDeviceTranslator to be asynchronous with callback.
Bug: 176208267
Test: atest CtsTranslationTestCases
Change-Id: Icedc953611e70dc208cbef54b4e459ebb0ccd5a9
2021-04-27 11:56:30 -07:00
TreeHugger Robot
ecfc497460 Merge "Async startInputOrWindowGainedFocus" into sc-dev 2021-04-26 19:06:26 +00:00
Ahaan Ugale
2434a92049 Merge "Translate: API for content padding." into sc-dev 2021-04-26 15:17:26 +00:00
Joanne Chung
5d1ebc4f96 Merge "API feedback: TranslationCapability APIs refinement." into sc-dev 2021-04-26 15:07:58 +00:00
Galia Peycheva
57ef720249 Merge "Use global setting instead of forceWindowBlurDisabled" into sc-dev 2021-04-26 11:42:49 +00:00
Joanne Chung
2fcdb2cf9f API feedback: TranslationCapability APIs refinement.
- updates APIs naming and uses Consumer<TranslationCapability>
  instead of PendingIntent
- Implements the propagating capability updates in the client side

Bug: 176208267
Test: manual.
Test: atest CtsTranslationTestCases

Change-Id: I171c908b529e2ef300e4bbd55c1565b33a25c1e5
2021-04-26 18:10:49 +08:00
Wilson Wu
5e2d9f271d Async startInputOrWindowGainedFocus
We ignore the result if startInputReason is
WINDOW_FOCUS_GAIN_REPORT_WITH_CONNECTION or
WINDOW_FOCUS_GAIN_REPORT_WITHOUT_CONNECTION
in startInputOrWindowGainedFocus.

Introduce USE_REPORT_WINDOW_GAINED_FOCUS_ASYNC
flag to control following behavior:

-. Don't wait the result if it only report the
   focus gain. Have another IPC for this case
   to prevent the UI thread be blocked.

-. Throw the exception to the client side if it
   happened.

Bug: 185928120
Test: atest CtsInputMethodTestCases
Change-Id: Ic584203c1221fbae17f5e2d8f09e3992df061646
2021-04-26 17:13:03 +08:00
Ahaan Ugale
8dc9a795e0 Translate: API for content padding.
This allows controlling the content padding behavior needed with some
apps for compatibility reasons.
(see I9d7db5d2bc200e4042baf3267796f00cfc298f19)

The flag is currently the only property in the new UiTranslationSpec
value type, but more properties can be added in the future (such as
animation specifications).

Bug: 179693024
Test: manual
CTS-Coverage-Bug: 182990474
Change-Id: I11052cddb59c928b22ad9ad16e3c9b092da4b907
2021-04-26 01:14:02 -07:00
Santos Cordon
e5dae0ddc5 Add listener for brightness-specific changes.
Add FLAG to registerDisplayListener method to receive
brightness-specific changes.

getBrightnessInfo() method added to
android.view.Display to get brightness value, min, max
and highBrightnessMode status.

Bug: 168210311
Bug: 171023136
Test: atest com.android.server.display
Change-Id: I581e86e039cc7cf1bbca4cf7af03daa41dbddfe0
2021-04-23 22:18:55 +01:00
Caitlin Cassidy
efaeb0c564 Merge "[Ongoing Call Chip] Don't show the chip on lockscreen." into sc-dev 2021-04-23 14:01:58 +00:00
Galia Peycheva
85bb3e4da0 Use global setting instead of forceWindowBlurDisabled
This CL removes the existing TestApi
WindowManager#setForceCrossWindowBlurDisabled and replaces it
with Settings.Global#ENABLE_WINDOW_BLURS.

Bug: 14186649
Test: m && atest BlurTests
Change-Id: Ia15b7932ea973a9ed195c507558cdc71f194b366
2021-04-23 11:13:43 +02:00
Louis Chang
1637653a78 Merge "Try fixing the flakiness of TaplTestsQuickstep#testSwitchToOverview" into sc-dev 2021-04-23 08:34:36 +00:00
Hongwei Wang
b899f626b6 Merge "Apply PictureInPictureSurfaceTransaction upon reparent" into sc-dev 2021-04-23 05:17:12 +00:00
TreeHugger Robot
60a6502567 Merge "Fix SurfaceView callback timings" into sc-dev 2021-04-23 03:47:30 +00:00
TreeHugger Robot
efc7e4c0f0 Merge "Add api to propagating translation capability updates." into sc-dev 2021-04-23 00:39:27 +00:00
Adam He
e5c140a59d Add api to propagating translation capability updates.
This change adda the apia in the TranslationService that allows to
update the TranslationCapability to the registered clients. This
change doesn't contain the register part in the TranslationManager,
the change will be done on the next change.

Bug: 176208267
Test: atest CtsTranslationTestCases
Test: manual verification
CTS-Coverage-Bug: 182990474

Change-Id: Iec7b3dc30f99985415162394d0e64d8e825ea5d9
2021-04-22 14:54:21 -07:00
Vishnu Nair
8685ce1dee Fix SurfaceView callback timings
In R we consolidated SetWindowStopped to use ViewRootImpl
surface changed callbacks. This affected the timings of when
the app would get SurfaceView SurfaceHolder callbacks. The
callbacks would be invoked in ViewRootImpl traversal before
the measure pass. If the app tried to add to the view hierarchy
in the callback, the view would not measure and layout the
new view properly.

To fix this, move the ViewRootImp SurfaceChangedCallback
after the measure pass.

Test: app in bug can add a view from SurfaceHolder.Callback#surfaceCreated
Fixes: 181529599
Change-Id: I06923113f7fc8e90242060c34f1d309d53b5a87b
2021-04-22 14:18:37 -07:00
Hongwei Wang
0df585fb8d Apply PictureInPictureSurfaceTransaction upon reparent
When autoEnterPip from Task with multiple activities, besides passing
the mLastRecentsAnimationBounds we should also try to pass the last
PictureInPictureSurfaceTransaction to the new Task and apply both.

Changed also
- deprecate the last recents animation bounds and use the transaction only
- reset the transform once applied to the original task

Known issue: original task appears transparent in overview once.

Video: http://recall/-/aaaaaabFQoRHlzixHdtY/hNZ0H62PqgVDEUGh1TVMiT
Bug: 184789412
Bug: 185509920
Test: manual with ApiDemos, see Video
Change-Id: I7fb77e41e1963e14ecaf53bd135d6b4cb24493c9
2021-04-22 11:14:44 -07:00
Caitlin Cassidy
eb457d50b7 [Ongoing Call Chip] Don't show the chip on lockscreen.
Also moves the #initNotificationIconArea call to be within
CollapsedStatusBarFragment, rather than requiring StatusBar to call it.
This makes our unit tests better because now we don't need to call it
manually.

Also fix a bug in #onDozingChanged that was passing disabled1 in for
disabled2.

Test: atest and manual
Bug: 183229367
Fixes: 185897059
Change-Id: I0a65f9e90e66680f0b602b89f89ec0a4900e9df8
2021-04-22 15:18:12 +00:00
Louis Chang
a262436fe1 Try fixing the flakiness of TaplTestsQuickstep#testSwitchToOverview
The new configuration did not reported to the NexusLauncher activity
when the device rotated to landscape. It seems that the configuration
object of the ActivityClientRecord was unexpectedly updated somewhere,
so the configuration handling was skipped and not reporting to the
activity.

Copy the configuration from mPendingMergedConfiguration vs. directly
assigning the given configuration object reference.

Bug: 185820525
Test: atest NexusLauncherTests:TaplTestsQuickstep
Change-Id: I6768fe86e5c977c32a975562ec058c82d4f9c2fc
2021-04-22 18:22:10 +08:00
Nikita Iashchenko
9623adb4b8 Merge "Remove usage of optimized reflection getters" am: 9d0bfe1b0a am: f10f3736ea am: e5400b4085
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1682029

Change-Id: Id5e445360ec59029c82f9bc96c55dd1599a0029e
2021-04-22 10:09:50 +00:00
Nikita Iashchenko
e5400b4085 Merge "Remove usage of optimized reflection getters" am: 9d0bfe1b0a am: f10f3736ea
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1682029

Change-Id: I870f7eee1c5f113b00aa560e4951084be8daf3d5
2021-04-22 09:43:59 +00:00
Nikita Iashchenko
9d0bfe1b0a Merge "Remove usage of optimized reflection getters" 2021-04-22 09:10:01 +00:00
Wilson Wu
3e0705d6e8 Merge "Prevent addtional removeSurface calls" into sc-dev 2021-04-22 07:41:49 +00:00
Wilson Wu
08f5b9c846 Prevent addtional removeSurface calls
The surface may not be cleared by its owner when
it lose control last time. We had CL[1] to clean
up the surface if we don't plan to show.

Add new checking condition for last control, so
once we have control we only remove the surface
if last control was null.

[1]: I4910c2a06cc67b0470477b245fc1de54b75f10f9

Bug: 185557884
Test: atest InsetsSourceConsumerTest
Change-Id: I1a4f05f9b4cf6fa121554ff0abc9fdc418b95276
2021-04-22 12:46:35 +08:00
Tiger Huang
755cd83f49 Merge "Stop processing if the new control equals the current one" into sc-dev 2021-04-22 04:23:38 +00:00
Treehugger Robot
1bff978184 Merge "Fix grammatical error in LayoutAnimationController documentation." am: 84fdb3b19f am: 07a7231bc8 am: 1c166fa20d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1680106

Change-Id: I7be25e32f785c30b21d8b286be38c8907524b9dd
2021-04-21 23:50:20 +00:00
Treehugger Robot
1c166fa20d Merge "Fix grammatical error in LayoutAnimationController documentation." am: 84fdb3b19f am: 07a7231bc8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1680106

Change-Id: I456c07ee5beeceb6d9581ed2dc0313f4ba9fadd1
2021-04-21 23:07:23 +00:00
Rob Carr
c2d41154f0 Merge "View: Expose gatherTransparentRegion" into sc-dev 2021-04-21 22:18:11 +00:00
Sally Yuen
93595946da Merge "Add prefetch result to a11y tracing" into sc-dev 2021-04-21 22:02:07 +00:00
Adam He
528059b7be Merge "API feedback: change language from String to ULocale." into sc-dev 2021-04-21 20:44:02 +00:00
Joanne Chung
6b0cff16cf Merge "Update javadoc for ViewTranslationRequest.Builder for virtual view." into sc-dev 2021-04-21 11:22:30 +00:00
Mathew Inwood
f715fddd3c Merge "API changes as requested by API council." into sc-dev 2021-04-21 08:40:16 +00:00
Joanne Chung
e847921bea Update javadoc for ViewTranslationRequest.Builder for virtual view.
Bug: 185273314
Test: n/a. Only update javadoc.
Change-Id: I63b0115184113b1a85833408a61859b7c3d55713
2021-04-21 14:19:18 +08:00
Rob Carr
79f15c60f3 Merge "SurfaceControl: Fix builder" into sc-dev 2021-04-21 05:22:27 +00:00
Yanchao Su
2e2e479ef1 Merge "fix bug 184901520." into sc-dev 2021-04-21 01:44:08 +00:00
Adam He
e565d31bce API feedback: change language from String to ULocale.
Bug: 176208267
Bug: 184685163
Test: atest CtsTranslationTestCases
Change-Id: I10310f4980d4b9d869eb76542e0327420ad2f9de
2021-04-20 18:23:13 -07:00
TreeHugger Robot
51f7357af1 Merge "Add back deprecated Translator.translate() method" into sc-dev 2021-04-21 00:57:08 +00:00
Joanne Chung
497dadea9c Merge "Remove the deprecated APIs in UiTranslationManager." into sc-dev 2021-04-21 00:48:53 +00:00
Joanne Chung
be20ca46f6 Merge "API feedback: Translation View API refinement." into sc-dev 2021-04-21 00:29:24 +00:00
Adam He
1c3372f37d Merge "Remove onError from translationResultCallback." into sc-dev 2021-04-21 00:26:34 +00:00
Winson Chung
839b9a1147 Merge "Skip some unnecessary allocations" into sc-dev 2021-04-21 00:17:01 +00:00
Robert Carr
c3d4925a04 SurfaceControl: Fix builder
Recently introduced check for isBufferQueueLayer doesn't work
because the FX_SURFACE_NORMAL flag is 0x0 not 0x1 as expected.

Bug: 185941687
Test: Existing tests pass
Change-Id: I1b341bffcd8b0f0c0e7f2e3da27cb201b6e1d6ff
2021-04-20 16:50:58 -07:00
Nikita Iashchenko
a643441aec Remove usage of optimized reflection getters
As a part of internal libcore API cleanup some of the functions
previously exposed are getting removed from public surface.

This CL replaces usage of art optimized reflection methods with default
ones.

Bug: 154796679
Test: m droid
Change-Id: I14cfa4af95e2d4b34cee02decaec33d928c25b73
2021-04-20 23:10:32 +00:00
Adam He
f187b6dc51 Add back deprecated Translator.translate() method
* Deprecatede method was @hide hidden by mistake.

Bug: 185793893
Test: atest CtsTranslationTestCases
Change-Id: I6acfcf866d926d5efd5baf3f711d9906dd95a34e
2021-04-20 15:59:44 -07:00
Robert Carr
354c56590e View: Expose gatherTransparentRegion
Recently exposed ViewRoot API requires requestTransparentRegion for
many of the use cases we want to support. requestTransparentRegion is
already public API, however the documentation and definition is a little
confusing and arguably it shouldn't do anything unless we also implement
gatherTransparentRegion. gatherTransparentRegion is already made public
through SurfaceView, and so exposing it properly on View seems like
a non disruptive option.

Bug: 179647628
Test: android.view.cts.ViewRootSyncTest
Change-Id: I72fb2744bc03cdd26d64547dbebeb12751a33a2a
2021-04-20 15:38:26 -07:00
Sally
3e5df20043 Add prefetch result to a11y tracing
Test: callback appears in trace
Bug: 157601519
Change-Id: I65c8dd1fa5c33c84c873ffa7b6d772395d0adbdb
2021-04-20 22:06:05 +00:00
TreeHugger Robot
32e08f8b0d Merge "Revert^2 "Introduce SpellCheckerSessionParams."" into sc-dev 2021-04-20 16:45:50 +00:00
Megan Robinson
063e1c8f2b Fix grammatical error in LayoutAnimationController documentation.
Change-Id: I274079b932154fa61ebe64a7e0ed0dc1feb089cc
2021-04-20 16:26:43 +00:00
Mark Renouf
4b45c3601b Merge "Account for padding in dispatchScrollCaptureSearch" into sc-dev 2021-04-20 16:09:14 +00:00