mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1216307 - Backout e0ba952c2819 to backout top level shareplane (bug 1140048).
This commit is contained in:
parent
983be2c090
commit
2fc4f165ce
@ -1292,6 +1292,32 @@ 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.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user