Yohei Yukawa d20eef826c Query right user's system IMEs in AppRestrictionsHelper
It turns out that AppRestrictionsHelper#addSystemImes() has always
queried for the owner user's system IMEs despite the fact that it's
trying to query system IMEs for a restricted profile user.  This
behavior has not changed since its beginning [1].

Most likely people would not have noticed this though, because:

* Settings app does not show a menu item to create a restricted user
   on phone devices.
 * Even if it's available, most people do not use restricted users.
 * Even if someone created a restrected user, most likely the owner
   user and the restrected user share the same set of system IMEs,
   which are defined as "pre-installed" IMEs.

Anyway, AppRestrictionsHelper#addSystemImes() will start using a newly
introduced @hide API IMM#getEnabledInputMethodListAsUser() so that it
can query for the right user's system IMEs, instead of querying owner
user's ones.

 [1]: Ifced841ad3bfbde33d2403356216dd1749b7fa9a
      a7a93784d1f9798d37cb618def1a558f8d626f0f

Bug: 122164939
Test: atest SettingsLibTests:AppRestrictionsHelperTest
Test: manually done as follows.
  1. Build aosp_taimen-userdebug and flash it.
  2. adb shell pm create-user --restricted test_profile
  3. adb shell am start -a android.settings.USER_SETTINGS
  4. Click the gear icon next to the "test_profile" user.
  5. By adding a log, make sure that IMMS#getInputMethodList()
     gets called with userId = 10.
Change-Id: I5b50b5fe143c74c87b331bda3e5bcc4d6248436e
2019-02-05 10:45:32 -08:00
2019-02-05 17:55:02 +00:00
2019-02-05 07:22:39 +00:00
2019-01-09 06:57:13 +00:00
2019-02-05 17:07:15 +00:00
2018-12-05 16:31:53 +00:00
2019-01-07 14:16:56 +00:00
2019-01-22 21:11:25 +00:00
Description
No description provided
21 GiB
Languages
Java 73.7%
Kotlin 14%
PowerBuilder 5.8%
C++ 5.2%
AIDL 1%