зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1216307 - Remove unused method hasOtherSyncClients. r=mcomella
--HG-- extra : commitid : 5FuDSqJugxB extra : rebase_source : e716f6c45b7b16125ed7946993ecdb778afdf8d5
This commit is contained in:
Родитель
f0fa455c61
Коммит
487c6f3f32
|
@ -1292,32 +1292,6 @@ public class ActivityChooserModel extends DataSetObservable {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Mozilla: Return whether or not there are other synced clients.
|
||||
*/
|
||||
private boolean hasOtherSyncClients() {
|
||||
// ClientsDatabaseAccessor returns stale data (bug 1145896) so we work around this by
|
||||
// checking if we have accounts set up - if not, we can't have any clients.
|
||||
if (!FirefoxAccounts.firefoxAccountsExist(mContext) &&
|
||||
!SyncAccounts.syncAccountsExist(mContext)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
final BrowserDB browserDB = GeckoProfile.get(mContext).getDB();
|
||||
final TabsAccessor tabsAccessor = browserDB.getTabsAccessor();
|
||||
final Cursor remoteClientsCursor = tabsAccessor
|
||||
.getRemoteClientsByRecencyCursor(mContext);
|
||||
if (remoteClientsCursor == null) {
|
||||
return false;
|
||||
}
|
||||
|
||||
try {
|
||||
return remoteClientsCursor.getCount() > 0;
|
||||
} finally {
|
||||
remoteClientsCursor.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Mozilla: Reload activities on sync.
|
||||
*/
|
||||
|
|
Загрузка…
Ссылка в новой задаче