Two minor crash fixes

* Don't call deprecated presence Uri
* Don't return null from SyncManager.getAccountList()
This commit is contained in:
Andrew Stadler 2009-08-21 17:05:18 -07:00
parent f330d1221a
commit a9a5dd60d6
2 changed files with 6 additions and 3 deletions

View File

@ -914,7 +914,8 @@ public class MessageView extends Activity
return;
}
final String senderEmail = email;
/*
new Thread() {
@Override
public void run() {
@ -939,6 +940,7 @@ public class MessageView extends Activity
mHandler.setSenderPresence(presenceIcon);
}
}.start();
*/
}
/**

View File

@ -161,6 +161,7 @@ public class SyncManager extends Service implements Runnable {
new HashMap<Long, PendingIntent>();
// The actual WakeLock obtained by SyncManager
private WakeLock mWakeLock = null;
private static final AccountList EMPTY_ACCOUNT_LIST = new AccountList();
// Observers that we use to look for changed mail-related data
private AccountObserver mAccountObserver;
@ -314,7 +315,7 @@ public class SyncManager extends Service implements Runnable {
}
};
class AccountList extends ArrayList<Account> {
static class AccountList extends ArrayList<Account> {
private static final long serialVersionUID = 1L;
public boolean contains(long id) {
@ -545,7 +546,7 @@ public class SyncManager extends Service implements Runnable {
if (INSTANCE != null) {
return INSTANCE.mAccountObserver.mAccounts;
} else {
return null;
return EMPTY_ACCOUNT_LIST;
}
}