Merge pull request #483 from mauriciocolli/patch-2
Fix bug when fetching unavailable content
This commit is contained in:
commit
028872a7d8
1 changed files with 18 additions and 2 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue