Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit a89238e8 authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

Extract out Secure Settings wrapper from InputMethodSettings

This is a replacement refactoring of my previous commit [1], which
aimed to achieve a special UX on direct-boot enabled devices.

One of reasons why InputMethodUtils.InputMethodSettings is used in so
many places is because the special handlig for direct-boot mode is
implemented there.  This commit aims to break this hard dependency by
extracting out the Secure Settings wrapper from InputMethodSettings to
SecureSettingsWrapper so that other components can also access to the
same storage without instantiating InputMethodSettings.

The user observable behavior should be semantically the same.

 [1]: I9c6f9bb3d51174198e5f73588637f87ea0d90e11
      68645a63

Bug: 309837937
Test: presubmit
Test: Manually verified as follows:
  1. Build aosp_bluejay-trunk_staging-userdebug then flash it.
  2. make -j SoftKeyboard
  3. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
  4. adb shell ime enable com.example.android.softkeyboard/.SoftKeyboard
  5. adb shell ime set com.example.android.softkeyboard/.SoftKeyboard
  6. adb shell ime disable com.android.inputmethod.latin/.LatinIME
  7. adb shell settings get secure enabled_input_methods
    -> com.example.android.softkeyboard/.SoftKeyboard
  8. adb shell settings get secure default_input_method
    -> com.example.android.softkeyboard/.SoftKeyboard
  9. adb shell locksettings set-password aaaa
 10. adb reboot
 11. Wait until the lock screen is shown
 12. adb shell settings get secure enabled_input_methods
    -> com.android.inputmethod.latin/.LatinIME
 13. adb shell settings get secure default_input_method
    -> com.android.inputmethod.latin/.LatinIME
 14. Type "aaaa" and hit the enter button
 15. Wait until the home screen is shown
 16. adb shell settings get secure enabled_input_methods
    -> com.example.android.softkeyboard/.SoftKeyboard
 17. adb shell settings get secure default_input_method
    -> com.example.android.softkeyboard/.SoftKeyboard
 18. adb shell ime list -s
    -> com.android.inputmethod.latin/.LatinIME
 19. Type "aaaa" to unlock the user
 20. adb shell ime list -s
    -> com.example.android.softkeyboard/.SoftKeyboard
Change-Id: I909186c2438760a973cc963664a187c5acadd88f
parent 032f39a7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment