Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
Signed-off-by: tobiasKaminsky <[email protected]>
  • Loading branch information
tobiasKaminsky committed Apr 12, 2024
1 parent 5d60473 commit ffae0bd
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,24 @@ private static String getWebLoginUserAgent() {
Build.MANUFACTURER.substring(1).toLowerCase(Locale.getDefault()) + " " + Build.MODEL + " (Android)";
}

private void initWebViewLogin(String baseURL, boolean useGenericUserAgent) {
String url;
if (baseURL != null && !baseURL.isEmpty()) {
url = baseURL;
} else {
url = getResources().getString(R.string.webview_login_url);
}

url = url + "?clientName=Android";

Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));

DisplayUtils.startIntentIfAppAvailable(intent, this, R.string.no_browser_available);
}

@SuppressFBWarnings("ANDROID_WEB_VIEW_JAVASCRIPT")
@SuppressLint("SetJavaScriptEnabled")
private void initWebViewLogin(String baseURL, boolean useGenericUserAgent) {
private void initWebViewLoginOld(String baseURL, boolean useGenericUserAgent) {
viewThemeUtils.platform.colorCircularProgressBar(accountSetupWebviewBinding.loginWebviewProgressBar, ColorRole.ON_PRIMARY_CONTAINER);
accountSetupWebviewBinding.loginWebview.setVisibility(View.GONE);
new WebViewUtil(this).setProxyKKPlus(accountSetupWebviewBinding.loginWebview);
Expand Down
6 changes: 3 additions & 3 deletions app/src/main/java/com/owncloud/android/utils/WebViewUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ class WebViewUtil(private val context: Context) {
private val packageName = "com.google.android.webview"

fun checkWebViewVersion() {
if (!isWebViewVersionValid()) {
showUpdateDialog()
}
// if (!isWebViewVersionValid()) {
// showUpdateDialog()
// }
}

private fun isWebViewVersionValid(): Boolean {
Expand Down

0 comments on commit ffae0bd

Please sign in to comment.