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

Commit de874608 authored by George Lu's avatar George Lu
Browse files

Catch IllegalStateException in RadioManager.openTuner()

b/126887436 is caused by the failure to catch this exception, which
prevents the creation of RadioAppService, which in turn causes
RadioActivity to crash upon creation.

Bug: 126887436
Test: Manually verified mitigation of b/126887436
Change-Id: I99a35c6c26a00ea1b977a592fc1c08e3127b6351
parent 75f61c59
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1761,7 +1761,7 @@ public class RadioManager {
        TunerCallbackAdapter halCallback = new TunerCallbackAdapter(callback, handler);
        try {
            tuner = mService.openTuner(moduleId, config, withAudio, halCallback);
        } catch (RemoteException | IllegalArgumentException ex) {
        } catch (RemoteException | IllegalArgumentException | IllegalStateException ex) {
            Log.e(TAG, "Failed to open tuner", ex);
            return null;
        }