Commit Graph

23 Commits

Author SHA1 Message Date
Tony Mantler
4d27b2ce5b Move InputMethodAndSubtypeEnabler to SettingsLib and port to TV
Bug: 35315463
Test: adb shell am start -a android.settings.INPUT_METHOD_SUBTYPE_SETTINGS
Change-Id: I17e6e64ff2c01577d4036bccafe7d0b4ad1d5ca5
2017-02-17 14:04:40 -08:00
Tadashi G. Takaoka
7bbc632bfb Move physical keyboard search landing page to its Fragment
This CL moves the code building index of physical keyboards from
InputMethodAndLanguageSettings to PhysicalKeyboardFragment, so that a
search landing page becomes PhysicalKeyboardFragment as expected.

Bug: 32643633
Test: Connecting/Disconnecting Anker bluetooth keyboard while Settings
      app is/isn't running, the search Anker and verify landing page
      is PhysicalKeyboardFragment.
Test: Update robolectric DynamicIndexableContentMonitorTest.

Change-Id: I51f308ada74966a96c258f8ef50a9b4fc7bc6635
2017-01-10 15:56:45 +09:00
Tamas Berghammer
265d3c2a0c Update package names to work with the proto3 compiler
Bug: b/28974522
Change-Id: I5f3adf4946ee4ba1e09e4f40afe83c151405972a
2016-11-08 14:06:17 +00:00
Fan Zhang
aceee52a8b Remove dead code KeyboardLayoutPickerFragment.
Bug: 32642706
Test: compiles
Change-Id: I02b7abed470a813bff13fe9d71fcf870a47de6b3
2016-11-04 14:22:41 -07:00
Fan Zhang
6507613ebc Log visibility change for all fragments.
Bug: 30681771
Test: SettingsUnitTests

Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.

Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
2016-08-18 14:04:13 -07:00
Phil Weaver
fc3352e585 Fix return when virtual keyboard setting changes.
am: 3587914cef

Change-Id: I29b64c04eeb036f92ff937b70e247aaf0b2eb817
2016-07-25 20:34:41 +00:00
Abodunrinwa Toki
e7b3ad6726 DO NOT MERGE: InputSettings: Fix incorrect keyboard list on rotation.
This ports I1e4035f4dcff33e6b9a42d448303e962bd87c14b to MR1 dev.

Bug: 28182232
Change-Id: I292b00a21eb80577dbfec6a13f57b326571aefc7
2016-07-18 12:03:38 +01:00
Phil Weaver
3587914cef Fix return when virtual keyboard setting changes.
The OnPreferenceChangeListener for the preference to show
the virtual keyboard was returning false, indicating that the
new preference was not to be persisted, even though it was
persisting the setting. That caused the accessibility
framework not to be informed of the new value, which led
TalkBack to speak the old value rather than the new one.

Bug: 30140972
Change-Id: I02b7dc1db52cb7646650e6f2e49a1e15c2233897
2016-07-15 12:54:45 -07:00
Yohei Yukawa
966476b7dc Teach hard keyboard settings about correct user ID
Settings.Secure.SHOW_IME_WITH_HARD_KEYBOARD is a per-user settings.
PhysicalKeyboardFragment needs to use the current user's ID rather than
hard-coded user ID 0.

Bug: 29406181
Change-Id: Ie40f729f3c85e9ce9ad8f957caba338786b119d9
2016-06-16 00:02:01 -07:00
Yohei Yukawa
91c23ca03f Fix sentence capitalization of locale names.
It turns out that out previous CL [1] is not sufficient to address all
the requests regarding capitalization.

With [1], now InputMethodSubtype#getLocaleDisplayName() returns a locale
name whose capitalization is basically optimized to be used as a list
item.  It works well for list UI, but on a UI element that looks like a
sentence text, we still need to capitalize the first character.

This CL takes care of those UI elements in the Settings app.  This CL
also addresses a remaining TODO about locale-unaware text formatting by
using about android.icu.text.ListFormatter.

  [1]: If105082ce703db7a86738455db7e9fb37f3c6fe8
       e489baf96df2837a3a63b626d9023a4a8b322c28

Bug: 29035638
Change-Id: I59f93f0bc067cdd87c6065c972a7da3cde1128f9
2016-06-09 15:01:52 -07:00
Clara Bayarri
fcc411c807 Rename requestKeyboardShortcutsHelper
Per API Council feedback

Bug: 28775576
Change-Id: Ia19668dceb7da2222e9716fcb1caff8d0ee86c41
2016-05-16 14:16:46 +01:00
Abodunrinwa Toki
226e452c15 InputSettings: Define order of items in Physical keyboards screen.
Bug: 28158120
Change-Id: Ia7cec64edb9da53a2048865e317b2b9d4b2059b0
2016-05-05 13:52:03 +01:00
Michael Wright
276cc4d8ed Add subtext for default keyboard layout.
Bug: 27742933
Change-Id: I51bec339c0cbcfb114f85758b6a227deb57a69e2
2016-05-03 18:27:16 +00:00
Yohei Yukawa
696bf679dd Support IMEs that have no subtype in PhysicalKeyboardFragment.
With a Framework-side change [1],
InputManager#{get, set}KeyboardLayoutForInputDevice() are now able to
deal with null InputMethodSubtype as a valid input.  With this CL, we no
longer filter out IMEs that do not support subtypes in
PhysicalKeyboardFragment.

 [1]: Ia013784a594ad3beaf30976d047f5ac0fa8185be

Bug: 28182650
Change-Id: I46b9c5b018f08e3eaa4614a0893db0be91652f3c
2016-04-20 17:20:26 -07:00
Abodunrinwa Toki
bbf5df73f9 Merge "Show Physical keyboards only after everything has been loaded" into nyc-dev 2016-04-14 10:04:17 +00:00
Abodunrinwa Toki
6118469cae Show Physical keyboards only after everything has been loaded
This patch loads all physical keyboards at once and only updates the
screen after that returns. Previously, each keyboard's data was
loaded individually and the screen was updated for each keyboard
when the data was received.

Bug: 27549590
Change-Id: I05d80d74df14fb7bfaa0ce76a1f8919889865108
2016-04-11 11:38:48 +01:00
Clara Bayarri
ea8772a9c3 Add Keyboard Shortcuts Helper entry in Settings
Bug: 27811273
Change-Id: Ic4a97c869d6476bf427e41023dc595b39589e6ce
2016-04-06 14:55:49 +01:00
Yohei Yukawa
1dff385c16 Fix PhysicalKeyboardFragment crash bug.
The root cause of crash bug #27749932 is that the state mismatch between
when a Loader is created and when the Loader object finishes background
task.  We can easily reproduce this crash by:
  1. Pair two hardware keyboard A and B.
  2. Open Physical Keyboard settings.
  3. Press the power button to turn off the display.
  4. Move keyboard A far away so that it is unpaired.
  5. Press the power button to turn on the display.
  6. Unlock the device.

One of the reasons PhysicalKeyboardFragment was unstable is that loader
ID reuse.  PhysicalKeyboardFragment starts background data loading
because of many events such as #onResume() and #onInputDeviceAdded() but
there are chances that loader ID was reused because we specified
hardware keyboard device index as the loader ID.  This was dangerous
also because device index can change when a device is added and removed.
With his CL each loader object has an unique ID and
PhysicalKeyboardFragment keeps tracking the list of active Loader IDs
only from which PhysicalKeyboardFragment should accept data.

Also, this CL removes dependencies on PhysicalKeyboardFragment from each
loader object so that we can have a clear boundary of responsibility
between data loader and data consumer.

Bug: 27749932
Change-Id: I53fcb2426d028a492c775bb2b4ec6a5419e33bb4
2016-04-01 11:38:25 +00:00
Yohei Yukawa
143a686947 Stop using a deprecated constructor of InputMethodSettings.
This is a follow up CL to my previous CL [1], which added a new
constructor to InputMethodSettings to support File-Based
Encryption (FBE).

Settings app is the only remaining package that depends on the previous
constructor.  To completely deprecate the previous one, this CL lets the
caller switch to the new constructor.

Note that this CL does not change the initial parameters of
InputMethodSettings.  In other words this is a mechanical code
clean-up.

  [1] I9c6f9bb3d51174198e5f73588637f87ea0d90e11
      5db2f16f15549c490c9541602a96f42bef984acb

Bug: 26279466
Change-Id: I09cba4066b95c4a9e89a3e4f83d75b97882502dc
2016-03-16 20:50:28 -07:00
Jason Monk
3e19fc5600 Move temporary metrics constants to proto
Change-Id: I8fb3ac22df7bdc52039dd640f7696ebd32281f0b
2016-03-08 14:18:30 -05:00
Abodunrinwa Toki
c8da2e13a5 Settings app: Remove "Toggle keyboard shortcuts helper" button
Change-Id: I93bd51a05a8922e02e4e09add94d247442f67334
2016-01-26 21:10:15 +00:00
Abodunrinwa Toki
5f0b59babf Input settings: Associate keyboard layouts with device/IME subtype.
Implements selection of keyboard layouts using the new InputManager
methods that associate keyboard layouts to
device/InputMethodInfo/InputMethodSubtype
See: Ie88ce1ab77dbfe03ab51d89c1dc9e0a7ddbb3216

Bug: 25752812
Change-Id: Ib76880d66391ca37978054de80f4b3b5147cecc3
2016-01-26 20:57:06 +00:00
Abodunrinwa Toki
976bb3f459 Change Input Settings UI flow.
1. Introduces new UI components as per the new flow
2. Temporarily disables components in the old flow that are to be
   replaced by the new flow. This is done so we can neatly revert
   to the old flow if there are issues with the new flow
3. AvailableVirtualKeyboardActivity now responds to
   android.settings.INPUT_METHOD_SETTINGS intents instead of
   InputMethodAndLanguageSettingsActivity

Bug: 25752812
Change-Id: I728d7ee185827ed328c16cb7abce244557a26518
2016-01-22 18:24:44 +00:00