Commit Graph

13715 Commits

Author SHA1 Message Date
Jacky Kao
873cbc0e14 Merge "Implementing new API : takeScreenshot()" 2020-01-15 08:29:49 +00:00
Jacky Kao
09789e4168 Implementing new API : takeScreenshot()
Implementing the new API for A11y services to take the screenshot
of the specified display.
Bitmap takeScreenshot(int displayId)
1. The main codes is moved from the UiAutomationConnection class and
let the UiAutomation change to use this API.
2. Add a capability at metadata to check whether the A11y services could use this
API or not.
3. This API is a async one for A11y services, but is a sync one for
UiAutomation.

Bug: 10931661
Test: a11y CTS & unit tests
Change-Id: I478bd93c60d4742bef20ae0e423ca9de1bda55d2
2020-01-15 16:23:52 +08:00
Rhed Jao
70cb293d44 Merge changes from topic "A11yShortcut_NeedWithUi"
* changes:
  Accessibility shortcut improvement (10/n)
  Accessibility shortcut improvement (9/n)
  Accessibility shortcut improvement (8/n)
2020-01-15 07:22:32 +00:00
Jackal Guo
7fd8e937bf Merge "Support accessibility on embedded hierarchies (1/n)" 2020-01-15 05:40:36 +00:00
TreeHugger Robot
e33a992c19 Merge "Move focus dispatch to input (2/2)" 2020-01-15 04:52:14 +00:00
Wu Ahan
d5b8f0590d Merge "Make some apis @TestApi and @hide for usage in tests" 2020-01-15 03:33:41 +00:00
Valerie Hau
ac8a052c01 Merge "Add USE_BLAST private flag on ViewRootImpl setView" 2020-01-14 21:40:03 +00:00
Rhed Jao
f526c9995b Accessibility shortcut improvement (10/n)
Update AccessibilityManagerService:
 - Enable multiple shortcut targets support for accessibility button.
 - Remove navibar magnification enabled setting key.

Bug: 136293963
Test: atest AccessibilityShortcutTest
Test: atest AccessibilityUserStateTest
Test: atest AccessibilityShortcutControllerTest
Change-Id: I69facd958307a22f3a0193dd769e595cef324f9f
2020-01-14 12:15:23 +08:00
TreeHugger Robot
63b67c0efa Merge "Add the ime package name to the inline suggestions request" 2020-01-14 03:38:00 +00:00
Jackal Guo
79b182e752 Support accessibility on embedded hierarchies (1/n)
To support embedded hierarchies (leash):
1. Add new APIs for leashed child in AccessibilityNodeInfo.
2. SurfaceView needs to use this API to add such child when
   initializing the AccessibilityNodeInfo.

Bug: 137593247
Test: a11y CTS & unit tests
Change-Id: Ieaa57c6ad65f4c199175d929c3bcba7fb7e6ef26
2020-01-14 10:29:54 +08:00
Feng Cao
16b2de5a40 Add the ime package name to the inline suggestions request
Test: manual
Bug: 147229274

Change-Id: I3d81b1d56989e46f65f9b9fc6e497952486335b5
2020-01-13 15:15:24 -08:00
Valerie Hau
8c2357a312 Add USE_BLAST private flag on ViewRootImpl setView
Bug: 147018830
Test: build, boot, manual
Change-Id: I0fc84aab5ee04eb7abe4f745410910ddafc3707d
2020-01-13 15:01:03 -08:00
Rob Carr
57b072545f Merge "Introduce TaskOrganizer" 2020-01-10 20:27:27 +00:00
Siarhei Vishniakou
3b8e872e9b Move focus dispatch to input (2/2)
Input now tells the app when it has focus.

Touch mode information will now also be sent to the apps through input.

When a key targeting a non-focused display is processed, run the
'moveDisplayToTop' synchronously to ensure that setInputWindows with the
correct window focus information is completed. This would ensure that
the focus event is enqueued before the key event.

Bug: 70668286
Test: atest WindowFocusTests
Change-Id: Iff0b88a05441b29834741aa3dfae31d55871ddd6
2020-01-10 11:14:20 -08:00
Jorim Jaggi
4e04eb24ae Move visible insets calculation to client
As otherwise they may be out of sync, leading to shifting when the
IME disappears.

Bug: 111084606
Test: InsetsSourceTest, InsetsStateTest, InsetsSourceProviderTest
Change-Id: Ifd7dfa6694efccf8693fd46bec1a9dea879790ff
2020-01-10 15:36:51 +00:00
TreeHugger Robot
f093b48b58 Merge "Correct layout/draw/animation interleaving for insets callbacks" 2020-01-10 13:35:28 +00:00
Jorim Jaggi
a51168aaee Correct layout/draw/animation interleaving for insets callbacks
See WindowInsetsAnimationCallback.onPrepare for detailed
description of new behavior.

Also rename InsetsSourceConsumer.setVisible to setRequestedVisible
to communicate that this is client intent vs. current state.

Test: windowinsetstest application
Bug: 111084606
Change-Id: Id35c60e0f59a8aa4f0d300220391d1e2b96a91fd
2020-01-10 11:24:31 +01:00
TreeHugger Robot
8c32659ae1 Merge "Use ExecutorService to replace CompletableFuture" 2020-01-10 09:32:48 +00:00
Robert Carr
8a2f913ac4 Introduce TaskOrganizer
A first take at the TaskOrganizer API for allowing SysUI to control task presentation.
In this CL we introduce the first two primitives:
        1. The interface itself for implementation by SysUI
        2. Support for organizing a given windowing mode (but atm really only PIP)
We include a sample app that manages the PIP from an APPLICATION_OVERLAY window.

Bug: 139371701
Test: wmtests/TaskOrganizerTests. TaskOrganizerPipTest
Change-Id: I44a8ed311bc5f06285bba2c6ff3b37a7d19a9190
2020-01-09 13:04:18 -08:00
Hongming Jin
d261711e49 Merge "System action registration API for SystemUI" 2020-01-09 21:00:39 +00:00
lumark
ba400449e1 Use ExecutorService to replace CompletableFuture
CL[1] introduced starting input with CompletableFuture for improving IME
performance.

Since CompletableFuture is not recommanded way to use in system server side for
memory usage concern, we use java ExecutorService and Future to remove
this dependency.

[1]: I6aa4a664cfd0c86f75cee2457715317194bbe5e2
      e0172102b9

Fix: 147331480
Test: atest CtsInputMethodTestCases

Change-Id: I10391b834c33458c3e0ac846ab738e805d235c26
2020-01-09 17:34:13 +08:00
Tiger Huang
969c60859a Window Manager Flag Migration (9/n)
Update the leash of InsetsSourceControl and send it to the client while
the insets source window is moved.

This CL also guarantees that the array of InsetsSourceControl send to
the client side doesn't contain any null element.

Bug: 118118435
Test: atest InsetsSourceProviderTest InsetsStateControllerTest
            InsetsPolicyTest WindowStateTests CommandQueueTest
            RegisterStatusBarResultTest InsetsFlagsTest
            LightBarControllerTest RegisterStatusBarResultTest
            ViewRootImplTest DisplayPolicyLayoutTests
            DisplayPolicyInsetsTests DisplayPolicyTests
            TaskSnapshotSurfaceTest NavigationBarColorTest
Test: Rotate Camera in the new insets mode

Change-Id: I96d7ac5c37abbb472dab4cd2c24644e136d23947
2020-01-09 17:01:42 +08:00
Evan Rosky
769c9a5ee7 Merge "IME to systemui" 2020-01-08 22:28:40 +00:00
Valerie Hau
4c2adf3477 Merge "Switch BLAST flag to WindowManagerGlobal" 2020-01-08 21:24:50 +00:00
Hongming Jin
bc76112e0b System action registration API for SystemUI
Bug: 136286274
Test: atest AccessibilityManagerTest
      atest AccessibilityManagerServiceTest
Change-Id: I6bbdf3627bfc9b39551cc7809dda1cf43d1d6ea4
2020-01-08 11:22:48 -08:00
Evan Rosky
8d782e0c01 IME to systemui
Re-route ime-control to SystemUI when it isn't driven by an app.

This allows multi-window system-ui components to synchronize
with the ime (eg. adjusting for split-screen).

Ime control goes through a new interface IDisplayWindowInsetsController.
This gets set on WM and there is only 1 per display. All of this
is currently handled in DisplayImeController which will also
drive the animation of the IME and dispatch to ImePositionProcessors.

On the server-side, InputMethodControlTarget is separated from
InputMethodTarget so that IME can be controlled by a different
client than the IME target.

Bug: 133381284
Test: Existing IME tests pass
Change-Id: I8e8ed2e09c45998c228df72e52a671fa327308f2
2020-01-08 10:34:40 -08:00
Jorim Jaggi
761a5ab018 Treat IME adjust flags correctly
- IME insets always get reported through WindowInsets.getInsets(ime())
- However, getSystemWindowInsets will not report it if ADJUST_RESIZE
isn't set.
- Fix bitmask check for ADJUST_RESIZE

Test: InsetsStateTest
Test: WindowInsetsTest
Fixes: 146465040
Bug: 111084606
Change-Id: Ib19c89050af4f669ddda14d2bf2415aa3b5092c1
2020-01-08 17:40:54 +00:00
Valerie Hau
089e5da3f3 Switch BLAST flag to WindowManagerGlobal
Setup for P/H experiment by switching to WindowManagerGlobal.
Follow up patch will set the flag based on DeviceConfig

Bug: 147096935
Test: build, boot, manual
Change-Id: If062fc16a90e0f3069064b969e1a63a6142421df
2020-01-07 13:55:33 -08:00
Artur Satayev
df4395991f Use new UnsupportedAppUsage annotation.
Existing annotations in libcore/ and frameworks/ will deleted after the migration. This also means that any java library that compiles @UnsupportedAppUsage requires a direct dependency on "unsupportedappusage" java_library.

Bug: 145132366
Test: m && diff unsupportedappusage_index.csv
Change-Id: I288969b0c22fa3a63bc2e71bb5009fe4a927e154
2020-01-07 13:29:50 +00:00
Michal Olech
3c429ff1c8 Merge "Revert "Introduce config_customBugreport option"" 2020-01-07 12:09:20 +00:00
Michal Olech
8c5bc3b60d Revert "Introduce config_customBugreport option"
This reverts commit 88376e68c1.

Reason for revert: Will instead reuse BugReportHandlerUtil

Change-Id: I19644bbc32a758bdbc13a0a959879c6d5a5f0c71
2020-01-07 09:42:39 +00:00
TreeHugger Robot
a6447f2832 Merge "Fix issue with letterboxing" 2020-01-07 00:29:30 +00:00
Jorim Jaggi
0dd0cf911b Fix issue with letterboxing
- Only consider client state if new API is actually turned on.
- We only sent the state the client was actually controlling.
However, we then later check for visibility for state that may not
even exist. Thus, we keep the state but only update the sources
the client is actually controlling.
- Initialize source with default visibility. This prevents
issues where the source may not exist but we still check it.

This fixes issues where a letterbox was accidentally placed on
screen because WM was thinking client requested fullscreen flag
(hiding the status bar), and other places where we checked
requested visibility.

Also renamed client state to requested state.

Test: Open any app, open IME
Bug: 111084606
Change-Id: Ibead561fc5593d8944400320f5e31dbe262612fe
2020-01-06 23:50:39 +01:00
TreeHugger Robot
3c5d179ab3 Merge "Replace framework usage of SkMatrix with a stable C API" 2020-01-06 18:18:11 +00:00
Derek Sollenberger
4dc0aae61f Replace framework usage of SkMatrix with a stable C API
Isolate the usage of SkMatrix within the graphics module and
replace external usages with a stable C API.

Bug: 137655431
Test: CTS presubmit
Change-Id: I058051a6afb4ae6d48ecdcf5cf8bd21aa0995e90
2020-01-06 11:57:39 -05:00
TreeHugger Robot
6fa86b7933 Merge "Introduce config_customBugreport option" 2020-01-06 16:43:17 +00:00
Michal Olech
88376e68c1 Introduce config_customBugreport option
This adds support for a custom bugreport handler. When the option is
enabled instead of immediately triggering the full bugreport, only a
CUSTOM_BUGREPORT_REQUESTED broadcast is sent.

Bug: 146052311
Test: built and tested locally
Change-Id: Ifea9906c15e0bc1281192a90b4dbdb0ad1ecfbdd
2020-01-06 16:19:59 +01:00
TreeHugger Robot
d10dc73df9 Merge "Add target SDK restriction to SmartSelectionEventTracker." 2020-01-06 11:04:04 +00:00
Joanne Chung
d9a916fe4d Finish autofill integration with keyboard cleanup tasks
1. Only print log when debug is on.
2. Callback be notified when input does not start.
3. Avoid using hard code tag in Log class.
4. onCreateInlineSuggestionsRequest() do nothing in NOP.
5. Add missing javadoc.

Bug: 146525448
Test: manual verification
Change-Id: I41e1de92ffcdb8020aef99acbfec274e0294bad3
2020-01-06 16:43:45 +08:00
Joanne Chung
0041b17113 Merge "Ensure OVERTYPE event has an entity type." 2020-01-04 05:46:11 +00:00
Adam He
7bc8f60377 Added attributes for IME and AutofillService to indicate they support
inline suggestions.

Fixes: 146452946
Test: atest FrameworksCoreTests:android.view.inputmethod.InputMethodInfoTest
Change-Id: I709b16d3f12c693bc670600bdcb9125630eb9b8e
2020-01-03 14:14:17 -08:00
Nikita Dubrovsky
8de5385616 Merge "Fix typo in javadoc in AutofillValue" 2020-01-02 18:30:26 +00:00
Chavi Weingarten
856ce4a17d Merge "Remove layer from window handle since it's no longer used" 2020-01-02 17:18:00 +00:00
Joanne Chung
a4099aaa01 Ensure OVERTYPE event has an entity type.
Bug: 145282510
Test: atest FrameworksCoreTests:android.widget.TextViewActivityTest
Change-Id: Ia064318198effbdfde00566c6746ab922573c32d
2020-01-02 22:20:25 +08:00
Ahan Wu
c54169a046 Make some apis @TestApi and @hide for usage in tests
Some apis in class, WallpaperManager and Display, are not visible in
tests, make them visible for tests usage.

Bug: 142845271
Test: atest android.display.cts.DisplayTest#testGetSupportedWideColorGamut
--rerun-until-failure 10
Test: atest android.app.cts.WallpaperManagerTest#testWallpaperSupportsWcg
--rerun-until-failure 20
Test: atest android.app.cts.WallpaperManagerTest#testWideGamutWallpaper
--rerun-until-failure 20

Change-Id: I1958df1e53aa7f65a2eb9ee7fe2a6b098ac2ab39
2020-01-02 11:38:41 +00:00
Rob Carr
4e535b4c41 Merge "Rename WindowlessViewRoot to SurfaceControlViewHost and rework API" 2020-01-02 05:18:58 +00:00
Rob Carr
9bc62f7678 Merge "Port SurfaceView deferTransaction usage to BLAST" 2020-01-02 03:14:49 +00:00
Robert Carr
85bb940f72 Port SurfaceView deferTransaction usage to BLAST
When the SurfaceView is invalidated (e.g. geometry has changed) we ask
the ViewRootImpl to render the next buffer in to a BLAST transaction which
the SurfaceView will also use from it's RT callbacks in place of deferTransactionUntil

Test: Flip USE_BLAST_BUFFERQUEUE flag. Run SurfaceViewSyncTests.
Bug: 146598493
Change-Id: I43d301f25101afae32ad1c43a3a3210c5aeadd0f
2019-12-30 21:34:06 -08:00
Robert Carr
59b1888bb9 Rename WindowlessViewRoot to SurfaceControlViewHost and rework API
Should be a little more clear. The internal IWindowSession implementation
keeps the WindowlessWindowManager name, but the API section definitely
needs a more usable name. Instead of passing in a root Surface we want it
to be owned by the SurfaceControlViewHost itself. This way we can ensure
we only return a SurfacePackage. In follow up CLs we will add an
accessibility ID to the SurfacePackage so we can ensure the Control
is passed around with the accessibility ID.

Test: Builds
Bug: 134365580
Change-Id: I30520e8b169d3744a66ccedf61cc4515cfef4dee
2019-12-30 20:59:39 -08:00
Nikita Dubrovsky
85a8d446c8 Fix typo in javadoc in AutofillValue
Test: presubmits
Change-Id: I8c7d3c9cca57a8e272b63f72fea68978a5073cac
2019-12-30 15:38:46 -08:00