Commit Graph

16534 Commits

Author SHA1 Message Date
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
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
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
Kohsuke Yatoh
d4e3278b3e Revert^2 "Introduce SpellCheckerSessionParams."
Updated test added in commit 7000b5f89d8c43af5ccd116c1840ea89dd9f17dc

Bug: 179804789
Change-Id: I48c744815662cabcbef8e823916b1e6bba9c9b17
2021-04-20 14:28:56 +00:00
Joanne Chung
108cec2f17 Remove the deprecated APIs in UiTranslationManager.
We introduced some APIs for initial demo but we dropped these APIs.
To avoid to break the client app, we keep the API until the client
moves to new APIs. It's ok to delete these API now.

Bug: 185448758
Test: manual
Test: atest android.translation.cts.UiTranslationManagerTest

Change-Id: I5ea71d4658246f52610e1f62412d60c6c58bb31e
2021-04-20 14:00:36 +00:00
Jeff DeCew
eba7be7876 Merge "CallStyle actions have minimum width" into sc-dev 2021-04-20 13:46:14 +00:00
TreeHugger Robot
9ab42eb145 Merge "Enforce mutual exclusivity in setScrollCaptureHint" into sc-dev 2021-04-20 13:20:13 +00:00
Tiger Huang
dcb0bfbe1d Merge "Clear controls in the temp list after using them" into sc-dev 2021-04-20 13:05:07 +00:00
TreeHugger Robot
3980454a74 Merge "Bugfix: Make InsetsController dump() respect prefix" into sc-dev 2021-04-20 12:51:55 +00:00
TreeHugger Robot
6309cca5d9 Merge "ContentCapture: Log the text length for VIEW_APPEARED events." into sc-dev 2021-04-20 06:52:18 +00:00
Ahaan Ugale
6f4ace91fd ContentCapture: Log the text length for VIEW_APPEARED events.
Helps for matching logs to screen contents while debugging.

Bug: 177687849
Test: manual
Change-Id: Id7e43034843f65f36c9030278728d27ec4f27168
2021-04-19 22:08:54 -07:00