|
@ -10,6 +10,7 @@ import java.net.CookieStore; |
|
|
import java.net.HttpCookie; |
|
|
import java.net.HttpCookie; |
|
|
import java.net.URI; |
|
|
import java.net.URI; |
|
|
import java.net.URISyntaxException; |
|
|
import java.net.URISyntaxException; |
|
|
|
|
|
import java.util.ArrayList; |
|
|
import java.util.Arrays; |
|
|
import java.util.Arrays; |
|
|
import java.util.List; |
|
|
import java.util.List; |
|
|
import java.util.regex.Matcher; |
|
|
import java.util.regex.Matcher; |
|
@ -31,8 +32,7 @@ public final class CookieUtils { |
|
|
cookieStore.removeAll(); |
|
|
cookieStore.removeAll(); |
|
|
Utils.dataBox.deleteAllUserCookies(); |
|
|
Utils.dataBox.deleteAllUserCookies(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
|
|
|
else if (cookieRaw.equals("LOGOUT")) { |
|
|
|
|
|
|
|
|
} else if (cookieRaw.equals("LOGOUT")) { |
|
|
cookieStore.removeAll(); |
|
|
cookieStore.removeAll(); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
@ -79,7 +79,7 @@ public final class CookieUtils { |
|
|
|
|
|
|
|
|
@Nullable |
|
|
@Nullable |
|
|
public static String getCookie(@Nullable final String webViewUrl) { |
|
|
public static String getCookie(@Nullable final String webViewUrl) { |
|
|
final List<String> domains = Arrays.asList( |
|
|
|
|
|
|
|
|
final List<String> domains = new ArrayList<>(Arrays.asList( |
|
|
"https://instagram.com", |
|
|
"https://instagram.com", |
|
|
"https://instagram.com/", |
|
|
"https://instagram.com/", |
|
|
"http://instagram.com", |
|
|
"http://instagram.com", |
|
@ -88,8 +88,7 @@ public final class CookieUtils { |
|
|
"https://www.instagram.com/", |
|
|
"https://www.instagram.com/", |
|
|
"http://www.instagram.com", |
|
|
"http://www.instagram.com", |
|
|
"http://www.instagram.com/" |
|
|
"http://www.instagram.com/" |
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
)); |
|
|
if (!TextUtils.isEmpty(webViewUrl)) { |
|
|
if (!TextUtils.isEmpty(webViewUrl)) { |
|
|
domains.add(0, webViewUrl); |
|
|
domains.add(0, webViewUrl); |
|
|
} |
|
|
} |
|
|