This is a follow up CL to our previous CL [1], which introduced
IInputMethodManager#getAwareLockedInputMethodList
as a variant of
IInputMethodManager#getInputMethodList.
This CL mechanically merges those two IPC entries into one entry as
specifying
DirectBootAwareness.AUTO
is something we can do in the IME client side, without changing any
observable semantics.
[1]: I54d5dbec7e76d6a68935007ed3af0641f717a7c5
04a226334d
Bug: 210083408
Bug: 234882948
Test: presubmit
Change-Id: Ic02484fcbb9c1bbd8e964bb7a2f7acff904e2a33
As documented in art/runtime/jni/jni_internal.cc, ART has deviated
from the RI by using a 4-byte encoding instead of the 3-byte encoding
required by the JNI specification.
Some users are okay with this 4-byte encoding (where they control
both the reading and writing logic) but other users require
compatibility with the DataOutput/DataInput API contract, so this
change lets users request either behavior.
This change now exercises all tests in both 4-byte and 3-byte modes,
and exhaustively confirms that all valid code-points match the
DataOutput/DataInput contract when in 3-byte mode.
Benchmark results still show significant performance benefits when
using this 3-byte encoding over the upstream RI:
timeRead_Upstream_mean (ns): 5090068
timeRead_LocalUsing3ByteSequences_mean (ns): 1996032
timeRead_LocalUsing4ByteSequences_mean (ns): 1813250
timeWrite_Upstream_mean (ns): 3856276
timeWrite_LocalUsing3ByteSequences_mean (ns): 1632697
timeWrite_LocalUsing4ByteSequences_mean (ns): 886503
Bug: 236923096
Test: atest FrameworksCoreTests:CharsetUtilsTest
Test: atest FrameworksCoreTests:FastDataTest
Test: atest FrameworksCoreTests:XmlTest
Test: atest FrameworksCoreTests:BinaryXmlTest
Test: ./frameworks/base/libs/hwui/tests/scripts/prep_generic.sh little && atest CorePerfTests:FastDataPerfTest
Change-Id: Ibddd36410a0d4a909522de011f23a337b53d6889
With this CL,
InputMethodManager#showInputMethodAndSubtypeEnabler()
is fully implemented in the client side. By not using system_server
privileged context to launch the Settings activity, we can stop
worrying about conflicts with existing security concepts such as
* Background Activity launch blocking mechanism
* Restrictions for instant apps
Bug: 34886274
Test: Manually verified as follows.
1. Build aosp_coral-userdebug and flash it.
2. adb install -r $ANDROID_TARGET_OUT_TESTCASES/ApiDemos/arm64/ApiDemos.apk
3. adb shell am start -n com.example.android.apis/.ApiDemos
4. View -> Input Method -> ShowInputMethodAndSubtypeEnabler
5. Verify that the API works.
Change-Id: I5199ca4609c03900a0e86011d344b054b1df08dd
Remove migration code that was only needed on devices upgrading to much
earlier versions of Android:
- "migrated" and "migrated_user_specific" were only needed for upgrades
to Android K (http://ag/297566)
- "migrated_biometric_weak" was only needed for upgrades
to Android M (http://ag/609529)
- "migrated_lockscreen_disabled" was only needed for upgrades
to Android M (http://ag/677350).
- "migrated_wear_lockscreen_disabled" was only needed for upgrades
to Android O (http://ag/1595971).
Leave the "migrated_keystore_namespace" one for now, as it's
significantly more recent (needed for upgrades to Android S).
Change-Id: Ia69b8baf1995dd6deba8cf58440a481542c67bba
This CL manually migrates
IInputMethodManager#addVirtualStylusIdForTestSession(),
which was added recently [1], from manual permission check with
Context#enforceCallingPermission(INJECT_EVENTS)
to code-generation check with
@EnforcePermission("INJECT_EVENTS").
There should be no observable semantic behavior change in this CL.
[1]: I7399c0a56c04f024d65c16d459818cc2c5cdbc7f
d96ef57bc4
Bug: 34886274
Bug: 210039666
Bug: 232058525
Bug: 237316307
Test: atest CtsInputMethodTestCases:InputMethodManagerTest#testShowInputMethodPickerFromSystemProtection
Change-Id: Ida227d417496dd91c071c38ca0be003529764de4
This CL manually migrates
IInputMethodManager#showInputMethodPickerFromSystem(boolean, int)
from manual permission check with
Context#checkCallingPermission(WRITE_SECURE_SETTINGS)
to code-generation check with
@EnforcePermission("WRITE_SECURE_SETTINGS").
There should be no observable semantic behavior change in this CL.
Bug: 34886274
Bug: 232058525
Bug: 237316307
Test: manually verified that SecurityException is thrown
Change-Id: I9d1be1aa65276fcc50c2868fed6b0447d54ff7ee
Annotate null-ness for APIs and parameter for
InputMethodManager, IInputMethodManagerInvoker
and IInputMethodManager.aidl.
This is a annotation improvement without any user
visible changes.
Bug: 237959367
Test: presubmit
Change-Id: I426fb9ca9009f0f91a4d2d6a39094ea9c20671f7
FrameTracker has some ViewRootImpl invocations that it would be better
to make FrameTracker accesses run on either main or ui thread.
Bug: 200938639
Test: atest InteractionJankMonitorTest FrameTrackerTest
Change-Id: I91e9536293a694f3d110bda583a32b5918c96c55
In NotificationStackScrollLayout
- Begin instrument in clearNotifications()
- End in onClearAllAnimationsEnd()
Note: due to all child views run clear anim concurrently,
we just monitor parent(NSSL).
Bug: 238863970
Test: atest SystemUITests
Test: make and get perfetto trace
Change-Id: I705d03357a5a458a7f9eae5ecc5c4cfd7811cf7c
This command no longer does anything, and I couldn't find any evidence
that anyone is using it.
Bug: 146040259
Change-Id: I48867bbfa2d5ca34286d7050f7f5a255803e2ada
IInputMethodManager#isInputMethodPickerShownForTest() was introduced
in Android P (API 28) to verify IME picker visibility in CTS [1].
To make it clear that that IPC method must be available only for
special testing purpose, this CL introduces an @hide permission
android.permission.TEST_INPUT_METHOD
and requires it in
InputMethodManagerService#isInputMethodPickerShownForTest().
This CL grants that permission to the shell process hence CTS tests
can still access to the corresponding test API by using
UiAutomation#adoptShellPermissionIdentity().
[1]: I4e21625c32a0ca1abc740229efb3c7fcd97141cc
eb5706183f
Bug: 237317525
Test: atest CtsInputMethodTestCases
Test: Manually verified as follows.
1. adb logcat -b events | grep 237317525
2. atest CtsInputMethodTestCases:InputMethodManagerTest#testIsInputMethodPickerShownProtection
Ignore-AOSP-First: For a security fix
Change-Id: Ie79a3e9d41ce22605ae083594d639c37d08b7def
AIDL can't accept subclasses, see more info in the bug
Bug: 238277108
Fixes: 238277108
Test: follow steps in the bug, click on share
Change-Id: Ie691df4566e6b622c868bbed4377afc1ee82807d
AIDL can't accept subclasses, see more info in the bug
Bug: 238277108
Fixes: 238277108
Test: follow steps in the bug, click on share
Change-Id: Ie691df4566e6b622c868bbed4377afc1ee82807d
This field was somehow added as a non-final field [1], but nothing
prevents this from being a final field. Let's make this final to be
consistent with other fields in InputBindResult.
This is a safe refactoring. There should be no observable behavior
change.
[1]: I8efdc9886ce33185a2195b741668c12e319ea660
107b9413a6
Bug: 234882948
Test: presubmit
Change-Id: I5aef2e6a744f435fd192590673e91cb26cc3b02c
Use InputManager device listener to track if we've a known supported
stylus in system, only then init Handwriting.
Also supports simulated stylus
Bug: 210039666
Test: atest StylusHandwritingTest
Change-Id: I7399c0a56c04f024d65c16d459818cc2c5cdbc7f
Add a scene animation - image thumbnail in Chooser to full-size image in
the editor - when the thumbnail is visible.
Finishing Chooser activity while the transition animation is running
produces an effect of "flashing" background (as the activity disappears
before the animation completed). Thus the call to finish the activity is
delayed until the activity is stopped (i.e. becomes fully invisible).
Fix: 231448720
Test: Use 'Files' app to share an image, select Edit in the Chooser,
observe animation (optionally slow down the animation in the developer
settings)
Test: The same as the previous test but in the split-screen mode.
Test: Slow-down animation, select "edit" in the chooser and cancel the
animation mid-flight. The ChooserActivity pauses and resumes and
remains overall functional (had to slow down the fade-out animation in
the code). The animation in this case is broken but
addressing this case is beyond the scope of this change.
Test: Use a mock app with the dialog-themed activity instead of the
system image editor; check that Chooser fades out and finishes in
background.
Test: Accessibility with talk-back on.
Change-Id: I982b9b2a8a049b5986dce521ee1abcd9ad83ba38
Client insets controller can request to hide system bars to enter
immersive mode. However, there're cases force-show system bars like in
split screen or freeform mode. This makes sure the background view of
system bars are always visible while force-showing.
Fix: 234196894
Test: put an immersive app in split, verified system bars background
won't be invisible
Change-Id: Ia167bce9e64cd81a2ade499f8c6528384d957209