Commit Graph

11 Commits

Author SHA1 Message Date
Vaibhav Devmurari
8754f114ac Modify PK Settings page to make it more user friendly
PK Settings page:
    - Show current PK layout selected for the current user profile and current IME language instead of a list of IMEs

PK layout mapping page:
    - Show IME name in header only if multiple active IMEs
    - Show the PK layout selection criteria (Automatic v/s User selected)

Bug: 325925410
Bug: 326195401
Test: manual
Change-Id: I93a2e169742a800fa116fa5d55e1a91e5548cebb
2024-03-04 10:55:47 +00:00
Josep del Rio
cdc4fb5559 Sort keyboard layouts
At the moment it's not easy to find a layout in the physical
keyboard layout list as they are not sorted; this CL will sort the
keyboard layout list before it is  presented to the user.

Bug: 279281653
Test: Flashed on device, confirmed the layout list is sorted
Change-Id: Ibc7e329190785cce9a8d9c33bc2fcaca6b8c169a
2023-12-05 11:16:04 +00:00
shaoweishen
543a7589b1 [PK Setting] Add null check on NewKeyboardSettingUtils.getInputDevice()
return null if InputDeviceIdentifier is null in getInputDevice.

Test: n/a
Bug: 307109888
Change-Id: Ie2f951d97e0ff66833d74170e625fb0368d6de42
2023-11-22 05:02:49 +00:00
Felix Stern
e8de480865 Adjusted Settings to use updated internal InputMethodManager methods
IMM#isStylusHandwritingAvailableAsUser, IMM#getEnabledInputMethodListAsUser, and IMM#getEnabledInputMethodSubtypeListAsUser use now UserHandle instead of userId. These internal APIs are used in Settings and are updated.

Test: atest android.view.inputmethod.cts.installtests.MultiUserTest
Fix: 283765791
Change-Id: Iedb301fbe26810f2101cbb2669b8be95b87a3e7f
2023-08-01 11:53:47 +00:00
danielwbhuang
f76c528e5b Use EXTRA_ENTRYPOINT to log entry point for metrics
1. Extra name: EXTRA_ENTRYPOINT
2. Value: integer which is from SettingsEnums.EntryPointType
// access physical keyboard settings through keyboard configured notification entry point
KEYBOARD_CONFIGURED_NOTIFICATION = 0;
// access physical keyboard settings through keyboard settings entry point
KEYBOARD_SETTINGS = 1;
// access physical keyboard settings through connected devices settings entry point
CONNECTED_DEVICES_SETTINGS = 2;

Bug: 271391879
Test: manual and check the device log.
Change-Id: I0d5144790e184eb3374d4615d8874619c372742a
2023-07-06 21:02:30 +08:00
danielwbhuang
c92bd9789d [Fixed] UI issues after rotation
1. Use onSaveInstanceState to store the data.
2. Do not repeat to automatically select the keyboard layout.

Bug: 281481973
Bug: 281461013
Test: manual
Change-Id: Ieaa8fa3d2e6c22c39b34313d255e4f7869777a8b
2023-05-09 20:03:17 +08:00
danielwbhuang
cc749159df Open the settings page for a specific physical keyboard
1. Check open from a notification
2. Check open from Bluetooth entry
3. If the inputDeviceIdentifier is not null, open the next page
   directly.
4. Add extra to record the class of sender for the future metrics.

Demo: http://screencast/cast/NDU4MTYxOTIzMTg4MzI2NHxiYTQ0ODE5Ny02YQ

Bug: 269212353
Test: manual, atest
[Pass] atest KeyboardSettingsPreferenceControllerTest
[Pass] atest PhysicalKeyboardPreferenceControllerTest

Change-Id: Ie874003260896bbb949806623913e70486e4731d
2023-03-28 14:15:08 +00:00
danielwbhuang
a6b78f6d01 The PK settings UI should show subtype labels instead of the subtype's language names.
1. Use InputMethodSubtype#getDisplayName()
2. Sorting by label

Video: https://screencast.googleplex.com/cast/NjEzMjM3OTI0OTgwMzI2NHxiODBhNjQzZi1kZA

Bug: 271504879
Test: manual
Change-Id: Ia2be6f3a007c678e62bdda21fe20d95a2b304d70
2023-03-10 16:43:39 +08:00
danielwbhuang
1f3261467d Set preference visible to false when there is no keyboard.
1. Physical keyboard settings should only show up if at least one PK is connected.
2. Update tests.
3. Fix NullPointerException.

Bug: 269983475
Bug: 270109384
Bug: 271357910
Test: atest and manual
Change-Id: If7798587fb386dbf669fc249cab304d91a26879b
2023-03-03 18:16:55 +08:00
danielwbhuang
cfd02f52a6 Show touchpad entry when input device is detected as touchpad.
1. Remove the redundant part about active ime.
2. Add a NPE detector to fix bug.
3. Check if input device is detected as touchpad.

Bug: 247080509
Bug: 267092726
Test: manual
Change-Id: I40640e42abd471efde6d1f9166b8999243499c62
2023-02-07 17:06:56 +08:00
danielwbhuang
f43c358b50 Integrate UI with APIs for physical keyboard settgins.
Integrate UI with these APIs.
1. getKeyboardLayoutListForInputDevice
2. getKeyboardLayoutForInputDevice
3. setKeyboardLayoutForInputDevice

Demo: go/pk_with_final_api_demo

Bug: 247079681
Test: local test

Change-Id: I5478e2c344a47e692e7c524f8c1e96d9dda52796
2023-02-02 14:52:38 +08:00