Commit Graph

425 Commits

Author SHA1 Message Date
Treehugger Robot
c234e5a6a8 Merge "[PK settings] Remove metrics." into udc-qpr-dev am: ff791fa973
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/24526049

Change-Id: I6866aa3d71a9f891863fe0ccd273633a06daae19
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-08-24 22:05:25 +00:00
danielwbhuang
90af0f0f26 [PK settings] Remove metrics.
Remove all metrics by the metrics concil team's comment.

Bug: 296544040
Test: manual
Change-Id: I6f5292c686d3eaac641c6e7f7631152b34a0085b
Merged-In: I6f5292c686d3eaac641c6e7f7631152b34a0085b
2023-08-23 23:08:02 +08:00
Daniel Huang
73b2b137cc Merge "Use EXTRA_ENTRYPOINT to log entry point for metrics" into udc-qpr-dev am: 2b40635f07
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23913078

Change-Id: Iad5339178401ca44b5e36f16e9509efec088c3b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-11 09:18:48 +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
Daniel Huang
0b95f9562a Merge "Log metrics for PK settings topics" into udc-qpr-dev am: 114d068fbb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23593768

Change-Id: I6360dd0b9ced21331d5e04a54ef91b7612d35c0f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-07-04 03:29:21 +00:00
danielwbhuang
7aaff67c3c Log metrics for PK settings topics
1. Log metrics for touchpad settings
2. Log metrics for modifier keys remapping
3. Log metrics for physical keyboard settings

Bug: 271391879
Test: manual, atest
Change-Id: I3f948927719ec6fc3dca78cdcb995c3037d8f97f
2023-06-26 16:33:10 +08:00
Treehugger Robot
065885622b Merge "Use custom action key icon" into udc-qpr-dev am: dbec7ba7fb
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/23369343

Change-Id: Iee500ce4346a8554a37a4ff98ae5f3775b3ad411
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-05 18:03:19 +00:00
Treehugger Robot
dbec7ba7fb Merge "Use custom action key icon" into udc-qpr-dev 2023-06-05 16:56:35 +00:00
Treehugger Robot
5893274b08 Merge "Fix resource leakage caused by cursor" am: 662ba59a47 am: 381ac521bd am: 2ccf9d9560 am: 8bae3a88a3 am: 8ee04c3503
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2608471

Change-Id: I7f333ae1fecdc9561267e3dcbb4c1fd49af5a749
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 01:48:19 +00:00
Treehugger Robot
8bae3a88a3 Merge "Fix resource leakage caused by cursor" am: 662ba59a47 am: 381ac521bd am: 2ccf9d9560
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/2608471

Change-Id: Ib8122df16de9af8f26cb9f2d6d666cad9a27c482
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-06-02 00:12:28 +00:00
Cao Peng
38f1b45d50 Fix resource leakage caused by cursor
Change-Id: I9507658cc82a2b9760507530920a37044f7de2fd
Signed-off-by: Jia Jia <jia.jia@zte.com.cn>
2023-06-01 18:16:26 +08:00
danielwbhuang
19a5e212de Use custom action key icon
1. get icon from getKeyboardSettingsFeatureProvider
2. set color for it

Bug: 269214138
Test: manual, atest KeyboardSettingsFeatureProviderImplTest
Change-Id: I3a2d47e8230aec1404300b000e8b1fcf221e2a65
2023-05-29 15:38:55 +08:00
danielwbhuang
2fe3307511 Display gesture education button in touchpad settings
1. We hid this button before.
2. Display the button in the latest release.

Bug: 276001904
Test: manual
Change-Id: I20bfc76162eeb99e85afede30e9fe6145251d65d
2023-05-25 17:24:52 +08:00
Aleksandar Kiridžić
2fbca84c5c Merge "speech: Re-add on-device speech recognition settings entry" into udc-dev am: 9e2e6d0795 am: 13317c14f1
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/22932716

Change-Id: Ib5d9e7c574f660e0ee71c24e69c99cd1343e0b8c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-05-19 11:24:03 +00:00
danielwbhuang
6189f9fcbd Use FeatureProvider to provide the firmware update category.
1. Add KeyboardSettingsFeatureProvider in FeatureFactory.
2. Use KeyboardSettingsFeatureProvider to add firmware update UI.

Bug: 270114180
Test: manual, atest KeyboardSettingsFeatureProviderImplTest
Change-Id: I62ec7aff71dd5c0d496860363f2c5b3e992503ff
2023-05-18 17:24:43 +08:00
Aleksandar Kiridzic
657be564ac speech: Re-add on-device speech recognition settings entry
After `Settings > System > Languages & input` was separated into
`Settings > System > Languages` and `Settings > System > Keyboard`,
`On-device speech recognition` was lost. This CL adds it in the same
`Speech` preference category where it was before
and moves the category to `Settings > System > Languages`.

Bug: 278279110
Test: Manual, already existing robotests
Change-Id: I040c284dd3596f35ceacb6980ff89e611e29971c
2023-05-17 18:15:48 +01: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
Daniel Huang
08b2b68e22 Merge "[Fixed] Reverse scrolling setting is reversed" into udc-dev 2023-05-05 02:33:13 +00:00
danielwbhuang
55a3d089f9 Fix Multiple UI issues
1. Use edge-to-edge UI
2. Use new color token
3. Put text in the middle of the button

Bug:279163958
Bug:278504911

Test: manual
Change-Id: I189e9da2251f7d204ddc18680d3d1ec4638fa2db
2023-05-04 08:56:41 +00:00
danielwbhuang
0b79c92348 [Fixed] Reverse scrolling setting is reversed
If useTouchpadNaturalScrolling is false, "Reverse scrolling" should be on.

[The API value]
useTouchpadNaturalScrolling: false

[The expected UX behavior]
Reverse scrolling: on
fingers upward, scroll up, content moves down

The description of "useTouchpadNaturalScrolling":
Returns true if moving two fingers upwards on the touchpad should scroll down, which is known as natural scrolling.

The description of "Reverse scrolling":
Content moves up when you scroll down.

Bug: 280047007
Test: manual and passed atest TrackpadReverseScrollingPreferenceControllerTest
Change-Id: Ia5e30fa14b599ddcffae99005114f10412ccad3c
2023-05-03 23:59:55 +08:00
danielwbhuang
077293b72d [UI][Modifier key remapping] Use new color token.
Chnage materialColorPrimaryContainer to materialColorPrimary
Change materialColorSurfaceContainerHigh to
materialColorSurfaceContainerHighest

Bug: 277712746
Test: manual
Change-Id: I7b23850a24718d28020f6a7b13119c69f50861b1
2023-04-25 09:58:21 +00:00
danielwbhuang
94d5d00a1a The dialog should persist after rotation.
1. Use DialogFragment
2. Override onSaveInstanceState
3. Refresh the UI after key remapping

Demo: https://screencast.googleplex.com/cast/NjMzMzcxNjc2Mzc3MDg4MHxlMjM0M2FiMi0zOA

Bug: 277148566
Test: manual
Change-Id: I0dc6678bfa45a4f84f38bf810433dd1e4432ba4a
2023-04-11 08:49:26 +00:00
danielwbhuang
2659074d02 Handling multiple profiles for PK layout selection
1. Use new @hide IMM#getEnabledInputMethodSubtypeListAsUser()
2. Use ProfileSelectFragment

Demo: https://screencast.googleplex.com/cast/NjMzNTA2NTA2NDczNDcyMHwxNTUyMjQ1ZS03YQ

Bug: 275106096
Test: manual
Change-Id: I51cfd16fc7162e2b24782017b9366b0aad36f915
2023-04-06 00:50:54 +00:00
Marcelo Arteiro
c5631b45b2 Automated Token Alignment Android/Material
Resubmiting reverted CL Ia1f84669090e04b3a2aaac82bb5971032d74a125.
Reson: Bug was found in another CL (in this topic)

Test: Treehugger
Bug: 268682423

Change-Id: I0fead8915b2bb6281e29b32f7426c35b0138b10e
2023-03-31 10:53:24 +00:00
Wilson Wu
ce7ad1f8a0 Merge "Fix wrong user in personal profile" into udc-dev 2023-03-31 09:56:56 +00:00
tom hsu
23359bc0e9 Unify Tick Preference from Physic keyboard and Regional preference
- Also change icon color from colorAccentPrimaryVarient to colorAccentPrimary

Bug: b/272398108
Bug: b/264476709
Test: Manual test.
Change-Id: Ide602c6fb9501b832df646692ec618be8a76e7b9
2023-03-30 18:52:23 +08:00
Wilson Wu
a7620427b5 Fix wrong user in personal profile
If the user is profile, it should use the current
user's profile parent to create the context instead
of always using the primary user(system user).

Bug: 264867495
Test: Manual test with work profile enabled, multi user flow, etc
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableVirtualKeyboardFragmentTest
Change-Id: I66d1462441359c40dda2a38c7534500791db9c83
2023-03-29 17:36:34 +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
Kweku Adams
9a087d6c19 Merge "Revert "Remove duplicate strings."" into udc-dev 2023-03-16 20:14:16 +00:00
Lifu Tang
caa1b51ef2 Revert "Remove duplicate strings."
Revert submission 19748582-settings_yesno

Reason for revert: Common strings in English could be translated into different strings in other languages.

Reverted changes: /q/submissionid:19748582-settings_yesno

Bug: 272603842
Test: build and open Settings app
Test: atest SettingsRoboTests
Change-Id: Iaad301c5513478fb95e40987ea3ccb4f923d71fa
2023-03-15 22:39:24 +00:00
Daniel Huang
f826b3f427 Merge "The PK settings UI should show subtype labels instead of the subtype's language names." into udc-dev 2023-03-15 08:15:07 +00:00
Marcelo Arteiro
7e2d77a717 Merge "Revert "Automated Token Alignment Android/Material"" into udc-dev 2023-03-10 13:43:23 +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
Marcelo Arteiro
1b599e0232 Revert "Automated Token Alignment Android/Material"
This reverts commit c9ca4a9014.

Reason for revert: Black Search Box in Settings App (Light Theme)

Change-Id: I936e977ce044b8da41d818d6b3392adc6fd1e4e6
2023-03-09 23:40:40 +00:00
Marcelo Arteiro
b93f186df4 Merge "Automated Token Alignment Android/Material" into udc-dev 2023-03-06 12:46:02 +00: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
b8e1799527 Change key name "Meta" to "Action key"
1. In the modifier key remapping page, the string "Meta" should be changed to "Action"
2. We should add the default focus effect when users go into this page first time.

Demo: https://screencast.googleplex.com/cast/NTA2NjA2MzEyMjI2ODE2MHw2YjRjOTljMi0xMQ

Bug: 269981968
Test: manual
Change-Id: I481be0370166a8831bedc721751e23cee3b39703
2023-02-23 18:01:15 +08:00
Marcelo Arteiro
c9ca4a9014 Automated Token Alignment Android/Material
Test: Treehugger
Bug: 268682423
Change-Id: Ia1f84669090e04b3a2aaac82bb5971032d74a125
2023-02-17 15:14:30 +00:00
Josep del Rio
8411d1c663 Use InputSettings in Settings app
At the moment the settings app will make use of certain exposed
functions in InputManager that are being moved to a separate
class. This CL migrates those usages to the new internal API.

Bug: 267758905
Test: compiles, and should pass presubmit
Change-Id: I30dcb83aa1cc8830650fe856775a462ed37c2dda
2023-02-10 16:37:49 +00: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
TreeHugger Robot
4227a44067 Merge "Integrate UI with APIs for physical keyboard settgins." 2023-02-02 08:12:37 +00: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
danielwbhuang
6007a4bc0c Add Trackpad settings tests
1. TrackpadBottomPreferenceControllerTest
2. TrackpadPointerSpeedPreferenceControllerTest
3. TrackpadReverseScrollingPreferenceControllerTest
4. TrackpadTapToClickPreferenceControllerTest

Bug: 247080509
Test: manual, make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.inputmethod.*"
Change-Id: I61d6dd9bb807ec636e4103efc5b9ccc28d5bc2c1
2023-02-01 14:37:04 +08:00
Daniel Huang
7acbaf2d13 Merge "Implement trackpad gestures education UI." 2023-01-31 06:55:34 +00:00
TreeHugger Robot
cede929542 Merge "Integrate modifier keys settings UI with APIs" 2023-01-12 11:49:59 +00:00
danielwbhuang
aa1d9c4dba Integrate modifier keys settings UI with APIs
1. getModifierKeyRemapping
2. remapModifierKey
3. clearAllModifierKeyRemappings

Demo: go/modifier_keys_settings_demo

Bug: 244535460
Test: local test
Change-Id: I47bcd0b58637feb68c579112a991371490af0157
2023-01-12 18:26:31 +08:00
Daniel Huang
aa88bca296 Merge "Integrate UI with APIs for trackpad settgins." 2023-01-12 05:33:48 +00:00
danielwbhuang
6125f9a9fa Integrate UI with APIs for trackpad settgins.
1. Integrate with trackpad settings dummy APIs.
2. Integrate with trackpad gesture APIs.

Bug: 247080509
Test: manual, make RunSettingsRoboTests ROBOTEST_FILTER="com.android.settings.inputmethod.*"
Change-Id: Ic180e28896bb0a5aa71eb0eb63d3824bd342ff45
2023-01-11 22:42:15 +08:00
danielwbhuang
40cab1692d Implement trackpad gestures education UI.
1. Use BottomSheetDialogFragment.
2. Use LottieAnimationView for animation
3. Add 5 animation assets

Demo: go/trackpad_education_demo

Bug: 247080509
Test: manual
Change-Id: Icac7a6cd51763ca20b7661d6f1d4cc95af5292e9
2023-01-11 08:12:23 +00:00
jasonwshsu
829a671265 Fix preferences under Related category can not launch its own page in bluetooth device details page
Root Cause: KeyboardSettingsPreferenceController override
handlePreferenceTreeClick() without checking the preference key, it will lead to handle all preferences' click action.

Solution: Check the preference is the expected preference key

Bug: 264017256
Test: make RunSettingsRoboTests ROBOTEST_FILTER=KeyboardSettingsPreferenceControllerTest
Change-Id: Idcdadc323df5b758b4b21329227e2bb721b1c394
2023-01-05 10:48:55 +00:00