summaryrefslogtreecommitdiff
path: root/tools/aapt2/diff/Diff.cpp
diff options
context:
space:
mode:
authorYohei Yukawa <yukawa@google.com>2017-02-17 20:13:52 -0800
committerYohei Yukawa <yukawa@google.com>2017-02-17 20:13:52 -0800
commitbbb10e8ec05956c7dc84091e6d9c2a6f44e1480a (patch)
tree029a954af06a15751a848305ecdc6d150670102e /tools/aapt2/diff/Diff.cpp
parentcf7ce6cbda7e93bd302072f375fa1d4a4669cc70 (diff)
Really fix regressions in IMMS#setImeWindowStatus
My previous CL [1] that aimed to fix Bug 35395372 was imperfect. It just converted InvalidParameterException into NullPointerException due to a silly mistake in a new error check. [1]: Ib9448c551d9a30776a999c27a5ff20f1a095633a ee2a7ed3d971f83134a2b28258dd2e56f9634f94 Test: Made sure Bug 35395372 and Bug 35479942 are no longer reproducible, that is, 1. Flash a new image and complete the setup wizard on a direct-boot unaware device. 2. Set a device password and require it upon each device boot. 3. adb reboot 4. Observe the default IME does not crash because of NullPointerException/InvalidParameterException thrown by IMMS. Test: Made sure IMM#showSoftInputFromInputMethod(IBinder, int) does not throw an NullPointerException even in an extreme case. 1. Rebuild LatinIME with the following code in LatinIME.java @Override public AbstractInputMethodImpl onCreateInputMethodInterface() { return new InputMethodService.InputMethodImpl() { @Override public void attachToken(IBinder token) { super.attachToken(token); final InputMethodManager imm = getSystemService(InputMethodManager.class); final IBinder imeToken = getWindow().getWindow().getAttributes().token; imm.showSoftInputFromInputMethod(imeToken, 0); } }; } 2. adb install -r LatinIME.apk 3. adb shell ime enable com.android.inputmethod.latin/.LatinIME 4. adb shell ime set com.android.inputmethod.latin/.LatinIME 5. Tap any text field. 4. Observe LatinIME does not crash because of NullPointerException/InvalidParameterException thrown by IMMS. Bug: 34628091 Bug: 35079353 Fixes: 35395372 Fixes: 35479942 Change-Id: Id8e34ecb28480755e8141b6e46820b37fe3dc92b
Diffstat (limited to 'tools/aapt2/diff/Diff.cpp')
0 files changed, 0 insertions, 0 deletions