Merge change 21841 into eclair
* changes: clean up some logs and clamp the syncable value
This commit is contained in:
@@ -419,6 +419,12 @@ public class SyncStorageEngine extends Handler {
|
|||||||
|
|
||||||
public void setIsSyncable(Account account, String providerName, int syncable) {
|
public void setIsSyncable(Account account, String providerName, int syncable) {
|
||||||
int oldState;
|
int oldState;
|
||||||
|
if (syncable > 1) {
|
||||||
|
syncable = 1;
|
||||||
|
} else if (syncable < -1) {
|
||||||
|
syncable = -1;
|
||||||
|
}
|
||||||
|
Log.d(TAG, "setIsSyncable: " + account + ", provider " + providerName + " -> " + syncable);
|
||||||
synchronized (mAuthorities) {
|
synchronized (mAuthorities) {
|
||||||
AuthorityInfo authority = getOrCreateAuthorityLocked(account, providerName, -1, false);
|
AuthorityInfo authority = getOrCreateAuthorityLocked(account, providerName, -1, false);
|
||||||
oldState = authority.syncable;
|
oldState = authority.syncable;
|
||||||
@@ -989,14 +995,18 @@ public class SyncStorageEngine extends Handler {
|
|||||||
AccountInfo account = mAccounts.get(accountName);
|
AccountInfo account = mAccounts.get(accountName);
|
||||||
if (account == null) {
|
if (account == null) {
|
||||||
if (tag != null) {
|
if (tag != null) {
|
||||||
Log.w(TAG, tag + ": unknown account " + accountName);
|
if (Log.isLoggable(TAG, Log.VERBOSE)) {
|
||||||
|
Log.v(TAG, tag + ": unknown account " + accountName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
AuthorityInfo authority = account.authorities.get(authorityName);
|
AuthorityInfo authority = account.authorities.get(authorityName);
|
||||||
if (authority == null) {
|
if (authority == null) {
|
||||||
if (tag != null) {
|
if (tag != null) {
|
||||||
Log.w(TAG, tag + ": unknown authority " + authorityName);
|
if (Log.isLoggable(TAG, Log.VERBOSE)) {
|
||||||
|
Log.v(TAG, tag + ": unknown authority " + authorityName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -1024,6 +1034,8 @@ public class SyncStorageEngine extends Handler {
|
|||||||
ident++;
|
ident++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Log.d(TAG, "created a new AuthorityInfo for " + accountName
|
||||||
|
+ ", provider " + authorityName);
|
||||||
authority = new AuthorityInfo(accountName, authorityName, ident);
|
authority = new AuthorityInfo(accountName, authorityName, ident);
|
||||||
account.authorities.put(authorityName, authority);
|
account.authorities.put(authorityName, authority);
|
||||||
mAuthorities.put(ident, authority);
|
mAuthorities.put(ident, authority);
|
||||||
|
|||||||
Reference in New Issue
Block a user