Enables SystemUI to create/position its own ui elements.
First of all, this adds, to WM, the concept of a ShellRoot
which represents a piece of the hierarchy that a client shell can
do whatever it needs with. For now, multiple of these roots can
be registered at various "levels" (which correspond to window
types for now). This is needed because not everything will live
in this piece of the hierarchy, so handling z-order will still
be a shared effort between the Shell and WM for a while.
On the SystemUI side, a new Dependency called SystemWindows
provides simplistic window management for these system-ui
windows via WindowlessWindowManagers per-display-per-layer.
The benefit of this is that manipulation of these windows lives
entirely in SystemUI making synchronization easier and making
it possible to move a lot of the special handling code out
of wm (eg. DOCK_DIVIDER). As a result, SystemUI becomes
more customizable and WM becomes simpler.
Early clients of this are going to be display-level IME
handling and Split-screen.
Bug: 133381284
Test: manual test after later CLs
Change-Id: I1602d9b9b69d38b9ff15806e509cc8128c837748
Instead of clearing all cache, refreshing the accessibility windows
and the nodes.
Bug: 145562808
Test: a11y CTS & unit tests
Change-Id: I3048bffeb970712e43b82843acd452c147ca5054
Instead of display overlays being a SurfaceControl that can only have
child surfaces, it now is a WindowContainer that can have windows.
Specifically, windows with the type TYPE_ACCESSIBILITY_MAGNIFICATION_OVERLAY
will be placed in the display overlays layer
This is the first step to allow window magnification to use real windows
on the display.
Test: go/wm-smoke
Bug: 136250281
Change-Id: Idad98db7a85f68ba49557c0efb83b9a1be089609
HdrCapablities in adb shell dumpsys display and in log messages appear
as android.view.Display$HdrCapabilities@49f9cd26. This change adds a
toString() method so HDR Capabilities are visualized in a nice way.
Test: adb shell dumpsys display
Change-Id: I0800ac4f615ca733d0901654184d884dd2b81752
userId is a new field added in ag/8350816, and it is written in between
some old fields when we parcelize it.
That breaks AiAi because some of its code rely on the implementation
details of SelectionEvent.writeToParcel.
In the long run, we may want to update AiAi such that it works
without this assumption, but before that, let's fix that in platform
for now.
Bug: 145962464
Bug: 123232892
Test: atest FrameworksCoreTests:android.view.textclassifier.SelectionEventTest
hange-Id: I98137a095cddf0fb4c600e1e09eef507bb750528
ConfigParser was introduced mostly for reading both legacy Settings and
DeviceConfig lazily. We are ready to migrate to DeviceConfig and no
longer read legacy Settings, and thus we don't need this class.
DeviceConfig invalidates cache whenenver any config in the same namespace
is changed, and thus we don't need a listener.
No performance issue observed after testing TextClassificationManagerPerfTest.
Bug: 143585708
Test: atest FrameworksCoreTests:android.view.textclassifier
Test: atest android.view.textclassifier.cts.TextClassifierServiceSwapTest
Test: frameworks/base/apct-tests/perftests/textclassifier/run.sh
Test: adb shell cmd device_config put textclassifier <key> <value> and
adb shell dumpsys textclassification monitor the value change.
Test: Dynamic switch TCS and make sure the service status is expected.
Change-Id: I3c07ef4b16cd1f81c6aa60a0b9b26cac1a3bb5c0
- Adds support for magnification and multiple shortcut targets assigned
to accessibility shortcut key in AccessibilityManagerService.
- New extra field in ACTION_CHOOSE_ACCESSIBILITY_BUTTON intent to
support accessibility shortcut key.
Bug: 136293963
Test: atest AccessibilityShortcutControllerTest
Test: atest AccessibilityUserStateTest
Test: atest AccessibilityShortcutTest
Change-Id: If0a446dfd269e82ec0d09db92e86f859cdae50d8
This API allows applications to instruct the connected display to do minimal
post processing on the produced image or video frames. This will switch the
display to a low latency mode (ALLM, Game mode or some other custom
implementation thereof), reducing lag in the final images. Thus, minimal post
processing would greatly enhance performance for gaming and video
conferencing applications. It would not, however, suit applications that
prioritise image quality over performance.
This CL adds 2 public method:
- Window.setPreferMinimalPostProcessing()
(this can also be set in WindowManager.LayoutParams.preferMinimalPostProcessing)
If minimal post processing is preferred, the connected display will be requested
to go into low latency mode, which reduces image processing, resulting in better
performance for gaming applications. If the Display sink is connected via HDMI,
the device will begin to send infoframes with Auto Low Latency Mode enabled and
Game Content Type. This will switch the connected display to a lower latency
mode (if available).
For more information, see HDMI 2.1 specification.
If the Display sink has an internal connection or uses some other protocol than
HDMI, effects may be similar but implementation-defined.
- Display.isMinimalPostProcessingPreferred()
Returns true if the connected display supports either Low Latency Mode (ALLM or
some other custom low latency implementation) or Game content type.
Bug: 135116095
Test: make -> flash on ATV OTT device -> open an activity which requests minimal
post processing -> check SurfaceControl logs -> verify correct signals are
passed to native
Change-Id: Id09160ba1513fef4dac979162bcda3bfeaace0e6
Some apps have an payment screen with a scan card button.
When a text field's text is set in this scenario, the autofill
service is never triggered because no field gets focused.
Currently this new behavior is implemented for normal view.
Add the check logic in these two functions of AutofillManager
(notifyValueChanged/notifyViewVisibilityChanged)
to check if it should trigger autofill automatically.
Bug: 142821537
Test: atest CtsAutoFillServiceTestCases
Change-Id: Ibde94791f49772dc19cb8566a9c3a48dfbf16a58
This reverts commit 0ffa15ab5f.
Reason for revert: Checking treehugger to see if this fixes instagram
input handling.
Bug: 144619551
Change-Id: I606c651f7ec1ea8c26ecc92fc5e94994a480950b
We want to eventually migrate some of these APIs to be @SystemApi for mainline modules.
The #dumpDebug name is more appropriate than #writeToProto.
Bug: 142279786
Test: Manual
Change-Id: I60793e91cedf6b720d4ecef6a8484f4fed4ff30f
This action is used to do support distinct behaviour depends on how long
it's pressed and hold. The view declares this action should not expose
ACTION_LONG_CLICK.
Bug: 139506603
Test: The API Builds, there is no executable code here.
Change-Id: Ic3cf37677dd8bee2faf22f2f57feef4c9bb7cc22
With the parent CL that allows the topmost fullscreen activity to set
the display rotation when freeform windows are visible, OEMs may need
this method to easily regulate the display rotation behavior on external
displays, or primary displays when a keyboard is attached. Therefore
let's expose it to for SysUI to use it.
Also change its name for consistency, especially to differentiate this
and mIgnoreRotateForApps in DisplayContent.
Bug: 144185986
Test: Command line can still set it.
Change-Id: Id1233869c30b66bde3550267dbb21a84076c223d
This is the first step of eliminating SynchronizedPool for a11y ojbects.
The patch doesn't stop recycling, but allows service developers to
choose whether or not to.
Since recycling a11y node info is stopped in the cache, but the nodes
are still holding pooled collection/item/range info objects. Here it
goes away with public constructors except those refreshed one.
Bug: 117999988
Test: m update-api; m checkapi; m ds-docs
Test: atest --test-mapping $ANDROID_BUILD_TOP/frameworks/base/core/java/android/view/accessibility:postsubmit
Change-Id: I12304662f216b5e443785939f231893abdfa07d5
If app requests to show IME as soon as app resumes, the animation is
prepared and IME window is set visibile/invisible at start of the
animation. Also, control is set to the window when it receives focus.
This results in control showing the IME before even animation starts
creating a flicker.
Solution is to not applyVisibility when control is set if IME (or
another side) is already animating.
Fix: 144503524
Test: Manually using steps in bug.
atest InsetsControllerTest InsetsSourceConsumerTest
Change-Id: I5271d906772510cd819f75dc8eed141f4248b34f
It says it's set when the tool type is a mouse or trackpad, but the fact
is the tool type is TOOL_TYPE_FINGER on trackpads. Therefore remove
trackpad from Android doc.
Bug: 145135609
Test: N/A
Change-Id: Ife91ba032f9f0a8e7359425b415409ac609cdb25
This adds other parts of the window lifecycle (eg. ViewRoot
death, window removal, layout update). Some of the lifecycle
controls are just utilities, but are needed so that they
can be performed out-of-package.
It also shows/hides the surface based on underlying view
visibility. In actual WM, the surface is actually created/
destroyed based on visibility, but this breaks continuity
in WWM because the WWM user should have full control over
it.
Also made this public so it can be subclassed.
Bug: 133381284
Test: manual test in later CLs
Change-Id: Ibd7792c3f52c216089d9b498e3770e100ff24642
Interpret port as unsigned byte for consistency with uint8_t in SF/IF,
and clarify signedness in doc comments.
Bug: 143713778
Test: adb shell dumpsys display | grep physicalPort
Test: LocalDisplayAdapterTest
Test: DisplayWindowSettingsTests
Change-Id: I56ce0067367372a3a747fde783a1956975e833a0
Bug: 142507213
Test: 1. Manually verified refresh rate switching behavior on a phone
with refresh rate switching.
2. Wrote a new test file, DisplayModeDirectorTest.java, to verify the
behavior of the display mode voting algorithm.
Change-Id: Iceac6fd74e6528ddb2302f4d7eb926753e4ffd19