BOINC / boinc

Open-source software for volunteer computing and grid computing.
https://boinc.berkeley.edu
GNU Lesser General Public License v3.0
2.02k stars 447 forks source link

Android app v8.0.2 : crash when editing GUI auth key on device with no auth #5802

Open rwaldura opened 2 months ago

rwaldura commented 2 months ago

Describe the bug App crashes when editing the GUI auth key on device with no protection. 8.0.0 release notes mention: Use device protection (fingerprint, face ID) when show or edit password.

Steps To Reproduce

  1. Do not setup any on-device auth: no fingerprint, no PIN.
  2. Install BOINC client 8.0.2 to Android phone.
  3. Open BOINC app, go to Preferences, tap the "GUI Authentication Key" field.
  4. App crashes with: ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.BIOMETRIC_ENROLL }

Expected behavior App does not crash; I can edit the key.

System Information

Additional context

09-09 15:51:04.723  1635  7040 I ActivityManager: START u0 {act=android.settings.BIOMETRIC_ENROLL (has extras)} from uid 10043
09-09 15:51:04.724  8570  8570 D AndroidRuntime: Shutting down VM
09-09 15:51:04.725  8570  8570 E AndroidRuntime: FATAL EXCEPTION: main
09-09 15:51:04.725  8570  8570 E AndroidRuntime: Process: edu.berkeley.boinc, PID: 8570
09-09 15:51:04.725  8570  8570 E AndroidRuntime: android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.settings.BIOMETRIC_ENROLL (has extras) }
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1943)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at android.app.Instrumentation.execStartActivity(Instrumentation.java:1617)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at android.app.Activity.startActivityForResult(Activity.java:4513)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at androidx.activity.ComponentActivity.startActivityForResult(SourceFile:2)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at androidx.core.app.b$b.b(Unknown Source:0)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at androidx.core.app.b.p(Unknown Source:0)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at androidx.activity.ComponentActivity$b.f(Unknown Source:160)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at androidx.activity.result.e$a.b(Unknown Source:31)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at androidx.activity.result.c.a(Unknown Source:1)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at androidx.fragment.app.w.V0(Unknown Source:27)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at androidx.fragment.app.Fragment.O1(Unknown Source:8)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at androidx.fragment.app.Fragment.N1(Unknown Source:1)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at t2.k0.u2(Unknown Source:50)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at t2.k0.i2(Unknown Source:0)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at t2.h0.a(Unknown Source:6)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at androidx.preference.Preference.a0(Unknown Source:20)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at androidx.preference.Preference.b0(Unknown Source:0)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at androidx.preference.Preference$a.onClick(Unknown Source:2)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at android.view.View.performClick(View.java:6256)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at android.view.View$PerformClick.run(View.java:24717)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at android.os.Handler.handleCallback(Handler.java:789)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:98)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:169)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6585)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)
09-09 15:51:04.725  8570  8570 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)
09-09 15:51:04.728  1635  7040 W ActivityManager:   Force finishing activity edu.berkeley.boinc/.BOINCActivity
rwaldura commented 2 months ago

Maybe related to #4236?

rwaldura commented 2 months ago

When I set a "lock screen" (pattern), I can edit the field. Remove the lock screen, and the app crashes when I attempt to edit.

rwaldura commented 2 months ago

Device where I found the bug is running Android 8, API level 26.

StackOverflow says: "ACTION_BIOMETRIC_ENROLL" added at API 30.

BOINC app v8.0.2 appears to target API level 16 at a minimum, so a fix would be nice! Thanks. <uses-sdk minSdkVersion='16' targetSdkVersion='28'>