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 cf0b2dcd5e6f..5ae6ec8ebb98 100644 --- a/app/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java +++ b/app/src/main/java/com/owncloud/android/authentication/AuthenticatorActivity.java @@ -500,7 +500,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(); } @@ -542,6 +548,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 05ed0a9891d2..3f8a4823f467 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 @@ -115,7 +115,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 cbfd8f7f774d..73c5ebcd55ce 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 @@ -1217,7 +1217,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 046976793481..8ac829fd8e0c 100644 --- a/app/src/main/res/values/setup.xml +++ b/app/src/main/res/values/setup.xml @@ -65,7 +65,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