Merge commit '01cc30c9d8327c6172036c1e15455d305423c718' into kraken * commit '01cc30c9d8327c6172036c1e15455d305423c718': Workaround for IllegalArgumentException in SyncManager
This commit is contained in:
commit
683812e1ff
@ -1811,8 +1811,14 @@ public class SyncManager extends Service implements Runnable {
|
|||||||
ContentResolver.addStatusChangeListener(ContentResolver.SYNC_OBSERVER_TYPE_SETTINGS,
|
ContentResolver.addStatusChangeListener(ContentResolver.SYNC_OBSERVER_TYPE_SETTINGS,
|
||||||
mSyncStatusObserver);
|
mSyncStatusObserver);
|
||||||
mAccountsUpdatedListener = new EasAccountsUpdatedListener();
|
mAccountsUpdatedListener = new EasAccountsUpdatedListener();
|
||||||
AccountManager.get(getApplication())
|
// TODO Find and fix root cause of duplication
|
||||||
.addOnAccountsUpdatedListener(mAccountsUpdatedListener, mHandler, true);
|
try {
|
||||||
|
AccountManager.get(getApplication())
|
||||||
|
.addOnAccountsUpdatedListener(mAccountsUpdatedListener, mHandler, true);
|
||||||
|
} catch (IllegalStateException e1) {
|
||||||
|
// This exception is more of a warning; we shouldn't be in the state in which we
|
||||||
|
// already have a listener.
|
||||||
|
}
|
||||||
|
|
||||||
// Set up receivers for ConnectivityManager
|
// Set up receivers for ConnectivityManager
|
||||||
mConnectivityReceiver = new ConnectivityReceiver();
|
mConnectivityReceiver = new ConnectivityReceiver();
|
||||||
|
Loading…
Reference in New Issue
Block a user