diff --git a/app/src/debug/res/values/setup.xml b/app/src/debug/res/values/setup.xml new file mode 100644 index 000000000000..046f7830a774 --- /dev/null +++ b/app/src/debug/res/values/setup.xml @@ -0,0 +1,6 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java b/app/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java index efea5a9cc1fc..8b0558aabf1f 100644 --- a/app/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/app/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -417,7 +417,13 @@ public boolean onKeyDown(int keyCode, KeyEvent event) { if (accountSetupWebviewBinding != null && event.getAction() == KeyEvent.ACTION_DOWN && keyCode == KeyEvent.KEYCODE_BACK) { if (accountSetupWebviewBinding.loginWebview.canGoBack()) { - accountSetupWebviewBinding.loginWebview.goBack(); + // NMC-2602 Fix + // On back press "Webpage not available" error comes + // because login urls doesn't maintain the backstack hierarchy + // to solve it we are recreating the activity with the actual login url + // if user presses back from other urls which is not first or login url + // it will recreate the activity else it will finish the activity + recreate(); } else { finish(); } @@ -459,6 +465,10 @@ public boolean shouldOverrideUrlLoading(WebView view, String url) { public void onPageFinished(WebView view, String url) { super.onPageFinished(view, url); + //scroll to top when url loads + //because directly loading Telekom login page it scrolls down automatically + view.scrollTo(0,0); + accountSetupWebviewBinding.loginWebviewProgressBar.setVisibility(View.GONE); accountSetupWebviewBinding.loginWebview.setVisibility(View.VISIBLE); diff --git a/app/src/main/java/com/owncloud/android/ui/activity/BaseActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/BaseActivity.java index 4c1e79f28de8..01084174325b 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/BaseActivity.java +++ b/app/src/main/java/com/owncloud/android/ui/activity/BaseActivity.java @@ -109,7 +109,10 @@ protected void onNewIntent(Intent intent) { protected void onRestart() { Log_OC.v(TAG, "onRestart() start"); super.onRestart(); - mixinRegistry.onRestart(); + //Fix of NMC-2303 and NMC-2441 + if (enableAccountHandling) { + mixinRegistry.onRestart(); + } } private void onThemeSettingsModeChanged() { diff --git a/app/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java index 7205a2540302..1c81ae2e6b3f 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java +++ b/app/src/main/java/com/owncloud/android/ui/activity/DrawerActivity.java @@ -1197,7 +1197,8 @@ protected void onStop() { @Subscribe(threadMode = ThreadMode.MAIN) public void onAccountRemovedEvent(AccountRemovedEvent event) { - restart(); + //NMC customization + finish(); } /** diff --git a/app/src/main/res/values/setup.xml b/app/src/main/res/values/setup.xml index 3cdde9c1c89c..b6c22c196e85 100644 --- a/app/src/main/res/values/setup.xml +++ b/app/src/main/res/values/setup.xml @@ -64,7 +64,7 @@ #7fC0E3 - true + false false diff --git a/app/src/release/res/values/setup.xml b/app/src/release/res/values/setup.xml new file mode 100644 index 000000000000..a4600f0ff88a --- /dev/null +++ b/app/src/release/res/values/setup.xml @@ -0,0 +1,5 @@ + + + + https://magentacloud.de/index.php/login/flow + \ No newline at end of file