Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 5ffb91e0 authored by Lee Jones's avatar Lee Jones
Browse files

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: default avatarLee Jones <joneslee@google.com>
parent 3db71622
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment