Change-related variables are null when not changing, thus
we need to check for that before trying to write them to proto
Bug: 123538318
Test: ActivityLifecycleTopResumedStateTests#testTopPositionLostOnFinish
passes
Change-Id: I643c48621602b5203f7f64a9af0578273f115dbe
WindowContainers surfaces will never have a buffer so change them to be
container layers to avoid confusion on the buffer count in
SurfaceFlinger.
Also restrict SurfaceControl Builder to set a single surface type to
avoid confusion.
Test: go/wm-smoke
Bug: 122561221
Change-Id: I26b5810675ef3a3cc1a33533b6afcb0d0489d5ba
Here's the current code:
mHandler.sendMessage(obtainMessage(ContentCaptureManager::handleGetComponentName, this, resultReceiver));
return resultReceiver.getParcelableResult();
That code posts a message to a handler, than blocks waiting for the result. It used to work fine,
but now it deadlocks because the handler is also running in the UI thread.
The solution is to not use the handler anymore, at least for these non-session related methods.
Test: atest BlankActivityTest#testGetServiceComponentName_onUi
Fixes: 123521559
Change-Id: I774dc6338f685d185447cd61da31bcc63b085996
It should be infered on the server side..
Bug: 123516968
Test: atest CtsContentCaptureServiceTestCases
Change-Id: If6ccf2fa86adb55f43c4b3ffa8b58661ef16dabb
With this CL, per-profile IME will be enabled by default.
Note that on debuggable builds (Build.IS_DEBUGGABLE == true),
developers can still disable per-profile IME mode as follows.
adb root
adb shell setprop persist.debug.per_profile_ime 0
adb reboot
Note that multi-client IME [1] is a completely different story,
because it was designed to be fully multi-user / multi-profile aware
since its begging. Enabling multi-client mode means that per-profile
mode is always enabled, because that's the only mode that
MultiClientInputMethodManagerService supports.
[1]: I41dfe854557b178d8af740bc2869c936fc88608b
bae5bea23c
Fix: 63907246
Fix: 111083076
Test: atest CtsAdminTestCases CtsDevicePolicyManagerTestCases
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Test: Did multiple manual tests.
* OTA scenario from older builds
* Unlocking devices by typing password
* App focus changes between personal apps and work apps
* Direct-reply notifications from personal / work users
* IME whitelist is only enforced to work IME settings
Change-Id: I854ce92b2bf3aab49f14f6cde444acf2182b9ad0
Add a IME state changes callback that pipes IME state into the Inset
consumer.
Bug: 118599175
Bug: 118118435
Test: atest InsetControllerTest
Test: atest InsetSourceConsumerTest
Test: atest ImeInsetsSourceConsumerTest
Change-Id: Id878226418e19cdf0499a0094f1d5c47fea33125
objects that are returned by the model
1. TemplateIntentFactory is the intent generator. It reads from the
templates that are returned from the model, and construct the
intents accordingly. If template is missing, we fallback to use
LegacyIntentFactory.
2. LegacyIntentFactory is the old(existing) intent generator.
3. Added a flag to allow us to switch between them.
Test: atest TemplateIntentFactoryTest.java
Test: atest LegacyIntentFactoryTest.java
Change-Id: I7bdcc73321f5a0160c5ff0edf1a2095119f4dcb1
Otherwise we create the leash with visibility=shown before the
client can update it, creating a flicker.
Test: Open IME, go home, observe no flicker
Bug: 111084606
Change-Id: I38eadaef79c27036edf5a86b773f6695d463db5c
Required for feature tuning and experiments
Also
- Updates Javadoc as per API review request
- Updates TextClassificationConstants test
Bug: 120794314
Bug: 118296637
Bug: 34780395
Test: atest core/tests/coretests/src/android/view/textclassifier/TextClassificationConstantsTest.java
Test: (MANUAL)
1. Install an app that handles Intent.ACTION_TRANSLATE
2. Run adb shell settings put global text_classifier_constants system_textclassifier_enabled=false,lang_id_threshold_override=0
3. Select foreign text
4. Observe that a "Translate" option is shown in the selection toolbar
1. Install an app that handles Intent.ACTION_TRANSLATE
2. Run adb shell settings put global text_classifier_constants system_textclassifier_enabled=false,lang_id_threshold_override=2
3. Select foreign text
4. Observe that a "Translate" option is not shown in the selection toolbar
Change-Id: I02b6ca48669e66a24150b04bba2ebfcf9ebe6bfd
Add Display.getPreferredWideGamutColorSpace() to return the preferred wide
color space that the rendering and composition pipeline prefers.
BUG: 120904891
Test: atest android.display.cts.DisplayTest#testGetPreferredWideGamutColorSpace
Change-Id: I1bcd9db72689a734b2a7c097b99a01464810994a
This corrects an error introduced in a recent refactoring. The background
SHOULD be visible when the SurfaceView is opaque, the idea being that the background
will provide for opacity even if the SurfaceView hasn't finished rendering.
Bug: 123421088
Test: Manual. SurfaceViewSyncTests. ASurfaceControlTest.
Change-Id: Ie0690e07474c30d9324e0b0f26db136e4d7a0fa2
onProvideContentCaptureStructure() doesn't take much for only 1 view, but it's called for all views
the first time the view hiearchy is laid off, which could acccumulative delay the
initial layout. Hence, we're postponing it to a later stage - it might still cost a
lost frame (or more), but that jank cost would only happen after the 1st layout.
Using this change, the impact on cold-dropcache-test dropped about 50% (from ~2ms to ~1ms).
Bug: 123307965
Bug: 121039624
Test: atest ContentCaptureSession
Test: atest google/perf/app-startup/benchmark-app-hermetic/cold-dropcache-test
Change-Id: I68b98b2894d23309af90d87cc99280f133557252
Pre-render input method views and window when EditText receives focus.
This is a pre-requisite for implementing better IME transitions.
Strategy:
Once EditText receives focus, startInput is called. If optimization is
available, IME views and window (SoftInputWindow) are created and
rendered. Until user taps on EditText or showSoftInput() is called, IME
window remains invisible. This pre-rendered window is kept around until
EditorInfo changes or new connection is started (onStartInput).
IME window's visibility will be set using new Insets controller API
rather than conventional client-side dialog.show().
Behavior:
- This is just IME side preparation CL. No performance improvements yet.
- There should be no user perceptible behavior change.
- As long as IME developers were following official lifecycle, they
shouldn't perceive any behavior change.
Availability:
This optimization, once fully implemented, will be available when:
- Device is not "Low memory"
- AND Master flag DebugFlags.FLAG_PRE_RENDER_IME_VIEWS is set.
- ViewRootImpl.USE_NEW_INSETS_API is enabled
Bug: 118599175
Bug: 111084606
Test: atest CtsInputMethodTestCases
Test: atest CtsInputMethodServiceHostTestCases
Test: atest ActivityManagerMultiDisplayTests
Test: Tested with 4 IMEs and didn't preceive any behavior change.
Scenarios tested:
1. With and without hardware keyboard
2. Screen rotation w/ fullscreen mode.
3. split-screen
Change-Id: I1a6300fe167eb205ee2b4214a6e270a52ebae062
This method was meant to optimize the ContentCaptureManager lookup, but it was not recursively
callign itself....
With this change and using System.out / System.nanotime() to measure:
$ adb shell am start android.contentcaptureservice.cts/.BlankWithTitleActivity
16 calls, taking 260.051us before and 30.311us after
$ adb shell am start android.contentcaptureservice.cts/.LoginActivity
24 calls, taking 290.261us before and 41.403us after
Bug: 123307965
Bug: 121039624
Test: atest ContentCaptureSession
Test: manual verification using system.out for timing
Change-Id: Ida5015ed117cae8ab4484a55f74cbc20fdc6df7f
This CL adds a display-level fallback for remoteanimation overrides
and a property to RemoteAnimationAdapter specifying whether it needs
a snapshot for change transitions or not.
During a mode-change, this check for an override and then asks it
whether it needs a snapshot before creating one.
Bug: 113252739
Test: Added AppChangeTransitionTests
Change-Id: I47c933bd08fe512dc6cf029607819e2c908ab4cd