Don't crash trying to stop program list updates on already closed tuner

Bug: 130816005
Test: build and run
Change-Id: Ibb0af40165c6b330785ef208510ba654c5ee6ad7
(cherry picked from commit 136870f7f1)
This commit is contained in:
Tomasz Wasilczyk
2019-08-07 12:57:00 -07:00
parent 2233164086
commit 06e534a3fb

View File

@@ -271,6 +271,8 @@ class TunerAdapter extends RadioTuner {
mCallback.setProgramListObserver(list, () -> {
try {
mTuner.stopProgramListUpdates();
} catch (IllegalStateException ex) {
// it's fine to not stop updates if tuner is already closed
} catch (RemoteException ex) {
Log.e(TAG, "Couldn't stop program list updates", ex);
}