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
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
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
* 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
Add a test for AvailableVirtualKeyboardFragment
Fix: 207452897
Test: make RunSettingsRoboTests ROBOTEST_FILTER=AvailableVirtualKeyboardFragmentTest
Change-Id: I83d30ae9d085c2b90fd16e5f6c4100bb82b6b588
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
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
* 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
- Add function getXmlResourceId, Fragments don't need to write
xml resource id twice.
- Remove getPreferenceControllers from Indexable.java. Because it will
move to SettingsLib later for other apps which don't need this function
Bug: 135053028
Test: robolectric
Change-Id: I1e74519aecdea3dde64a5aea79f08d766dbc0003
This is a follow up CL to my previous CL [1], which attempted to show
the most appropriate IME icon even when multiple IMEs are implemented
in a single APK.
This CL simplifies the way how IME icon is obtained in the Settings
app, by simply using InputMethodInfo#loadIcon(), which already does
what we want.
Notable user-visible behavior changes are:
- Like before my previous CL was submitted, android:logo will not be
used in the IME settings (again).
- Icons shown in IME settings start having (user) badges like other
settings pages.
- If no icon is available in IME,
PackageManager#getDefaultActivityIcon() will be used. This is
actually consistent with other settings pages.
[1]: I406ccc0d53e6ec69793c2fc8be8c6c1c90b34811
2cae5b8952
Bug: 28204635
Fix: 131432102
Test: Manually verified as follows.
1. Build aosp_taimen-userdebug and flash it
2. Install TestDPC.
3. Set up a work profile
4. Open Settings App -> System -> Languages & input
-> Advanced -> Virtual keyboard for work
5. Make sure the icon of "Android Keyboard (AOSP)" has a small badge.
6. Tap "Manage keyboards"
7. Make sure the icon of "Android Keyboard (AOSP)" has the same icon
as the step 5.
8. Open Settings App -> System -> Languages & input
-> Virtual keyboard
9. Make sure the icon of "Android Keyboard (AOSP)" does not have a
small badge on it.
10. Tap "Manage keyboards"
11. Make sure the icon of "Android Keyboard (AOSP)" has the same icon
as the step 9.
Change-Id: Ie9be1eb3071abcc2df7723ceb10d76fe458c4808
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
- 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
Convert input device search into a search query loader
And remove old logic from DynamicIndexableContentMonitor
Change-Id: If652b1ea7c8add9185bbd025055e14925d3a8eec
Bug: 64310452
Bug: 63831980
Test: robotests
Allows enabling/disabling IMEs on TV.
Moves InputMethodPreference to SettingsLib.
Also minor code tidying
Bug: 36079941
Test: Keyboard settings still work on Fugu and Ryu
Change-Id: Idf42cf5c46d5bb32db59924819d64f73d533d105
This CL moves the code building index of IMEs from
InputMethodAndLanguageSettings to VirtualKeyboardFragment and
AvailableVirtualKeyboardFragment, so that a search landing page of IME
becomes one of the fragment correctly depending on the IME state.
Bug: 32643633
Test: Manually installing/uninstalling AOSP LatinIME.apk while
Settings app is/isn't running, then search AOSP and verify the
landing page is correctly determined by the IME's enable state.
Test: Update robolectric DynamicIndexableContentMonitorTest
Change-Id: Ie44f358c2d3919fc864f4f88e6229293113823dd
Bug: 30681771
Test: SettingsUnitTests
Refactor visibility logging from InstrumentedFragment into a mixin. And
apply mixin in remaining fragments.
Change-Id: Ibbb59904336254a3e4bb9e8c7d0b36e5a6bc2622
With this CL, AvailableVirtualKeyboardFragment searches icon resource in
the following order, which makes it easier to find a certain IME when
one APK contains multiple IMEs.
1. Service Logo
2. Service Icon
3. Application Logo
4. Application Icon
Bug: 28204635
Change-Id: I406ccc0d53e6ec69793c2fc8be8c6c1c90b34811
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