- Give the methods more descriptive names
- Reduce the number of paramters
- Add comments
No functional change
Test: Built
atest --test-mapping frameworks/base/services/core/java/com/android/server/pm/permission:presubmit
Change-Id: I2fdf5bf7a0223604512307f26ad4881fde913873
This is a follow up CL to my previous CLs [1][2], which added
'-u <user id>' option to
adb shell ime enable <ime id>
and
adb shell ime set <ime id>
respectively.
Those CL had a bug that was introduced during the last round of the
code review when I was addressing a review comment. As a result,
those two commands simply fail if '-u' or '--user' option is
specified. With this CL, those we can finally start specifying the
user ID for those two commands.
This CL also fixes a bug that output for
adb shell ime set -u all <ime id>
are not correctly formatted.
Note that this CL only fixes a bug in debug shell commands. There
should be no user-visible behavior change in end-user use cases.
[1]: Ia0f873e4589a9fc3f549469e3d1d966640dc2df5
e177170f64
[2]: I397cf0fb418a395dcafc0ab0d8d4e553b0f2eaab
099f80ce97
Bug: 120784635
Test: Manually tested as follows:
1. Build aosp_blueline-userdebug and flash it
2. make -j SoftKeyboard
3. adb install -r $OUT/system/app/SoftKeyboard/SoftKeyboard.apk
4. adb shell pm create-user test
5. adb shell am switch-user 10
6. adb shell ime disable -u 0 com.example.android.softkeyboard/.SoftKeyboard
-> Input method com.example.android.softkeyboard/.SoftKeyboard: now disabled for user #0
7. adb shell ime enable -u 0 com.example.android.softkeyboard/.SoftKeyboard
-> Input method com.example.android.softkeyboard/.SoftKeyboard: now enabled for user #0
8. adb shell ime set -u 0 com.example.android.softkeyboard/.SoftKeyboard
-> Input method com.example.android.softkeyboard/.SoftKeyboard selected for user #0
Test: Manually tested as follows.
1. Build aosp_blueline-userdebug and flash it
2. adb shell pm create-user test
3. adb shell pm create-user restricted_test
4. adb root
5. adb shell pm set-user-restriction --user 11 no_debugging_features 1
6. adb shell am switch-user 10
7. adb shell am switch-user 11
8. adb shell am switch-user 0
9. adb shell ime set -u all com.android.inputmethod.latin/.LatinIME
-> Input method com.android.inputmethod.latin/.LatinIME selected for user #0
Input method com.android.inputmethod.latin/.LatinIME selected for user #10
User #11 is restricted with DISALLOW_DEBUGGING_FEATURES.
10. adb shell ime disable -u all com.android.inputmethod.latin/.LatinIME
-> Input method com.android.inputmethod.latin/.LatinIME: now disabled for user #0
Input method com.android.inputmethod.latin/.LatinIME: now disabled for user #10
User #11 is restricted with DISALLOW_DEBUGGING_FEATURES.
Change-Id: I4e396519400c0ccd17322fe085b45456621714e7
We still need to save a layer for the BlendMode.CLEAR paint to do the
right thing. But with this we can save just the layer needed to draw the
battery instead of the whole battery meter view.
Test: visual
Bug: 130536257
Change-Id: I9d5844440250ccd9174e6c001e051c9adf62a2d0
(cherry picked from commit b4c703b8e3)
am: 43ccb1e990 -s ours
am skip reason: change_id I075ac3ec47743f5d9cd2acbd0cc01ce55cd1a8e3 with SHA1 878cbf8269 is in history
Change-Id: I5d9659ec75f287c1b5806eb5f554396007e72ea9
am: 1636bb34f9 -s ours
am skip reason: change_id I075ac3ec47743f5d9cd2acbd0cc01ce55cd1a8e3 with SHA1 878cbf8269 is in history
Change-Id: I3bbc1363a944b5b374c87bc02a9c45ca419a7aaf