-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
E2e ux #11031
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
Merged
Merged
E2e ux #11031
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
5b4aba1
Better show different states of E2E
tobiasKaminsky 9f1f21e
Update app/src/main/res/values/strings.xml
tobiasKaminsky fc446b1
Update screenshots for SettingsActivity
AlvaroBrey 6568d1d
Close SetupEncryptionActivity when dialog is dismissed
AlvaroBrey 09aac00
SetupEncryptionActivity: finish activity when error happens
AlvaroBrey b1b05f7
SetupEncryptionActivity: give transparent background to make it more …
AlvaroBrey 1b945b6
SetupEncryptionDialogFragment: use builtin onCancel for setting cance…
AlvaroBrey e3a7453
properly handle stage 2: key exists, but e2e is not setup on this device
tobiasKaminsky 6b4d6a6
SettingsActivity: fix conditional to show e2e encrypt option
AlvaroBrey 0d09825
Pass through SetupEncryptionDF result to SettingsActivity
AlvaroBrey 30d38de
Restore database v65 schema from master
AlvaroBrey b110735
NextcloudDatabase: enable automigration for new db version
AlvaroBrey f49252c
hide e2e options after removing local e2e setup
tobiasKaminsky 3f82d37
revert to master library
tobiasKaminsky 393e34d
restart SettingsActivity after changing e2e settings
tobiasKaminsky File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1,124 changes: 1,124 additions & 0 deletions
1,124
app/schemas/com.nextcloud.client.database.NextcloudDatabase/66.json
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file modified
BIN
+9.08 KB
(120%)
app/screenshots/gplay/debug/com.nextcloud.client.SettingsActivityIT_open.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+7.74 KB
(120%)
...hots/gplay/debug/com.nextcloud.client.SettingsActivityIT_showMnemonic_Error.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
app/src/main/java/com/owncloud/android/ui/activity/SetupEncryptionActivity.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| /* | ||
| * | ||
| * Nextcloud Android client application | ||
| * | ||
| * @author Tobias Kaminsky | ||
| * Copyright (C) 2022 Tobias Kaminsky | ||
| * Copyright (C) 2022 Nextcloud GmbH | ||
| * | ||
| * This program is free software: you can redistribute it and/or modify | ||
| * it under the terms of the GNU Affero General Public License as published by | ||
| * the Free Software Foundation, either version 3 of the License, or | ||
| * (at your option) any later version. | ||
| * | ||
| * This program is distributed in the hope that it will be useful, | ||
| * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| * GNU Affero General Public License for more details. | ||
| * | ||
| * You should have received a copy of the GNU Affero General Public License | ||
| * along with this program. If not, see <https://www.gnu.org/licenses/>. | ||
| */ | ||
|
|
||
| package com.owncloud.android.ui.activity | ||
|
|
||
| import android.content.Intent | ||
| import android.os.Bundle | ||
| import android.widget.Toast | ||
| import androidx.appcompat.app.AppCompatActivity | ||
| import com.nextcloud.client.account.User | ||
| import com.owncloud.android.R | ||
| import com.owncloud.android.ui.dialog.SetupEncryptionDialogFragment | ||
|
|
||
| class SetupEncryptionActivity : AppCompatActivity() { | ||
| override fun onCreate(savedInstanceState: Bundle?) { | ||
| super.onCreate(savedInstanceState) | ||
|
|
||
| val user = intent?.getParcelableExtra("EXTRA_USER") as User? | ||
|
|
||
| if (user == null) { | ||
| Toast.makeText(this, getString(R.string.error_showing_encryption_dialog), Toast.LENGTH_LONG).show() | ||
| finish() | ||
| } | ||
|
|
||
| val setupEncryptionDialogFragment = SetupEncryptionDialogFragment.newInstance(user, -1) | ||
| supportFragmentManager.setFragmentResultListener( | ||
| SetupEncryptionDialogFragment.RESULT_REQUEST_KEY, | ||
| this | ||
| ) { requestKey, result -> | ||
| if (requestKey == SetupEncryptionDialogFragment.RESULT_REQUEST_KEY) { | ||
| if (!result.getBoolean(SetupEncryptionDialogFragment.RESULT_KEY_CANCELLED, false)) { | ||
| setResult( | ||
| SetupEncryptionDialogFragment.SETUP_ENCRYPTION_RESULT_CODE, | ||
| buildResultIntentFromBundle(result) | ||
| ) | ||
| } | ||
| } | ||
| finish() | ||
| } | ||
| setupEncryptionDialogFragment.show(supportFragmentManager, "setup_encryption") | ||
| } | ||
|
|
||
| private fun buildResultIntentFromBundle(result: Bundle): Intent { | ||
| val intent = Intent() | ||
| intent.putExtra( | ||
| SetupEncryptionDialogFragment.SUCCESS, | ||
| result.getBoolean(SetupEncryptionDialogFragment.SUCCESS) | ||
| ) | ||
| intent.putExtra( | ||
| SetupEncryptionDialogFragment.ARG_POSITION, | ||
| result.getInt(SetupEncryptionDialogFragment.ARG_POSITION) | ||
| ) | ||
| return intent | ||
| } | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.