Merge pull request #483 from mauriciocolli/patch-2

Fix bug when fetching unavailable content
This commit is contained in:
Christian Schabesberger 2017-03-17 17:10:03 +01:00 committed by GitHub
commit 028872a7d8

View file

@ -818,9 +818,25 @@ public class PopupVideoPlayer extends Service implements StateInterface {
});
}
});
} catch (IOException ie) {
if (DEBUG) ie.printStackTrace();
mainHandler.post(new Runnable() {
@Override
public void run() {
Toast.makeText(PopupVideoPlayer.this, R.string.network_error, Toast.LENGTH_SHORT).show();
}
});
stopSelf();
} catch (Exception e) {
e.printStackTrace();
if (DEBUG) e.printStackTrace();
mainHandler.post(new Runnable() {
@Override
public void run() {
Toast.makeText(PopupVideoPlayer.this, R.string.content_not_available, Toast.LENGTH_SHORT).show();
}
});
stopSelf();
}
}
}
}
}