Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimePicker in Classic theme crashes with Android 14 #3175

Open
2 of 8 tasks
ewpatton opened this issue May 7, 2024 · 0 comments
Open
2 of 8 tasks

TimePicker in Classic theme crashes with Android 14 #3175

ewpatton opened this issue May 7, 2024 · 0 comments

Comments

@ewpatton
Copy link
Member

ewpatton commented May 7, 2024

Describe the bug

From the forum: Using the +/- buttons in the TimePicker dialog on Android 14 in Classic theme results in a NPE. This seems to be a bug in Android itself but we probably should come up with a workaround so the experience doesn't degrade on Android 14.

05-07 12:28:51.956 13265 13265 E AndroidRuntime: Process: edu.mit.appinventor.aicompanion3, PID: 13265
05-07 12:28:51.956 13265 13265 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.widget.EditText.hasFocus()' on a null object reference
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.widget.TimePickerSpinnerDelegate.updateInputState(TimePickerSpinnerDelegate.java:480)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.widget.TimePickerSpinnerDelegate.-$$Nest$mupdateInputState(Unknown Source:0)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.widget.TimePickerSpinnerDelegate$2.onValueChange(TimePickerSpinnerDelegate.java:119)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.widget.NumberPicker.notifyChange(NumberPicker.java:2080)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.widget.NumberPicker.setValueInternal(NumberPicker.java:1850)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.widget.NumberPicker.changeValueByOne(NumberPicker.java:1881)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.widget.NumberPicker.-$$Nest$mchangeValueByOne(Unknown Source:0)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.widget.NumberPicker$1.onClick(NumberPicker.java:725)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.view.View.performClick(View.java:7729)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.view.View.performClickInternal(View.java:7706)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.view.View.-$$Nest$mperformClickInternal(Unknown Source:0)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.view.View$PerformClick.run(View.java:30484)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.os.Handler.handleCallback(Handler.java:959)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.os.Handler.dispatchMessage(Handler.java:100)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.os.Looper.loopOnce(Looper.java:232)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.os.Looper.loop(Looper.java:317)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at android.app.ActivityThread.main(ActivityThread.java:8501)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at java.lang.reflect.Method.invoke(Native Method)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:552)
05-07 12:28:51.956 13265 13265 E AndroidRuntime: 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)

Affects

  • Designer
  • Blocks editor
  • Projects Explorer
  • Companion
  • Compiled apps
  • Buildserver
  • Debugging
  • Other... (please describe)

Expected behavior

The buttons should operate normally and not crash the app.

Steps to reproduce

  1. Create a project with a TimePicker
  2. Set the theme to Classic
  3. Connect the companion using a device running Android 14
  4. Open the TimePicker dialog
  5. Use the plus or minus button to try and adjust the time. The app will crash.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant