add bugrepport to channel acitivty
This commit is contained in:
parent
dd6c6ae03f
commit
cc74c98509
2 changed files with 35 additions and 22 deletions
|
@ -166,8 +166,9 @@ public class ChannelActivity extends AppCompatActivity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
|
StreamingService service = null;
|
||||||
try {
|
try {
|
||||||
StreamingService service = ServiceList.getService(serviceId);
|
service = ServiceList.getService(serviceId);
|
||||||
ChannelExtractor extractor = service.getChannelExtractorInstance(
|
ChannelExtractor extractor = service.getChannelExtractorInstance(
|
||||||
channelUrl, pageNumber, new Downloader());
|
channelUrl, pageNumber, new Downloader());
|
||||||
|
|
||||||
|
@ -194,15 +195,48 @@ public class ChannelActivity extends AppCompatActivity {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
Log.e(TAG, "------");
|
Log.e(TAG, "------");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
View rootView = findViewById(android.R.id.content);
|
||||||
|
ErrorActivity.reportError(h, ChannelActivity.this,
|
||||||
|
info.errors, null, rootView,
|
||||||
|
ErrorActivity.ErrorInfo.make(ErrorActivity.REQUESTED_STREAM,
|
||||||
|
service.getServiceInfo().name, channelUrl, 0 /* no message for the user */));
|
||||||
}
|
}
|
||||||
} catch(IOException ioe) {
|
} catch(IOException ioe) {
|
||||||
postNewErrorToast(h, R.string.network_error);
|
postNewErrorToast(h, R.string.network_error);
|
||||||
ioe.printStackTrace();
|
ioe.printStackTrace();
|
||||||
} catch(ParsingException pe) {
|
} catch(ParsingException pe) {
|
||||||
|
ErrorActivity.reportError(h, ChannelActivity.this, pe, VideoItemDetailFragment.class, null,
|
||||||
|
ErrorActivity.ErrorInfo.make(ErrorActivity.REQUESTED_STREAM,
|
||||||
|
service.getServiceInfo().name, channelUrl, R.string.parsing_error));
|
||||||
|
h.post(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
ChannelActivity.this.finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
pe.printStackTrace();
|
pe.printStackTrace();
|
||||||
} catch(ExtractionException ex) {
|
} catch(ExtractionException ex) {
|
||||||
|
ErrorActivity.reportError(h, ChannelActivity.this, ex, VideoItemDetailFragment.class, null,
|
||||||
|
ErrorActivity.ErrorInfo.make(ErrorActivity.REQUESTED_STREAM,
|
||||||
|
service.getServiceInfo().name, channelUrl, R.string.parsing_error));
|
||||||
|
h.post(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
ChannelActivity.this.finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
ex.printStackTrace();
|
ex.printStackTrace();
|
||||||
} catch(Exception e) {
|
} catch(Exception e) {
|
||||||
|
ErrorActivity.reportError(h, ChannelActivity.this, e, VideoItemDetailFragment.class, null,
|
||||||
|
ErrorActivity.ErrorInfo.make(ErrorActivity.REQUESTED_STREAM,
|
||||||
|
service.getServiceInfo().name, channelUrl, R.string.general_error));
|
||||||
|
h.post(new Runnable() {
|
||||||
|
@Override
|
||||||
|
public void run() {
|
||||||
|
ChannelActivity.this.finish();
|
||||||
|
}
|
||||||
|
});
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,27 +33,6 @@ public class StreamInfoWorker {
|
||||||
void onContentError();
|
void onContentError();
|
||||||
}
|
}
|
||||||
|
|
||||||
private class StreamResultReturnedRunnable implements Runnable {
|
|
||||||
private final StreamInfo streamInfo;
|
|
||||||
public StreamResultReturnedRunnable(StreamInfo streamInfo) {
|
|
||||||
this.streamInfo = streamInfo;
|
|
||||||
}
|
|
||||||
@Override
|
|
||||||
public void run() {
|
|
||||||
/*
|
|
||||||
if(a != null) {
|
|
||||||
boolean showAgeRestrictedContent = PreferenceManager.getDefaultSharedPreferences(a)
|
|
||||||
.getBoolean(activity.getString(R.string.show_age_restricted_content), false);
|
|
||||||
if (streamInfo.age_limit == 0 || showAgeRestrictedContent) {
|
|
||||||
updateInfo(streamInfo);
|
|
||||||
} else {
|
|
||||||
onNotSpecifiedContentErrorWithMessage(R.string.video_is_age_restricted);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class StreamExtractorRunnable implements Runnable {
|
private class StreamExtractorRunnable implements Runnable {
|
||||||
private final Handler h = new Handler();
|
private final Handler h = new Handler();
|
||||||
private StreamExtractor streamExtractor;
|
private StreamExtractor streamExtractor;
|
||||||
|
|
Loading…
Reference in a new issue