|
@ -121,10 +121,13 @@ public final class Utils { |
|
|
|
|
|
|
|
|
public static void setupCookies(final String cookieRaw) { |
|
|
public static void setupCookies(final String cookieRaw) { |
|
|
final CookieStore cookieStore = NET_COOKIE_MANAGER.getCookieStore(); |
|
|
final CookieStore cookieStore = NET_COOKIE_MANAGER.getCookieStore(); |
|
|
if (cookieRaw == "LOGOUT") { |
|
|
|
|
|
|
|
|
if (cookieStore == null || isEmpty(cookieRaw)) { |
|
|
|
|
|
return; |
|
|
|
|
|
} |
|
|
|
|
|
if (cookieRaw.equals("LOGOUT")) { |
|
|
cookieStore.removeAll(); |
|
|
cookieStore.removeAll(); |
|
|
|
|
|
return; |
|
|
} |
|
|
} |
|
|
else if (cookieRaw != null && !isEmpty(cookieRaw)) { |
|
|
|
|
|
try { |
|
|
try { |
|
|
final URI uri1 = new URI("https://instagram.com"); |
|
|
final URI uri1 = new URI("https://instagram.com"); |
|
|
final URI uri2 = new URI("https://instagram.com/"); |
|
|
final URI uri2 = new URI("https://instagram.com/"); |
|
@ -145,7 +148,6 @@ public final class Utils { |
|
|
if (BuildConfig.DEBUG) Log.e("AWAISKING_APP", "", e); |
|
|
if (BuildConfig.DEBUG) Log.e("AWAISKING_APP", "", e); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Nullable |
|
|
@Nullable |
|
|
public static String getUserIdFromCookie(final String cookie) { |
|
|
public static String getUserIdFromCookie(final String cookie) { |
|
|