mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
delete local keys on account removal
This commit is contained in:
parent
128f3c97c8
commit
21a04b1bfe
1 changed files with 5 additions and 0 deletions
|
@ -40,6 +40,7 @@ import com.owncloud.android.datamodel.SyncedFolderProvider;
|
|||
import com.owncloud.android.datamodel.UploadsStorageManager;
|
||||
import com.owncloud.android.ui.activity.ContactsPreferenceActivity;
|
||||
import com.owncloud.android.ui.events.AccountRemovedEvent;
|
||||
import com.owncloud.android.utils.EncryptionUtils;
|
||||
import com.owncloud.android.utils.FileStorageUtils;
|
||||
import com.owncloud.android.utils.FilesSyncHelper;
|
||||
|
||||
|
@ -115,6 +116,10 @@ public class AccountRemovalJob extends Job implements AccountManagerCallback<Boo
|
|||
filesystemDataProvider.deleteAllEntriesForSyncedFolder(Long.toString(syncedFolderId));
|
||||
}
|
||||
|
||||
// delete stored E2E keys
|
||||
arbitraryDataProvider.deleteKeyForAccount(account.name, EncryptionUtils.PRIVATE_KEY);
|
||||
arbitraryDataProvider.deleteKeyForAccount(account.name, EncryptionUtils.PUBLIC_KEY);
|
||||
|
||||
return Result.SUCCESS;
|
||||
} else {
|
||||
return Result.FAILURE;
|
||||
|
|
Loading…
Reference in a new issue