mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +03:00
Fixed issue 308 - crash when other apps hold accounts with the same name, different type
This commit is contained in:
parent
ffa7b51784
commit
2bf0864806
1 changed files with 2 additions and 1 deletions
|
@ -22,6 +22,7 @@ import java.io.File;
|
|||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import com.owncloud.android.MainApp;
|
||||
import com.owncloud.android.datamodel.FileDataStorageManager;
|
||||
import com.owncloud.android.datamodel.OCFile;
|
||||
import com.owncloud.android.db.ProviderMeta.ProviderTableMeta;
|
||||
|
@ -141,7 +142,7 @@ public class FileObserverService extends Service {
|
|||
null);
|
||||
if (c == null || !c.moveToFirst()) return;
|
||||
AccountManager acm = AccountManager.get(this);
|
||||
Account[] accounts = acm.getAccounts();
|
||||
Account[] accounts = acm.getAccountsByType(MainApp.getAccountType());
|
||||
do {
|
||||
Account account = null;
|
||||
for (Account a : accounts)
|
||||
|
|
Loading…
Reference in a new issue