This is a follow up CL to my previous CLs [1][2], which let query APIs
defined in InputMethodManager support background users.
With this CL,
InputMethodManager#getCurrentInputMethodSubtype()
is also fully supported under multi-user / multi-profile environment.
[1]: I192a0f5a1375170d17a4c08af94f23966dbaea8b
7f8ee4b9dd
[2]: I48f57dc7184e85bdb422fd9d1d56e60381654125
e960986554
Bug: 34886274
Bug: 122164939
Bug: 237316307
Test: atest CtsInputMethodTestCases:InputMethodSubtypeTest
Change-Id: Icb09f9cb1a4147884faa9952b2e03ec4afa9f0b1
This CL lets
IInputMethodManager#startInputOrWindowGainedFocus()
take the useId as an explicit input parameter for consistency with
other IPC methods that are annotated with
@RequiresPermission(
value = INTERACT_ACROSS_USERS_FULL,
conditional = true).
Doing so enables us to
1. easily assume that INTERACT_ACROSS_USERS_FULL is necessary only
when userId parameter is different from the calling user ID.
2. place caller verification at the beginning of
InputMethodManagerService#startInputOrWindowGainedFocus()
like we do so in other Binder IPC methods.
There should be no semantic change in this CL. This CL is purely for
better readability.
Bug: 34886274
Bug: 237316307
Test: presubmit
Change-Id: I2755fd1f2425f1c0186d46a8e4d62995c8283050
This is a follow up CL to our previous CL [1], which introduced
IInputMethodManager#startProtoDump()
so that IME client process can upload its own IME tracing dump data
to InputMethodManagerService.
One may notice that there is no permission / caller verification in
InputMethodManagerService#startProtoDump(),
but the absence of a permission check there is by design. We need
unprivileged app processes to be able to send that tracing data. To
make it clear in the AIDL file, this CL adds @RequiresNoPermission to
that IPC method.
The annotation is basically for errorprone check [2]. There should be
no observable behavior change at the run time.
[1]: Ia89f11d5ef8a220ea7746191b18769cea5a8359d
cf9e5123ce
[2]: I26a872f07ab13931c241cbb02ff7228edf7dc3b9
71463a4cb1
Bug: 204904070
Bug: 237316307
Test: presubmit
Change-Id: Ia41be32333a668cbf112ba7394bcca8c8ba7db6a
This is a follow up CL to my previous CL [1], which let query APIs
defined in InputMethodManager support background users.
With this CL,
InputMethodManager#getLastInputMethodSubtype()
is also fully supported under multi-user / multi-profile environment.
[1]: I192a0f5a1375170d17a4c08af94f23966dbaea8b
7f8ee4b9dd
Bug: 34886274
Bug: 122164939
Test: atest CtsInputMethodTestCases:InputMethodSubtypeTest
Change-Id: I48f57dc7184e85bdb422fd9d1d56e60381654125
This CL lets
IInputMethodManager#getEnabledInputMethodSubtypeList()
take the useId as an input parameter for consistency with other query
methods.
There should be no developer observable behavior change because now
InputMethodManager#getEnabledInputMethodSubtypeList()
specifies its own user ID.
Bug: 34886274
Test: make -j CtsInputMethod1 \
CtsInputMethod2 \
CtsInputMethodServiceDeviceTests \
CtsInputMethodServiceEventProvider \
CtsInputMethodServiceHostTestCases \
EditTextApp &&
atest CtsInputMethodServiceHostTestCases
Change-Id: Ie213ef7e04d6337e303ea331d0a00c7d7f9a6d1a
With this CL, the following IPCs start requiring callers to have
CONTROL_UI_TRACING permission [1].
* IInputMethodManager#startImeTrace()
* IInputMethodManager#stopImeTrace()
Note that the following shell commands
adb shell cmd input_method tracing start
adb shell cmd input_method tracing stop
should not be affected by this CL because those commands are directly
handled by
* IInputMethodManager#onShellCommand(),
which has been guarded with calling UID check [2].
[1]: Ibdeb38dc9a066cb8ed2904adcdac29014b166526
2ad02a383b
[2]: If87189563ccaacd4f9c666bab4f9ad08a9343084
b8d240fa3f
Bug: 34886274
Bug: 172444310
Bug: 237316307
Test: make RunSettingsRoboTests ROBOTEST_FILTER="WinscopeTraceTest"
Test: Manually verifies as follows.
1. build aosp_coral-userdebug and flash it.
2. Go to System Settings.
3. Enable Developer Mode.
4. Go to Developer Options.
5. Tap "Quick settings developer tiles"
6. Enable "Winscope Trace"
7. Pull down the quick settings drawer then Tap Winscope Trace.
8. Tap some edit field to show AOSP Keyboard.
9. Pull down the quick settings drawer then Tap Winscope Trace.
10. adb root
11. adb shell ls -al /data/misc/wmtrace/
12. Make sure that tracing files are saved there.
Test: Manually verifies as follows.
1. build aosp_coral-userdebug and flash it.
2. adb shell cmd input_method tracing start
3. Tap some edit field to show AOSP Keyboard.
4. adb shell cmd input_method tracing stop
5. adb root
6. adb shell ls -al /data/misc/wmtrace/
7. Make sure that tracing files are saved there.
Test: Manually verifies as follows.
1. build aosp_coral-userdebug and flash it.
2. adb root
3. adb shell cmd input_method tracing start
4. Tap some edit field to show AOSP Keyboard.
5. adb shell cmd input_method tracing stop
6. adb shell ls -al /data/misc/wmtrace/
7. Make sure that tracing files are saved there.
Change-Id: Iaee7be9fb5066664b283a64273bf8685ba966046
Update terminology to eliminate ambiguity and to match
http://go/android-locksettings-design :
- The class that represents a synthetic password is now called
SyntheticPassword instead of AuthenticationToken. This eliminates an
inconsistency and avoids ambiguity with the other types of
authentication tokens (HardwareAuthTokens and escrow tokens).
- "LSKF" is now used in preference to "password", which could be
confused with LSKFs of type password and with the many other types of
password (synthetic, Keystore, Gatekeeper). "Password" is still used
in places like "password data", "password metrics", and "password
history"; renaming those in the design doc and code is left for later.
- The things that protect the SP are now called "SP protectors", or just
"protectors" when SP is clear from context. Previously these were
called "synthetic passwords" (ambiguous with the SP) or "SP blobs"
(ambiguous with the spblob file, which is just part of a protector).
- The 64-bit integers that identify protectors are now called "protector
IDs" instead of "synthetic password handles". This avoids ambiguity
with the SP's Gatekeeper password handle (which in the code is just
called a "synthetic password handle"; a later CL might clarify that),
and it clarifies that the identified items are SP protectors, not SPs.
- The secret that each protector uses to protect the SP is now called
the "protector secret" instead of the application ID. This avoids
ambiguity with the Keystore application ID, which isn't being used and
is a less intuitive name.
No behavior changes intended, except for some changed log messages.
Test: atest com.android.server.locksettings
Test: Basic manual test of locksettings core functionality: upgraded a
device that has a pattern set, without wiping userdata; unlocked;
changed to PIN; rebooted; unlocked; changed to swipe; rebooted;
changed to password; rebooted; and unlocked.
Change-Id: I564a738119a47a31b4822d26c6405249f8ce1c06
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