Fix NullPointerException in android.widget.TimePickerSpinnerDelegate.updateInputState
Commit 2a757ef4 ("Add @hide IMM#hideSoftInputFromView as an optimization") assumed that 'mAmPmSpinnerInput' will always be assigned at this point. However in the case where users choose 24hr format, is it left as null. Providing a null check prevents the following splat: FATAL EXCEPTION: main java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.widget.EditText.hasFocus()' on a null object reference at android.widget.TimePickerSpinnerDelegate.updateInputState(TimePickerSpinnerDelegate.java:480) [...] Bug: 296466613 Fix: 333670354 Fix: 324375857 Fix: 324504911 Test: atest CtsInputMethodTestCases:TimePickerImeSupportTest Change-Id: Id125ea4da75803d490b5e09eec7554ce97e46937 Signed-off-by: Lee Jones <joneslee@google.com>
Loading
Please register or sign in to comment