Merge remote-tracking branch 'upstream/master'

This commit is contained in:
adbenitez
2021-06-25 15:38:37 -04:00
2 changed files with 17 additions and 6 deletions
@@ -98,9 +98,15 @@ public class LogViewFragment extends Fragment {
logPreview.setTextSize(TypedValue.COMPLEX_UNIT_PX, textSize);
}
public void scrollDownLog() { logPreview.setSelection(logPreview.getText().length()); }
public void scrollDownLog() {
logPreview.requestFocus();
logPreview.setSelection(logPreview.getText().length());
}
public void scrollUpLog() { logPreview.setSelection(0); }
public void scrollUpLog() {
logPreview.requestFocus();
logPreview.setSelection(0);
}
public boolean saveLogFile() {
@@ -53,10 +53,15 @@ public class WebViewActivity extends PassphraseRequiredActionBarActivity
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (url != null) {
if (url.startsWith("http://") || url.startsWith("https://") || url.startsWith("mailto:")) {
openOnlineUrl(url);
// URL opened externally, returning `true` causes the WebView to abort loading
return true;
String schema = url.split(":")[0].toLowerCase();
switch (schema) {
case "http":
case "https":
case "mailto":
case "openpgp4fpr":
openOnlineUrl(url);
// URL opened externally, returning `true` causes the WebView to abort loading
return true;
}
}
// by returning `true`, we also abort loading other URLs in our WebView;