Skip to content
This repository has been archived by the owner on May 7, 2024. It is now read-only.

Interrupting Permissions flow crashes on next launch #1

Open
spaceLenny opened this issue Sep 28, 2018 · 4 comments
Open

Interrupting Permissions flow crashes on next launch #1

spaceLenny opened this issue Sep 28, 2018 · 4 comments

Comments

@spaceLenny
Copy link

if you leave and revoke permissions and come back it crashes because it doesn't check if you have permissions in onResume (currently only checks in splash screen in initial onCreate)

@spaceLenny
Copy link
Author

Unable to repro this on Pixel XL

@katmitchell
Copy link

Still seeing this on the Pixel 2 XL.

  1. Open app and accept permissions. Note everything is working correctly.
  2. Hit "home" button to go to the launcher
  3. Long press on application icon and open settings. Remove all permissions.
  4. Tap app icon again. Note crash.
    Process: com.androidexperiments.tunnelvision, PID: 9478
    java.lang.RuntimeException: Unable to resume activity {com.androidexperiments.tunnelvision/com.androidexperiments.tunnelvision.MainActivity}: java.lang.RuntimeException: setAudioSource failed.
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3581)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3621)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2862)
        at android.app.ActivityThread.-wrap11(Unknown Source:0)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6494)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
     Caused by: java.lang.RuntimeException: setAudioSource failed.
        at android.media.MediaRecorder.setAudioSource(Native Method)
        at com.uncorkedstudios.android.view.recordablesurfaceview.RecordableSurfaceView.initRecorder(RecordableSurfaceView.java:247)
        at com.androidexperiments.tunnelvision.MainActivity.setReady(MainActivity.java:423)
        at com.androidexperiments.tunnelvision.MainActivity.onResume(MainActivity.java:332)
        at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1355)
        at android.app.Activity.performResume(Activity.java:7107)
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:3556)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:3621) 
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2862) 
        at android.app.ActivityThread.-wrap11(Unknown Source:0) 
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589) 
        at android.os.Handler.dispatchMessage(Handler.java:106) 
        at android.os.Looper.loop(Looper.java:164) 
        at android.app.ActivityThread.main(ActivityThread.java:6494) 
        at java.lang.reflect.Method.invoke(Native Method) 
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) 
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807) ```

@spaceLenny
Copy link
Author

Ahhh makes sense. Didn't try this. Thanks.

@spaceLenny
Copy link
Author

Fixed on master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants