Commit Graph

401 Commits

Author SHA1 Message Date
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
danielwbhuang
85e0deb14d Implement modifier keys settings UI.
Add four modifier keys and one reset button.

Bug: 244535460
Test: local test
Change-Id: I45822b0d8391022c17439dc25ab86fe022e9f43f
2022-12-21 22:45:06 +08:00
danielwbhuang
1dfe99253f Implement trackpad settings UI
1. basic trackpad settings
2. trackpad gestures settgins
3. use feature flag to control gesture settings page.

Bug: 247080509
Test: local test

Change-Id: Ia7184eeb7670e5d807cb553929679972e54d8c92
2022-12-20 23:57:11 +08:00
danielwbhuang
1639782df6 Implement new keyboard settings UI.
Add enabled input method locales page
Add keyboard layout picker page
Add keyboard settings entry in BT device detail

Bug: 242680718
Test: local test
Change-Id: I07e068ecde553d394697b25cb573f806229f6f52
2022-12-13 10:47:07 +08:00
Wilson Wu
632fd43924 Fix show/hide virtual keyboard delay
The default observer delay is 10s for background
service. When a device connected to a hardware
keyboard, the delay makes soft keyboard visibility
is unsync after user switch the configuration.

Notify the SHOW_IME_WITH_HARD_KEYBOARD change
without delay.

Bug: 240210005
Test: Manual with bug steps
Change-Id: I7f8cb0df514fdea4ed0e092cd4466931ec200969
2022-11-10 15:16:33 +08:00
Daniel Huang
7505e97ce9 Merge "Separate "Keyboard" from "Language & input"" 2022-08-30 08:20:14 +00:00
danielwbhuang
c9cb6806f6 Separate "Keyboard" from "Language & input"
1. Separate "Keyboard" from "Language & input".
2. Use FeatureFlagUtils.SETTINGS_NEW_KEYBOARD_UI to control the
   different UI until Settings launches the new UI design.

Bug: 242680328
Test: local test
Change-Id: Id1ea6d3e3c2e6b83bc4b4d835c6b27e31311c530
2022-08-30 14:22:05 +08:00
Kweku Adams
5949fccc7a Remove duplicate strings.
"Yes" and "no" were redefined many times with no clear benefit, so this
consolidates them into one definition.

Bug: 243843096
Test: Build, install, and open the Settings app
Test: atest SettingsRoboTests
Change-Id: I5f84d09f223efd478461ded93aeac82bf7b128d8
2022-08-26 00:07:08 +00:00
Wilson Wu
237a06e0c1 Fix keyboard settings crash in multi-user case
We have CL[1] to fix the NPE when keyboard settings
is launched by work app. CL[1] overlooked the work
profile with multi-user case.

Work profile user ID is not available(return null)
when calling Utils#getManagedProfile by work identity.

For work case, distinguish it's running on managed
profile user(launched by work app) or not. And use
corresponding userId as:

-. If it's a managed profile user, use currentUserId.
-. For a owner user, get managed profile userId.

[1]: Iea573922ee789d9932c0de05bf71179c4f005eeb

Bug: 216395439
Test: Manual test with bugs steps
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableVirtualKeyboardFragmentTest
Change-Id: If018d2fddbbcf932927d2235bb8e99393df1e67c
2022-04-08 11:04:52 +08:00
Pavel Grafov
f8ba876fbe Merge "Make distinction between null and empty IM list." 2022-02-11 12:13:28 +00:00
Wilson Wu
ddb5147649 Fix NPE if keyboard settings is launched by work apps
IME apps can request users to enable them by directly
launching the on-screen keyboard settings page.

If keyboard settings is launched by works apps, the
current userId would be work userId. There is no managed
profile for work user so the exception happened.

-. Use current userId if it's launched by work user
-. Use primary user info for personal fragment

Fix: 216395439
Test: Manual test with issue steps
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableVirtualKeyboardFragmentTest
Change-Id: Iea573922ee789d9932c0de05bf71179c4f005eeb
2022-02-10 15:13:26 +08:00
Pavel Grafov
0b3c4b8a53 Make distinction between null and empty IM list.
* null means no policy is enfrced, any IM is allowed.
* empty means no IMs is allowed except system IMs.

Bug: 211063191
Test: manual, CtsVerifier/BYOD managed provisioning/Policy transparency
Change-Id: I35665a547c1e99129c70c834083b3183ba00208d
2022-02-08 14:47:36 +00:00
Wilson Wu
56d8703fcb Introduce AvailableVirtualKeyboardFragmentTest
Add a test for AvailableVirtualKeyboardFragment

Fix: 207452897
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableVirtualKeyboardFragmentTest
Change-Id: I83d30ae9d085c2b90fd16e5f6c4100bb82b6b588
2022-01-25 14:29:24 +08:00
Wilson Wu
97635f53e6 Make on-screen keyboard settings support tab layout
Introduces following fragments for work flow.

- Add ProfileSelectKeyboardFragment which used to display
  personal/work fragment when user has work profile.
- Introduce UserAwareContext in AvailableVirtualKeyboardFragment
  to support personal/work user installed input methods handling.

Bug: 174360557
Bug: 197707782
Test: Manual test as bug video
Change-Id: I1019e375c5d42de7bc7c048d5d66e8e2f58acce8
2021-11-23 17:10:34 +08:00
Jason Chiu
7f6b9e26c9 Merge changes from topic "slice-highlight" into sc-v2-dev am: 6821b6be32 am: 026b1b5df6
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Settings/+/16151654

Change-Id: If46903bb26371ea90075d1c6cc063af4d10a88d4
2021-11-02 02:43:42 +00:00
Jason Chiu
2989c50a23 Add highlight menu keys for all toggle pref controllers and custom slices
Bug: 204695404
Test: manual, robotest build pass, unit
Change-Id: Iad2e28ada8ddb766ffa7eff2c8dc581250cbd6f8
2021-11-01 15:00:18 +08:00
Wilson Wu
bc72945561 Use AvailableVirtualKeyboardFragment for IME settings
CL[1] make InputMethodPreference support:
-. Tap to corresponding IMEs settings
-. Using switch to enable/disble IMEs

Using AvailableVirtualKeyboardFragment for
language and input settings entries and
remove unused files.

[1]: I445551e4112117aabd8d7a48f53c29b7ffd8bafd

Bug: 197705032
Test: Manually test settings keyboard flow, test video in bug
Change-Id: I4d74df7d2dda71661e3298c7070459885aa308cb
2021-09-15 18:10:47 +08:00
Yanting Yang
1aadccac6d Remove silky flag from misc files
Remove the silky condition.

Bug: 183670633
Test: robotests
Change-Id: I53cff0b149afb26d40f9b3af21c1b384058b306b
2021-06-02 19:11:12 +08:00
Alex Johnston
caf50d1203 Merge "Allow enabled IMEs to be disabled in Settings" into sc-dev 2021-03-22 09:26:27 +00:00
Alex Johnston
a47f5c1a1c Allow enabled IMEs to be disabled in Settings
* If an IME is not in the permitted IME list and is enabled,
  the user should be able to disable it.
* This prevents the IME from being stuck in a state where the
  user cannot disable it and as a result the user's device
  becomes uncompliant with their IT admin's policy.

Manual testing steps:
* Install TestDPC
* Set up work profile using TestDPC
* Install swiftkey in the work profile
* set permitted input methods (in TestDPC) to only system
* Use adb to enable Swiftkey
* Go to Settings and verify Swiftkey can be disabled
* Once disabled, verify Swiftkey cannot be re-enabled.

Bug: 180517539
Test: manual testing
Change-Id: I7bdd3a0c4fed4d16006445b7774fd1006cc2b569
2021-03-16 10:12:46 +00:00
Treehugger Robot
2817c677b1 Merge "Update src/com/android/settings/inputmethod/OWNERS" am: e9dff191b0 am: dac69ccd8f am: eda1be644f
Original change: https://android-review.googlesource.com/c/platform/packages/apps/Settings/+/1624591

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I755a0f00c44dfd39b84e4f843a1553de2e8850a2
2021-03-11 03:23:22 +00:00
Yohei Yukawa
5878a77218 Update src/com/android/settings/inputmethod/OWNERS
Let's update this legacy OWNERS file based on the current reality.

Hopefully this would make it easier for contributers to find available
owner reviewers.

Fix: 182385491
Test: n/a
Change-Id: If47b5c0b83d561dceacc58c8fbd3643524432d62
2021-03-10 10:37:51 -08:00
Stanley Wang
b87ddba6cd Use SettingsLib's MainSwitchBar to replace SwitchBar in Settings.
To log Settings metrics, the MainSwitch extends MainSwitchBar and
replace the SwitchBar in SettingsActivity.

Bug: 175181773
Test: Run robotest and apply the widget in Settings and see the ui

Change-Id: I3add3702e9058ad9192b5172c7cf0e2ccfb55a70
2021-01-14 22:48:31 +08:00
Mill Chen
124f01999c Set a title for personal dictionary
After the collapsing toolbar layout is applied to subsetting pages, the
title of the personal dictionary page won't be shown. This CL is to set
a title for the personal dictionary page.

Bug: 176897229
Test: manual test and visual verified
1) Navigate to Settings -> System -> Languages & input -> Personal
dictionary
2) Enable collapsing toolbar feature
3) Observe and check if the title is shown as normal

Change-Id: I0b6488bc2c8040b275ba0d5348d09aa4bad905d1
2021-01-11 17:59:47 +08:00
Edgar Wang
8c8a2e85ec Update language to comply with Android's inclusive language guidance
See https://source.android.com/setup/contribute/respectful-code for reference

Bug: 161896447
Test: robotest & manual

Change-Id: I32f369a608c8b4f513f2c32afca6d408ee273428
2020-08-12 11:25:21 +08:00