mirror of
https://github.com/etesync/android
synced 2025-01-23 22:21:23 +00:00
Import: Add an alias for our addressbook and davdroid account types.
This commit is contained in:
parent
861d5e4b4e
commit
eb95eada91
@ -6,6 +6,7 @@ import android.content.pm.PackageManager;
|
|||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.support.v4.content.ContextCompat;
|
import android.support.v4.content.ContextCompat;
|
||||||
|
|
||||||
|
import com.etesync.syncadapter.App;
|
||||||
import com.etesync.syncadapter.R;
|
import com.etesync.syncadapter.R;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
@ -24,7 +25,12 @@ class AccountResolver {
|
|||||||
// Hardcoded swaps for known accounts:
|
// Hardcoded swaps for known accounts:
|
||||||
if (accountName.equals("com.google")) {
|
if (accountName.equals("com.google")) {
|
||||||
accountName = "com.google.android.googlequicksearchbox";
|
accountName = "com.google.android.googlequicksearchbox";
|
||||||
|
} else if (accountName.equals(App.getAddressBookAccountType())) {
|
||||||
|
accountName = App.getAccountType();
|
||||||
|
} else if (accountName.equals("at.bitfire.davdroid.address_book")) {
|
||||||
|
accountName = "at.bitfire.davdroid";
|
||||||
}
|
}
|
||||||
|
|
||||||
AccountInfo ret = cache.get(accountName);
|
AccountInfo ret = cache.get(accountName);
|
||||||
if (ret == null) {
|
if (ret == null) {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user