-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
fix: back press handling in settings activity #15949
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
/backport to stable-3.34 |
|
|
||
| @SuppressLint("GestureBackNavigation") | ||
| @Override | ||
| public void onBackPressed() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to override the back press behavior, since the back press will handle itself and display whatever is in the stack.
| contactsPreferenceActivity.finish() | ||
| } else { | ||
| val settingsIntent = Intent(context, SettingsActivity::class.java) | ||
| settingsIntent.flags = Intent.FLAG_ACTIVITY_SINGLE_TOP or Intent.FLAG_ACTIVITY_CLEAR_TOP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't clear stack so that we can go back from SettingsActivity
| handleMnemonicRequest(data); | ||
| } else if (requestCode == ACTION_E2E && data != null && data.getBooleanExtra(SetupEncryptionDialogFragment.SUCCESS, false)) { | ||
| Intent i = new Intent(this, SettingsActivity.class); | ||
| i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't clear stack so that we can go back from SettingsActivity
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
1243dee to
53d4731
Compare
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
Signed-off-by: alperozturk <[email protected]>
|
test-Unit test failed: https://www.kaminsky.me/nc-dev/android-integrationTests/15949-Unit-test-10-17 |
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/15949.apk |

Fixes
Fixes drawer menu highlighting and transition from
SettingsActivity.Old related PR: #15384