Merge "Don't crash trying to stop program list updates on already closed tuner" into qt-qpr1-dev

This commit is contained in:
TreeHugger Robot
2019-08-08 17:54:28 +00:00
committed by Android (Google) Code Review

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);
}