From e16a2d7cb654040fdb06ba2e04fa274559250522 Mon Sep 17 00:00:00 2001 From: wb9688 Date: Sun, 3 May 2020 11:54:37 +0200 Subject: [PATCH] Upgrade jsoup --- app/build.gradle | 4 ++-- .../newpipe/info_list/holder/CommentsMiniInfoItemHolder.java | 4 ++-- app/src/main/java/org/schabi/newpipe/util/CookieUtils.java | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 08323560c..3794e31bc 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -163,10 +163,10 @@ dependencies { exclude module: 'support-annotations' } - implementation 'com.github.TeamNewPipe:NewPipeExtractor:f3913e241e379adf0091319091e8f895c5fcfd07' + implementation 'com.github.wb9688:NewPipeExtractor:8f71bde776336c442da66f2656e0141881fa9987' implementation "com.github.TeamNewPipe:nanojson:1d9e1aea9049fc9f85e68b43ba39fe7be1c1f751" - implementation "org.jsoup:jsoup:1.9.2" + implementation "org.jsoup:jsoup:1.13.1" implementation "com.squareup.okhttp3:okhttp:3.12.11" diff --git a/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java b/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java index 68be557ca..69f08f340 100644 --- a/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java +++ b/app/src/main/java/org/schabi/newpipe/info_list/holder/CommentsMiniInfoItemHolder.java @@ -3,6 +3,7 @@ package org.schabi.newpipe.info_list.holder; import android.content.ClipData; import android.content.ClipboardManager; import android.content.Context; +import android.text.TextUtils; import android.text.method.LinkMovementMethod; import android.text.style.URLSpan; import android.text.util.Linkify; @@ -12,7 +13,6 @@ import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; -import org.jsoup.helper.StringUtil; import org.schabi.newpipe.R; import org.schabi.newpipe.extractor.InfoItem; import org.schabi.newpipe.extractor.comments.CommentsInfoItem; @@ -143,7 +143,7 @@ public class CommentsMiniInfoItemHolder extends InfoItemHolder { } private void openCommentAuthor(final CommentsInfoItem item) { - if (StringUtil.isBlank(item.getUploaderUrl())) { + if (TextUtils.isEmpty(item.getUploaderUrl())) { return; } try { diff --git a/app/src/main/java/org/schabi/newpipe/util/CookieUtils.java b/app/src/main/java/org/schabi/newpipe/util/CookieUtils.java index 4575e7017..d8b81b4ce 100644 --- a/app/src/main/java/org/schabi/newpipe/util/CookieUtils.java +++ b/app/src/main/java/org/schabi/newpipe/util/CookieUtils.java @@ -1,6 +1,6 @@ package org.schabi.newpipe.util; -import org.jsoup.helper.StringUtil; +import android.text.TextUtils; import java.util.Arrays; import java.util.Collection; @@ -16,7 +16,7 @@ public final class CookieUtils { for (String cookies : cookieStrings) { cookieSet.addAll(splitCookies(cookies)); } - return StringUtil.join(cookieSet, "; ").trim(); + return TextUtils.join("; ", cookieSet).trim(); } public static Set splitCookies(final String cookies) {