From 63866d92a51027de24272ee65c09ded2b69203c9 Mon Sep 17 00:00:00 2001 From: Brian Nicholson Date: Thu, 21 Feb 2013 11:56:19 -0800 Subject: [PATCH] Bug 842395 - Remove areClientsAvailable() from TabsAccessor. r=mfinkle --HG-- extra : rebase_source : edca3b7010a8a4cae538ca9632d98e3201a135c1 --- mobile/android/base/TabsAccessor.java | 40 --------------------------- 1 file changed, 40 deletions(-) diff --git a/mobile/android/base/TabsAccessor.java b/mobile/android/base/TabsAccessor.java index e34ab17df985..297252d0c707 100644 --- a/mobile/android/base/TabsAccessor.java +++ b/mobile/android/base/TabsAccessor.java @@ -60,46 +60,6 @@ public final class TabsAccessor { public void onQueryTabsComplete(List tabs); } - public interface OnClientsAvailableListener { - public void areAvailable(boolean available); - } - - // Helper method to check if there are any clients available - public static void areClientsAvailable(final Context context, final OnClientsAvailableListener listener) { - if (listener == null) - return; - - (new GeckoAsyncTask(GeckoApp.mAppContext, GeckoAppShell.getHandler()) { - @Override - protected Boolean doInBackground(Void... unused) { - Uri uri = BrowserContract.Tabs.CONTENT_URI; - uri = uri.buildUpon() - .appendQueryParameter(BrowserContract.PARAM_LIMIT, "1") - .build(); - - Cursor cursor = context.getContentResolver().query(uri, - CLIENTS_AVAILABILITY_PROJECTION, - CLIENTS_SELECTION, - null, - null); - - if (cursor == null) - return false; - - try { - return cursor.moveToNext(); - } finally { - cursor.close(); - } - } - - @Override - protected void onPostExecute(Boolean availability) { - listener.areAvailable(availability); - } - }).setPriority(GeckoAsyncTask.Priority.HIGH).execute(); - } - // This method returns all tabs from all remote clients, // ordered by most recent client first, most recent tab first public static void getTabs(final Context context, final OnQueryTabsCompleteListener listener) {