// Store the content of the status message in `orbotStatus`.
orbotStatus = intent.getStringExtra("org.torproject.android.intent.extra.STATUS");
// Store the content of the status message in `orbotStatus`.
orbotStatus = intent.getStringExtra("org.torproject.android.intent.extra.STATUS");
// It is necessary to update `formattedUrlString` and `urlTextBox` after the page finishes loading because the final URL can change during load.
@Override
public void onPageFinished(WebView view, String url) {
// It is necessary to update `formattedUrlString` and `urlTextBox` after the page finishes loading because the final URL can change during load.
@Override
public void onPageFinished(WebView view, String url) {
// Flush any cookies to persistent storage. `CookieManager` has become very lazy about flushing cookies in recent versions.
if (firstPartyCookiesEnabled && Build.VERSION.SDK_INT >= 21) {
cookieManager.flush();
// Flush any cookies to persistent storage. `CookieManager` has become very lazy about flushing cookies in recent versions.
if (firstPartyCookiesEnabled && Build.VERSION.SDK_INT >= 21) {
cookieManager.flush();
// Display a message to the user if waiting for Orbot.
if (waitingForOrbot && !orbotStatus.equals("ON")) {
// Display a message to the user if waiting for Orbot.
if (waitingForOrbot && !orbotStatus.equals("ON")) {
// Load a waiting page. `null` specifies no encoding, which defaults to ASCII.
mainWebView.loadData(waitingForOrbotHTMLString, "text/html", null);
}
// Load a waiting page. `null` specifies no encoding, which defaults to ASCII.
mainWebView.loadData(waitingForOrbotHTMLString, "text/html", null);
}
// Load a waiting page. `null` specifies no encoding, which defaults to ASCII.
mainWebView.loadData(waitingForOrbotHTMLString, "text/html", null);
}
// Load a waiting page. `null` specifies no encoding, which defaults to ASCII.
mainWebView.loadData(waitingForOrbotHTMLString, "text/html", null);
}