-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sync: Add base check provider add for a single account per provider
Update the Box, Dropbox, and OneDrive providers to use the base class method. The GDrive and ownCloud have their own implementations.
- Loading branch information
1 parent
6cf7674
commit 18b2e49
Showing
4 changed files
with
24 additions
and
48 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
/* | ||
* Copyright (©) 2017 Jeff Harris <[email protected]> | ||
* Copyright (©) 2017-2025 Jeff Harris <[email protected]> | ||
* All rights reserved. Use of the code is allowed under the | ||
* Artistic License 2.0 terms, as specified in the LICENSE file | ||
* distributed with this code, or available from | ||
|
@@ -13,7 +13,6 @@ | |
import android.content.Context; | ||
import android.content.Intent; | ||
import android.content.SharedPreferences; | ||
import android.database.sqlite.SQLiteDatabase; | ||
import android.net.Uri; | ||
import android.text.TextUtils; | ||
import android.util.Log; | ||
|
@@ -40,8 +39,6 @@ | |
import com.jefftharris.passwdsafe.sync.lib.SyncDb; | ||
import com.jefftharris.passwdsafe.sync.lib.SyncLogRecord; | ||
|
||
import java.util.List; | ||
|
||
/** | ||
* Implements a provider for the Box.com service | ||
*/ | ||
|
@@ -160,17 +157,6 @@ public Account getAccount(String acctName) | |
return new Account(acctName, SyncDb.BOX_ACCOUNT_TYPE); | ||
} | ||
|
||
@Override | ||
public void checkProviderAdd(SQLiteDatabase db) throws Exception | ||
{ | ||
List<DbProvider> providers = SyncDb.getProviders(db); | ||
for (DbProvider provider: providers) { | ||
if (provider.itsType == ProviderType.BOX) { | ||
throw new Exception("Only one Box account allowed"); | ||
} | ||
} | ||
} | ||
|
||
@Override | ||
public void cleanupOnDelete() | ||
{ | ||
|
This file contains 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 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 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