Checks the machine is currently in one of the pulse states before
query the current pulse reason. Avoid incorrect undocked event cause
DozeService crash. And refines test case and javadoc.
Bug: 120464108
Test: atest SystemUITests
Test: manual
Change-Id: I3595217984ec7982de1f0f53765e7ae0a9d80fcf
Improved the docking experence, let DozeService can enter always on mode
when docking if device has a docking manager. Listening the docking events
to enter/leave pulsing state.
Bug: 120464108
Test: atest SystemUITests
Change-Id: Ic3d89bdd7a18a069e3ee4f35c9bd677069bf1c43
This is a preparation to introcude following two methods into
InputMethodManagerService (IMMS).
* getInputMethodListForUser(int userId)
* getEnabledInputMethodListForUser(int UserId).
In order to implement those methods (with minimum changes), the logic
to create List<InputMethodInfo> for the given user needs to be
extracted out from IMMS#buildInputMethodListLocked() to avoid code
duplicate.
This CL itself is a mechanical refactoring hence there should be no
behavior change.
Bug: 120709962
Test: atest CtsInputMethodTestCases CtsInputMethodServiceHostTestCases
Change-Id: I7f7e3637ea44dddc1210bc2889b519f17bbcd545
This is a preparation to implement per-profile IME in
InputMethodManagerService (IMMS).
Multi-client IME is designed and implemented to be able to deal with
multiple profiles at the same time from its beginning [1]. This means
that when multi-client IME is enabled with system properties, it also
means that per-profile IME is enabled.
At the same time, the following classes need to change its behavior
whether per-profile IME is enabled or not.
* android.provider.Setings
* com.android.server.inputmethod.InputMethodManagerService
* com.android.server.textservices.TextServicesManagerService
* com.android.server.devicepolicy.DevicePolicyManagerService
* com.android.server.devicepolicy.OverlayPackagesProvider
The problem is that android.provider.Setings lives in the
frameworks.jar. Hence if we want to expose something like
PER_PROFILE_IME_ENABLED to android.provider.Setings, then such a flag
needs to live in frameworks.jar.
Note that this is expected to be a temporary change. Once per-profile
IME becomes always enabled in IMMS, we can safely roll back this
change.
Note also that static initializer of InputMethodSystemProperty is
expected to be evaluated only once as long as
InputMethodSystemProperty is loaded before Zygote.
[1]: I41dfe854557b178d8af740bc2869c936fc88608b
bae5bea23c
Bug: 120709962
Test: prebuilts/checkstyle/checkstyle.py -f \
frameworks/base/core/java/android/view/inputmethod/InputMethodSystemProperty.java
Test: Manually verified as follows:
1. make -j MultiClientInputMethod
2. adb install -r $OUT/system/priv-app/MultiClientInputMethod/MultiClientInputMethod.apk
3. adb root
4. adb shell setprop persist.debug.multi_client_ime \
com.example.android.multiclientinputmethod/.MultiClientInputMethod
5. adb reboot
6. Make sure that multi-client IME is enabled
Change-Id: Iad8aba7edb1e60ccc1ce5192a11e01b6aa8d00a0
To verify WRITE_SECURE_SETTINGS for ime shell commands,
Context#enforceCallingPermission() would be much simpler and better
because those methods should never be called outside IPCs.
If components inside the system server process need those
functionality, InputMethodManagerInternal should be used instead.
Bug: 34886274
Test: Manually tested as follows.
1. make -j SoftKeyboard
2. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
3. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
4. adb shell ime set com.example.android.softkeyboard/.SoftKeyboard
5. Make sure that SoftKeyboard is enabled and selected
6. adb shell ime reset
7. Make sure that SoftKeyboard is no longer enabled and selected
Change-Id: I556ad844b9f7d62dda40fc18b3ca7d8736660898