From c34399bd0c5dc3d6c96768845c4f7d9d081451f0 Mon Sep 17 00:00:00 2001 From: Kartikaya Gupta Date: Thu, 15 Mar 2012 15:01:52 -0400 Subject: [PATCH] Bug 736125 - Fix Java 7 compile warnings. r=sriram --- mobile/android/base/GeckoApp.java | 2 +- mobile/android/base/TabsTray.java | 7 +++---- mobile/android/base/gfx/LayerController.java | 7 +++---- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/mobile/android/base/GeckoApp.java b/mobile/android/base/GeckoApp.java index 53d4f6384fc..9357792bdc6 100644 --- a/mobile/android/base/GeckoApp.java +++ b/mobile/android/base/GeckoApp.java @@ -1321,7 +1321,7 @@ abstract public class GeckoApp // want to load the image straight away. If tab is still // loading, we only load the favicon once the page's content // is fully loaded (see handleContentLoaded()). - if (tab.getState() != tab.STATE_LOADING) { + if (tab.getState() != Tab.STATE_LOADING) { mMainHandler.post(new Runnable() { public void run() { loadFavicon(tab); diff --git a/mobile/android/base/TabsTray.java b/mobile/android/base/TabsTray.java index 170bbe28ca5..f7c81d71e4e 100644 --- a/mobile/android/base/TabsTray.java +++ b/mobile/android/base/TabsTray.java @@ -87,9 +87,8 @@ public class TabsTray extends Activity implements Tabs.OnTabsChangedListener { sPreferredHeight = (int) (0.67 * metrics.heightPixels); sMaxHeight = (int) (sPreferredHeight + (0.33 * sListItemHeight)); - Tabs tabs = Tabs.getInstance(); - tabs.registerOnTabsChangedListener(this); - tabs.refreshThumbnails(); + Tabs.registerOnTabsChangedListener(this); + Tabs.getInstance().refreshThumbnails(); onTabChanged(null, null); // If Sync is set up, query the database for remote clients. @@ -114,7 +113,7 @@ public class TabsTray extends Activity implements Tabs.OnTabsChangedListener { @Override public void onDestroy() { super.onDestroy(); - Tabs.getInstance().unregisterOnTabsChangedListener(this); + Tabs.unregisterOnTabsChangedListener(this); } public void onTabChanged(Tab tab, Tabs.TabEvents msg) { diff --git a/mobile/android/base/gfx/LayerController.java b/mobile/android/base/gfx/LayerController.java index 2bd46d3974f..f0131fdeef5 100644 --- a/mobile/android/base/gfx/LayerController.java +++ b/mobile/android/base/gfx/LayerController.java @@ -142,14 +142,13 @@ public class LayerController implements Tabs.OnTabsChangedListener { mView = new LayerView(context, this); mCheckerboardShouldShowChecks = true; - Tabs.getInstance().registerOnTabsChangedListener(this); + Tabs.registerOnTabsChangedListener(this); - ViewConfiguration vc = ViewConfiguration.get(mContext); - mTimeout = vc.getLongPressTimeout(); + mTimeout = ViewConfiguration.getLongPressTimeout(); } public void onDestroy() { - Tabs.getInstance().unregisterOnTabsChangedListener(this); + Tabs.unregisterOnTabsChangedListener(this); } public void setRoot(Layer layer) { mRootLayer = layer; }