Commit Graph

338 Commits

Author SHA1 Message Date
Amin Shaikh
e2815e033d Remove duplicate ic_menu_add_white.
Bug: 123829919
Test: mp settingsg
Change-Id: I88e0dde22762eb6bc019361222ffe783b1c15133
2019-02-04 17:59:29 -05:00
Yohei Yukawa
bcb87f7492 Add "Work profile" section to Languages and input settings
This CL adds "Work profile" section to Languages and input settings.

The new section is visible when and only when work profile is enabled.
Hence there should be no user-visible behavior difference when work
profile is not enabled.

If per-profile IME [1] is also enabled, the following 3 preferences
will be shown in the new section.

 * Virtual keyboard for work
 * Spell checker for work
 * Personal dictionary for work

 [1]: Ied99664d3dc61b97c919b220c601f90b29761b96
      a878b9500e6b89dce9738179edc27bcd0d736b7e

Fix: 120748696
Test: Manually verified as follows.
  1. Build and flash an AOSP build
  2. adb root
  3. adb shell setprop persist.debug.per_profile_ime 1
  4. adb reboot
  5. Install Test DPC
  6. Enable managed profile with Test DPC
  7. tapas SoftKeyboard && make -j
  8. adb install -r --user 0 $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
  9. tapas SampleSpellCheckerService && make -j
 10. adb install -r --user 0 \
     $OUT/system/app/SampleSpellCheckerService/SampleSpellCheckerService.apk
 11. Open Settings -> System -> Languages & input
 12. Virtual Keyboard -> Manage keyboards:
     Make sure both "Android Keyboard" and "Sample Soft Keyboard" are shown.
 13. Spell checker -> Default spell checker
     Make sure "Android Spell Checker" and "Sample correction" are shown.
 14. Advanced -> Virtual Keyboard for Work -> Manage keyboards
     Make sure that only "Android Keyboard" is shown.
 15. Advanced -> Spell checker -> Default spell checker
     Make sure that only "Android Spell Checker" is shown.
Change-Id: Id88928318ab1cd92963d652ae39ca772222ea4ac
2019-01-25 10:14:45 -08:00
Fan Zhang
31b210017b Migrate all MetricsProto enums to SettingsEnums
Bug: 122855168
Test: rebuild
Change-Id: I962d9a71179f86b7cae9dc5e9a00e0aa1557dc76
2019-01-17 14:55:42 -08:00
tmfang
a75eea1b01 Fix crash on KeyboardLayoutDialogFragment
Since view id changed after fragment migration,
we correct view id.

Change-Id: If81ca06423ac62fd9f6a118be0b5fe3c93356142
Fixes: 117559309
Test: robotest
2018-10-12 01:27:46 +08:00
Fan Zhang
23f8d59d02 Sort imports
Having consistent import order will reduce chance of merge
conflict between internal and external master

Test: rebuild
Change-Id: I0b1a170967ddcce7f388603fd521f6ed1eeba30b
2018-08-28 22:13:15 +00:00
Fan Zhang
9ce4a1fcde Use searchable="false" to suppress nonIndexables.
When possible, remove or simplify getNonIndexable() logic in fragments,
and use searchable="false" in xml to suppress index.

Change-Id: I5bdf5bc7d5494a64cdd9e230a51321a4b210af69
Fixes: 112608186
Test: robotest and manual search
2018-08-17 09:21:05 -07:00
tmfang
41ab6b4bf8 Migrate all AlertDialogs to AndroidX version
This CL only changed AlertDialog imports.
So, reviewer can review it easily.

Change-Id: I097bc44394195b14287f4f920c570ac8653f356a
Fixes: 111413092
Test: This CL can't pass Robo test.
2018-07-20 11:32:13 +08:00
tmfang
27c84de325 Settings Fragment Migration (Build pass app)
This patch focused on fixing compile errors and some runtime errors.

Test: We can't test it now. But we will have an integration test later.
Bug: 110259478
Change-Id: I16c471ddcd0fa1460c665b7f74d86fcace5ee67b
2018-07-11 18:24:51 -07:00
tmfang
99cc23d0da Settings Fragment Migration (Change imports)
This commit *only* changes imports and optimize imports.
We don't do anything else.

This patch can't compile pass and run test case.
We will update other patches to fix these problem.

Change list.

1. import android.app.Fragment; ->
   import androidx.fragment.app.Fragment;
2. import android.app.DialogFragment; ->
   import androidx.fragment.app.DialogFragment;
3. import android.app.ListFragment; ->
   import androidx.fragment.app.ListFragment;
4. import android.app.LoaderManager; ->
   import androidx.loader.app.LoaderManager;
5. import android.content.AsyncTaskLoader; ->
   import androidx.loader.content.AsyncTaskLoader;
6. import android.content.Loader; ->
   import androidx.loader.content.Loader;
7. import android.app.FragmentTransaction; ->
   import androidx.fragment.app.FragmentTransaction;
8. import android.app.FragmentManager; ->
   import androidx.fragment.app.FragmentManager;
9. import android.app.LoaderManager.LoaderCallbacks; ->
    import androidx.loader.app.LoaderManager.LoaderCallbacks;

Bug: 110259478
Test: Can't test it.
Change-Id: I0a3f98fff34a3494a839c3c42aeabcec3df2c8b3
2018-07-11 18:23:51 -07:00
Fan Zhang
af1552251f Add some pages to search index.
* Notification access page
* VR Listener page
* Feature flags in dev options
* QS Tile developer options
* User dictionary
* Billing cycle
* Some accessibilty pages

Bug: 70720645
Test: robotests
Change-Id: I4f7d3d65b2803cebf178ac345a79721232df707c
2018-07-11 16:39:29 -07:00
Fan Zhang
78ea7da54c Misc tweaks to Indexable usage and tests.
- Make SettingsPreferenceFragment implement Indexable directly
- Add existing fragments that are SettingsPrefFragment but not Indexable
  to grandfather list.
- Fix "font size" fragment so it shows up in search properly.
- Remove duplicates for "lock screen display", "Screen saver".

Bug: 70720645
Test: robotests
Change-Id: I44ce0cac0fdf5e882b315861bb4bebc45dbe01e6
2018-07-02 16:46:23 -07:00
Fan Zhang
c7162cd24d Reorder and clean up imports.
Test: rebuild
Change-Id: I178485c84ae7146f991fd77b6d7504b029942a68
2018-06-18 15:45:09 -07:00
android-build-team Robot
02ec86a17b Merge "Establish permanently unavailable settings" 2018-05-09 18:14:32 +00:00
Matthew Fritze
f87a1f3f41 Establish permanently unavailable settings
Distinguish between settings which are permanently unavailable on
the device, and temporarily unavailable. This enables us to restrict
which setting slices are exposed in onSliceGetDescendants.

The primary changes in this CL are renaming:
"DISABLED_UNSUPPORTED" -> "UNSUPPORTED_ON_DEVICE"
to be more clear the the setting will cannot be accessed on the device, and,
adding a new enum to encapsulate settings which are currently unavailable, but
could be enabled in the future.

Also remove UNAVAILABLE_UNKNOWN. Devs should never need this enum.

Bug: 78910582
Bug: 79245656
Test: robotests
Change-Id: I58821a6cfd6134b3b351657b6edf5f74ead00643
2018-05-09 08:36:59 -07:00
hjchangliao
e86eec0c07 Rename SubSettingLauncher.setTitle, add java doc
For make this method usage more clear,
setTitle(charSequence) rename as setTitleText,
add java doc: it is only for user generated string
setTitle(int) rename as setTitleRes.

Change-Id: I972cb6a8ff90873dfdc25c23f6dc3d68103c8e4e
Fixes: 78347436
Test: make RunSettingsRoboTests
2018-05-09 10:00:05 +08:00
jyhshiangwang
4d015b17b3 Use ListFormatter to join strings
Currently in Settings we are using R.string.join_many_items_first, R.string.join_many_items_middle and R.string.join_many_items_last to manually join strings. The join code is messy and the joined string is incorrect in some languages, so we migrate all string join to just use ListFormatter.getInstance().format().

Bug: b/78248791
Test: robotests
Change-Id: I898339978e6e2027587e28994b0280fa46821fd6
2018-05-02 11:15:32 +08:00
rafftsai
9bd1ac38c5 InputMethodAndSubtypeEnabler use DashboardFragment
- Move preference log to InputMethodAndSubtypePreferenceController
- Add input_methods_subtype.xml

Test: manual
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.inputmethod
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.core
Test: atest UniquePreferenceTest

Change-Id: I45b6e8303d94ef07d17016eeed1d728432a70d98
2018-04-25 17:34:04 -07:00
TreeHugger Robot
a94f9175c0 Merge "Fix a incorrect class cast in GameControllerPreferenceCtrl" 2018-04-25 01:36:51 +00:00
Fan Zhang
7d7a9b1837 Fix a incorrect class cast in GameControllerPreferenceCtrl
Also convert the controller to TogglePrefCtrl, and register it in xml.

Change-Id: Ifbc95364b47690117b2875cba1cdc4761ad205be
Bug: 71972185
Test: make RunSettingsRoboTests
2018-04-25 00:33:22 +00:00
Fan Zhang
ee3b74a61f Create a new string for keyboard disconnected state
Change-Id: I454bbb3b8e0ee22c0f7a5a340b86dfd5607de86e
Fixes: 77957016
Test: robotests
2018-04-23 14:59:19 -07:00
Aurimas Liutikas
e0069d332d Migrate Settings to androidx.
Test: make Settings
Bug: 76692459
Change-Id: I941dea40562170649bf056e675cc32e5163c0e39
2018-04-20 12:52:29 -07:00
tmfang
f1191f6bf9 KeyboardLayoutPickerFragment uses DashboardFragment
- Build a controller to generate a list of preferences and add to screen.
- Move some logic to controller.
- Add some test cases for controller.

Test: manual
Test: make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.inputmethod
      make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.core
      make RunSettingsRoboTests -j ROBOTEST_FILTER=com.android.settings.dashboard
      atest UniquePreferenceTest
Change-Id: I4ebe486ade3439b9814b11866c402dcf881f21a7
2018-04-17 17:35:29 -07:00
Emily Chuang
5e3718d354 Migrate UserDictionaryList to DashboardFragment
- Build a controller to generate/manage a list of preferences.
- Move some logics to the controller and add tests.

Test: manual
Test: make RunSettingsRoboTests -j
      atest UniquePreferenceTest SettingsGatewayTest
Change-Id: Ia3d885cb8917c7d5498b87818e24b938f0d95dbb
2018-04-17 12:27:24 -07:00
Yohei Yukawa
9f172540b1 Remove the dependency on InputMethodSettings
InputMethodUtils.InputMethodSetting is a quite complicated inernal
class of InputMethodUtils and PhysicalKeyboardFragment's depending on
it just for getting/setting SHOW_IME_WITH_HARD_KEYBOARD is overkill.

With this CL, PhysicalKeyboardFragment just uses Secure Settings APIs
directly.

There should be no user-visible behavior change.

Bug: 77730201
Test: Manually verified as follows:
 1. Open system settings.
 2. Tap "System" -> "Languages & input" -> "Physical keyboard"
 3. Make sure "Show virtual keyboard" is unchecked
 4. Make sure the following command shows 0
      adb shell settings get secure show_ime_with_hard_keyboard
 5. Check "Show virtual keyboard"
 6. Make sure the following command shows 1
      adb shell settings get secure show_ime_with_hard_keyboard
 7. Run the following command
      adb shell settings put secure show_ime_with_hard_keyboard 0
 8. Make sure "Show virtual keyboard" is chenged to unchecked
Change-Id: I956da5dad27313d6edf141f2320bb0a7954fbbea
2018-04-13 18:13:09 -07:00
Tony Mantler
0fcd6cbaa8 Autogenerate SearchIndexableResources subclass
Bug: 77148954
Test: RunSettingsLibRoboTests RunSettingsRoboTests RunSettingsGoogleRoboTests RunArcSettingsRoboTests
Change-Id: I842c42c55014c3310070ef22bd4f0d9a70dfd804
2018-04-03 10:26:55 -07:00
TreeHugger Robot
cb601396d4 Merge "Logically revert "Directly show the layout selection screen."" into pi-dev 2018-03-21 15:01:11 +00:00
Yohei Yukawa
690f103ca5 Logically revert "Directly show the layout selection screen."
This is logical revert of a CL [1] that was recently re-introduced as
part of my recent CL [2].

Reason for revert:
Directly showing the layout selection screen when there is no hardware
keyboard is selected yet is not something people had been familiar
with.

That behavior had been enabled only in a short period during Android N
development cycle and was never enabled in most of production builds.
To avoid confusions, let's revert back to the true Android M behavior
by logically reverting that change.

 [1]: I4483dfc89afc8d148b2cfa7c6a5f66d2a02f712a
      17b6319884
 [2]: I7a2ed6dd39dcd8207d3d94e12cd01d5d67ba4bb5
      7129b374bb

Change-Id: If0529e20cbff432d38d9b2dd74eeb3af0da5baf1
Bug: 66498367
Fix: 75318417
Test: Manually verified
2018-03-19 19:20:29 -07:00
Fan Zhang
1a77cfc8fe Update switch bar summary for spell checker page
Change-Id: If48ad81e5ad5e4a7bd65ede5ed67d28250fbe8ed
Fixes: 75277295
Test: atest SpellCheckerSettingsUITest
2018-03-19 18:05:10 -07:00
Yohei Yukawa
7129b374bb Reenable pre-N style hard keyboard layout settings
This CL logically reverts Settings app changes for Bug 25752812, which
aimed to improve UX by tightly integrating physical keyboard layout
with input method subtype.

What went wrong is that the concept of input method subtype is not
widely accepted by the ecosystem actually.  Until we figoure out any
other better way here, let's revert back to the good old way that
enables users to specify multiple keyboard layouts per physical
keyboard device, not one layout per one input method subtype.

Note that we cannot simply revert the CL that originally introduced
the new flow [1] because it was indeed a huge CL that also touched IME
settings, which we want to continue using.  In that sense, this CL is
a kind of re-implementation of the previous style on top of the recent
language settings flow.

Note also that a fix [2] fox Bug 25062009 was also ported from
previous InputMethodAndLanguageSetting to
KeyboardLayoutPickerFragment.

 [1]: I728d7ee185827ed328c16cb7abce244557a26518
      976bb3f459
 [2]: I4483dfc89afc8d148b2cfa7c6a5f66d2a02f712a
      17b6319884

Fix: 66498367
Test: make -j RunSettingsRoboTests
Test: Manually done with two Bluetooth keyboards
Change-Id: I7a2ed6dd39dcd8207d3d94e12cd01d5d67ba4bb5
2018-03-09 01:54:55 +00:00
Fan Zhang
47854c2945 Migrate more places to subsetting launcher
Bug: 73250851
Test: robotests
Change-Id: Iaf29df45ddb42fd58f181cb01e10998a97cb7c34
2018-02-19 14:21:05 -08:00
Fan Zhang
7cf99f5f12 Migrate more settings to use SubSettingsLauncher
Bug: 73250851
Test: robotests
Change-Id: I08f6f380489646231d6d8ceb1488e2efb036bf69
2018-02-18 21:10:03 -08:00
Doris Ling
72489725c6 Change superclass to InstrumentedFragment.
- for fragments that do not implement the preference screen, change them
to inherit from InstrumentedFragment instead.

Change-Id: I791c2634024bd2c248efea955be5c680180d735c
Fixes: 68277111
Test: make RunSettingsRoboTests
2018-02-02 13:41:16 -08:00
Jin Dong
bdcd50328f Merge "Fix memory leak of page "Languages & input"" am: f94ff6ce6f am: 6d55e0633e
am: dd91556778

Change-Id: I5fb3f956aab62b5500bfa5d753061980371b41b5
2018-02-02 14:52:58 +00:00
Jin Dong
d39c52f99e Fix memory leak of page "Languages & input"
When enter/exit from "Languages & input" screen repeatedly, memory
leak happens since InputDeviceListener is not unregistered.

Listener registration is called in onPause() when exiting from the
screen, but new activity is created when enter the screen and the
listener registered by previous activity is not unregistered in
onResume().

Bug: 72675680
Test: Manual - Repeat enter and exit "Language & input" page for
several times and check if the count of activity doesn't increase.
Change-Id: I8e0be0ab4b1d13d53c3868b10f409d1e06387c2f
2018-01-30 10:54:00 +00:00
Leif Hendrik Wilden
28dee1f086 Migrate to use instrumentation classes from settingslib.
Test: Compiles. Manually tested.
Change-Id: I70a6e76cc8440547746ecc008c32bd06a7de8161
2018-01-24 12:30:39 -08:00
Leif Wilden
cab0ee611d Revert "Migrate to use instrumentation classes from settingslib."
This reverts commit 1546cca529.

Reason for revert: Broke fingerprint setup flow. b/72267201

Change-Id: I8321265ae64732c526325882ddea51080decddf5
2018-01-22 20:57:36 +00:00
Leif Hendrik Wilden
1546cca529 Migrate to use instrumentation classes from settingslib.
Test: Compiles. Manually tested.
Change-Id: Ie5515bb0fe3e621fc7723a9b04ba23e4bfa9c401
2018-01-18 11:13:24 -08:00
Ben Lin
c28b46f2ea Introduce boolean flags to show/hide items for Language & input.
This adds seven new boolean flags:
config_show_phone_language
config_show_virtual_keyboard_pref
config_show_physical_keyboard_pref
config_show_spellcheckers_settings
config_show_tts_settings_summary
config_show_pointer_speed
config_show_vibrate_input_devices

Which when individually set to false, will hide the item from "Language
& input" in System. It will also hide them from surfacing in search
results.

Bug: 62379555
Test: Individual controller tests are all updated.

Change-Id: I9ef1c3037b0bec6ffa5a627006507f4f16e534c4
2018-01-10 11:27:58 -08:00
jackqdyulei
e6f052e928 Merge "Add owners to setting packages."
am: f82cd59476

Change-Id: Ic7c94f6ba65149cdc799332a0cc5976ff285f16f
2017-11-21 16:41:50 +00:00
jackqdyulei
d6a00cfa3f Add owners to setting packages.
Bug: 65294119
Fixes: 69384604
Test: Build

Change-Id: Ib4fddc1f04087671d8445fd967d4262287e5c4f3
Merged-In: I927052a73f639d0894600611cd5c79293f43ff5e
Merged-In: Ia1eb8155f2d4359d56b0babd474083295ba38a0b
Merged-In: I24ec103ff5013ad416e3dfb1c548acd387b4ba64
Merged-In: If9fddc8b4e2e6d4d7db185ab16063e824323b9a7
Merged-In: I49159950521a013422b1087ea2c3e6cd5151457c
Merged-In: I69af58183c5b89af96c1a8808665fa506a620012
Merged-In: Ie9492f497824cd2b2727dde9d3a48452c72f1084
Merged-In: I2fd0249fd8b555e5ca93c3aec13857e6c74e157c
Merged-In: Id1c2d9233643a18c1e104255a9e2b8b1aaefc44e
Merged-In: Icdcfaaf6cc7a1e1cf77e89a79d0425cab4405ffc
Merged-In: I697528ff260a0f8e54aa1188e35143e668800e7d
Merged-In: I1486782f476acaf1e2e4b66df57869409239986f
Merged-In: I804b50a38c877da80b5ef3251e16029259014152
Merged-In: I39eec9ebc1db2dc14669f27b17624394e25eb47f
Merged-In: I054a6df08046cda1c2f202390ed24839a6b10349
Merged-In: I9da5bd71ed6aa3922a7f2e2ac4729e3247a204ce
Merged-In: I63778c68f1ab9edc36a9e12aa1729f8fd6a5e073
2017-11-20 16:39:59 -08:00
TreeHugger Robot
a562bdef8b Merge "Add OWNERS for folder inputmethod" 2017-09-12 23:48:55 +00:00
jackqdyulei
e5a2816656 Add OWNERS for folder inputmethod
Bug: 65294119
Test: Manual
Change-Id: Icdcfaaf6cc7a1e1cf77e89a79d0425cab4405ffc
2017-09-06 15:43:00 -07:00
Fan Zhang
31d8a89220 Misc polishing fixes for Settings
- Never return null when querying userDictionaryLocales
- Auto mirror mobile setting icon in RTL to match status bar.

Fixes: 65298627
Fixes: 65361092
Test: robotests
Change-Id: I0f9827f7bc23baf4895712c0f86584aeccfb9c73
2017-09-06 10:58:52 -07:00
Fan Zhang
e3535d9998 Delete DynamicindexableContentMonitor & all refs to it
Convert input device search into a search query loader

And remove old logic from DynamicIndexableContentMonitor

Change-Id: If652b1ea7c8add9185bbd025055e14925d3a8eec
Bug: 64310452
Bug: 63831980
Test: robotests
2017-08-09 17:27:02 -07:00
Tadashi G. Takaoka
48f8ab9bc9 Merge "Remove SHOW_INPUT_METHOD_PICKER receiver" into oc-mr1-dev 2017-08-04 04:11:42 +00:00
Fan Zhang
0d64577205 Fix search indexing for game controller "use vibrator"
Change-Id: I34848a58b5ac4cdf58c7dd5f40677b78e764f2dc
Fix: 64035933
Test: robotests
2017-07-26 21:51:57 +00:00
Tadashi G. Takaoka
38a58371a0 Remove SHOW_INPUT_METHOD_PICKER receiver
Although there is a security check for IMM#showInputMethodPicker() [1],
any background application can virtually call the method via explicit
broadcast intent to Settings app.

Since showing IME picker from the notification has implemented in
InputMethodManagerService using protected-broadcast [2], the receiver in
Settings app isn't necessary and should be removed to close the security
bypass.

Note that this broadcast receiver stops working from Android-O due to
background check [3].

 [1]: I4f0fc21268200c64d12b31ca54416acfbf62f37b
 [2]: Id36c8c34159bea8b72557b40bcf024d401f580b6
 [3]: https://developer.android.com/preview/features/background.html#broadcasts

Test: The following broadcast intent will not show IME picker.
  $ adb shell am broadcast \
        -a android.settings.SHOW_INPUT_METHOD_PICKER \
        com.android.settings
Fixes: 64008672
Bug: 63644555
Change-Id: Id990c66516c9b3ed7ada6891746ec0e0eecbe545
2017-07-25 19:17:57 +09:00
Fan Zhang
6539c9a1d0 Load only unique dictionary words
- Move UserDictionarySettings to sub package
- Convert cursor to loader

Fix: 22058788
Test: robotests

Change-Id: I1e8828abee58362b815abc210c044b678bf9d578
2017-07-13 16:05:35 -07:00
TreeHugger Robot
afeb5e2d45 Merge "Settings app changes spell checker settings directly without TSM APIs" 2017-06-30 15:19:35 +00:00
Guliz Tuncay
04ac51b23c Settings app changes spell checker settings directly without TSM APIs
Previously, Settings application was using TextServicesManager APIs to
update any of the spell checker settings (i.e., enabled/disabled, spell
checker, subtype). Since these APIs are used only by the Settings
application, there is no need to expose it to other services and the
Settings application can directly write them to secure settings since it
has the WRITE_SECURE_SETTINGS permission.

Bug: 62950392
Test: Manually as follows.
      1. Build and flash an OS image.
      2. Complete the setup wizard (if any).
      3. Make sure AOSP Keyboard (com.android.inputmethod.latin) is installed
      4. Install SampleSpellCheckerService
       4.1 tapas SampleSpellCheckerService
       4.2. make -j
       4.3. adb install -r out/target/product/generic/system/app/SampleSpellCheckerService/SampleSpellCheckerService.apk
      5. Go to spell checker settings in the system settings
      6. Select 'SampleSpellCheckerService' through Settings app
      7. Run
           adb shell settings get secure selected_spell_checker
         and make sure it returns the following value
           com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
      8. Run
           adb shell settings get secure selected_spell_checker_subtype
         and make sure it returns '0'
      9. Select 'Android Spell Checker (AOSP)' through Settings app
     10. Run
           adb shell settings get secure selected_spell_checker
         and make sure it returns the following value
           com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
     11. Run
           adb shell settings get secure selected_spell_checker_subtype
         and make sure it returns '0'
     12. Tap 'Languages' on the spell checker settings to select 'French'
     13. Run
           adb shell settings get secure selected_spell_checker_subtype
         and make sure it returns '102517'
     14. Select 'SampleSpellCheckerService' again through Settings app
     15. Run
           adb shell settings get secure selected_spell_checker
         and make sure it returns the following value
           com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
     16. Run
           adb shell settings get secure selected_spell_checker_subtype
         and make sure it returns '0'
Test: Manually as follows.
      1. Build and flash an OS image.
      2. Complete the setup wizard (if any).
      3. Make sure AOSP Keyboard (com.android.inputmethod.latin) is installed
      4. Install SampleSpellCheckerService
       4.1 tapas SampleSpellCheckerService
       4.2. make -j
       4.3. adb install -r out/target/product/generic/system/app/SampleSpellCheckerService/SampleSpellCheckerService.apk
      5. Set the current spell checker service to be AOSP SCS by
       adb shell settings put secure selected_spell_checker com.android.inputmethod.latin/.spellcheck.AndroidSpellCheckerService
      6. Run a test program that has TextView and tap on one of the
       TextViews and type some text.
      7. Observe that there is a connection to AOSP SCS by
       adb shell dumpsys textservices
      8. Set the current spell checker service to be
      SampleSpellCheckerService SCS by
adb shell settings put secure selected_spell_checker com.example.android.samplespellcheckerservice/.SampleSpellCheckerService
      9. Tap on the same TextView as in Step 6
      10. Observe that there is a connection to SampleSpellCheckerService
      SCS (for this TextView) by
       adb shell dumpsys textservices
Change-Id: I2f3d5282a342bcb42abf995d6e7834241e11cd4f
2017-06-29 18:28:29 +00:00