fix crash bugs reported in Play Store

This commit is contained in:
Akinwale Ariwodola 2020-05-24 10:11:31 +01:00
parent 52cfe8dc12
commit b60b5d16c3
12 changed files with 108 additions and 66 deletions
app/src/main/java/io/lbry/browser/tasks

View file

@ -84,9 +84,13 @@ public class MergeSubscriptionsTask extends AsyncTask<Void, Void, List<Subscript
try {
LbryUri uri = LbryUri.parse(local.getUrl());
Map<String, String> options = new HashMap<>();
options.put("claim_id", uri.getChannelClaimId());
options.put("channel_name", Helper.normalizeChannelName(local.getChannelName()));
Lbryio.parseResponse(Lbryio.call("subscription", "new", options, context));
String channelClaimId = uri.getChannelClaimId();
String channelName = Helper.normalizeChannelName(local.getChannelName());
if (!Helper.isNullOrEmpty(channelClaimId) && !Helper.isNullOrEmpty(channelName)) {
options.put("claim_id", channelClaimId);
options.put("channel_name", channelName);
Lbryio.parseResponse(Lbryio.call("subscription", "new", options, context));
}
} catch (LbryUriException | LbryioRequestException | LbryioResponseException ex) {
// pass
Log.e(TAG, String.format("subscription/new failed: %s", ex.getMessage()), ex);