From 02a84efb54d5b8704fab527d1383b76ae8e466f8 Mon Sep 17 00:00:00 2001 From: Sriram Ramasubramanian Date: Thu, 27 Jun 2013 16:51:50 -0700 Subject: [PATCH] Bug 855888: Remove "Gecko." namespace in XML files. [r=bnicholson] --- mobile/android/base/GeckoViewsFactory.java | 49 ++++---- .../tabs_panel_header.xml | 10 +- .../layout-large-v11/browser_toolbar.xml | 72 ++++++------ .../abouthome_content.xml | 104 ++++++++--------- .../layout-xlarge-v11/awesomebar_search.xml | 14 +-- .../layout-xlarge-v11/remote_tabs_group.xml | 26 ++--- .../resources/layout/abouthome_addon_row.xml | 14 +-- .../resources/layout/abouthome_content.xml | 110 +++++++++--------- .../layout/abouthome_last_tabs_row.xml | 50 ++++---- .../layout/abouthome_remote_tab_row.xml | 14 +-- .../resources/layout/abouthome_section.xml | 14 +-- .../layout/awesomebar_folder_row.xml | 16 +-- .../base/resources/layout/awesomebar_row.xml | 16 +-- .../layout/awesomebar_suggestion_prompt.xml | 14 +-- .../layout/awesomebar_suggestion_row.xml | 16 +-- .../layout/awesomebar_tab_indicator.xml | 26 ++--- .../base/resources/layout/browser_toolbar.xml | 74 ++++++------ .../resources/layout/remote_tabs_group.xml | 22 ++-- .../base/resources/layout/tabs_counter.xml | 24 ++-- .../base/resources/layout/tabs_item_cell.xml | 33 +++--- .../base/resources/layout/tabs_item_row.xml | 30 ++--- .../resources/layout/tabs_panel_header.xml | 10 +- 22 files changed, 376 insertions(+), 382 deletions(-) diff --git a/mobile/android/base/GeckoViewsFactory.java b/mobile/android/base/GeckoViewsFactory.java index 899e10807b3c..0d05f5c8637e 100644 --- a/mobile/android/base/GeckoViewsFactory.java +++ b/mobile/android/base/GeckoViewsFactory.java @@ -37,9 +37,6 @@ public final class GeckoViewsFactory implements LayoutInflater.Factory { private static final String GECKO_VIEW_IDENTIFIER = "org.mozilla.gecko."; private static final int GECKO_VIEW_IDENTIFIER_LENGTH = GECKO_VIEW_IDENTIFIER.length(); - private static final String GECKO_IDENTIFIER = "Gecko."; - private static final int GECKO_IDENTIFIER_LENGTH = GECKO_IDENTIFIER.length(); - private final Map> mFactoryMap; private GeckoViewsFactory() { @@ -50,12 +47,6 @@ public final class GeckoViewsFactory implements LayoutInflater.Factory { Class arg1Class = Context.class; Class arg2Class = AttributeSet.class; try { - mFactoryMap.put("AboutHomeView", AboutHomeView.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("AddonsSection", AddonsSection.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("LastTabsSection", LastTabsSection.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("PromoBox", PromoBox.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("RemoteTabsSection", RemoteTabsSection.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("TopSitesView", TopSitesView.class.getConstructor(arg1Class, arg2Class)); mFactoryMap.put("AwesomeBarTabs", AwesomeBarTabs.class.getConstructor(arg1Class, arg2Class)); mFactoryMap.put("AwesomeBarTabs$BackgroundLayout", AwesomeBarTabs.BackgroundLayout.class.getConstructor(arg1Class, arg2Class)); mFactoryMap.put("BackButton", BackButton.class.getConstructor(arg1Class, arg2Class)); @@ -64,33 +55,39 @@ public final class GeckoViewsFactory implements LayoutInflater.Factory { mFactoryMap.put("FormAssistPopup", FormAssistPopup.class.getConstructor(arg1Class, arg2Class)); mFactoryMap.put("ForwardButton", ForwardButton.class.getConstructor(arg1Class, arg2Class)); mFactoryMap.put("GeckoApp$MainLayout", GeckoApp.MainLayout.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("LinkTextView", LinkTextView.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("menu.MenuItemActionBar", MenuItemActionBar.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("menu.MenuItemDefault", MenuItemDefault.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("menu.GeckoMenu$DefaultActionItemBar", GeckoMenu.DefaultActionItemBar.class.getConstructor(arg1Class, arg2Class)); mFactoryMap.put("FindInPageBar", FindInPageBar.class.getConstructor(arg1Class, arg2Class)); mFactoryMap.put("IconTabWidget", IconTabWidget.class.getConstructor(arg1Class, arg2Class)); mFactoryMap.put("RemoteTabs", RemoteTabs.class.getConstructor(arg1Class, arg2Class)); mFactoryMap.put("ShapedButton", ShapedButton.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("TabRow", TabRow.class.getConstructor(arg1Class, arg2Class)); mFactoryMap.put("TabsPanel", TabsPanel.class.getConstructor(arg1Class, arg2Class)); mFactoryMap.put("TabsPanel$TabsListContainer", TabsPanel.TabsListContainer.class.getConstructor(arg1Class, arg2Class)); mFactoryMap.put("TabsPanel$TabsPanelToolbar", TabsPanel.TabsPanelToolbar.class.getConstructor(arg1Class, arg2Class)); mFactoryMap.put("TabsTray", TabsTray.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("ThumbnailView", ThumbnailView.class.getConstructor(arg1Class, arg2Class)); mFactoryMap.put("TextSelectionHandle", TextSelectionHandle.class.getConstructor(arg1Class, arg2Class)); mFactoryMap.put("gfx.LayerView", LayerView.class.getConstructor(arg1Class, arg2Class)); mFactoryMap.put("AllCapsTextView", AllCapsTextView.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("Button", GeckoButton.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("EditText", GeckoEditText.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("FrameLayout", GeckoFrameLayout.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("ImageButton", GeckoImageButton.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("ImageView", GeckoImageView.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("LinearLayout", GeckoLinearLayout.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("RelativeLayout", GeckoRelativeLayout.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("TextSwitcher", GeckoTextSwitcher.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("TextView", GeckoTextView.class.getConstructor(arg1Class, arg2Class)); - mFactoryMap.put("FaviconView", FaviconView.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("GeckoButton", GeckoButton.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("GeckoEditText", GeckoEditText.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("GeckoFrameLayout", GeckoFrameLayout.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("GeckoImageButton", GeckoImageButton.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("GeckoImageView", GeckoImageView.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("GeckoLinearLayout", GeckoLinearLayout.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("GeckoRelativeLayout", GeckoRelativeLayout.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("GeckoTextSwitcher", GeckoTextSwitcher.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("GeckoTextView", GeckoTextView.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("menu.MenuItemActionBar", MenuItemActionBar.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("menu.MenuItemDefault", MenuItemDefault.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("menu.GeckoMenu$DefaultActionItemBar", GeckoMenu.DefaultActionItemBar.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("widget.AboutHomeView", AboutHomeView.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("widget.AddonsSection", AddonsSection.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("widget.FaviconView", FaviconView.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("widget.LastTabsSection", LastTabsSection.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("widget.LinkTextView", LinkTextView.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("widget.PromoBox", PromoBox.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("widget.RemoteTabsSection", RemoteTabsSection.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("widget.TabRow", TabRow.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("widget.ThumbnailView", ThumbnailView.class.getConstructor(arg1Class, arg2Class)); + mFactoryMap.put("widget.TopSitesView", TopSitesView.class.getConstructor(arg1Class, arg2Class)); } catch (NoSuchMethodException nsme) { Log.e(LOGTAG, "Unable to initialize views factory", nsme); } @@ -110,8 +107,6 @@ public final class GeckoViewsFactory implements LayoutInflater.Factory { if (name.startsWith(GECKO_VIEW_IDENTIFIER)) viewName = name.substring(GECKO_VIEW_IDENTIFIER_LENGTH); - else if (name.startsWith(GECKO_IDENTIFIER)) - viewName = name.substring(GECKO_IDENTIFIER_LENGTH); else return null; diff --git a/mobile/android/base/resources/layout-large-land-v11/tabs_panel_header.xml b/mobile/android/base/resources/layout-large-land-v11/tabs_panel_header.xml index a29ab759e33b..21dc6aa33b48 100644 --- a/mobile/android/base/resources/layout-large-land-v11/tabs_panel_header.xml +++ b/mobile/android/base/resources/layout-large-land-v11/tabs_panel_header.xml @@ -5,10 +5,10 @@ - + diff --git a/mobile/android/base/resources/layout-large-v11/browser_toolbar.xml b/mobile/android/base/resources/layout-large-v11/browser_toolbar.xml index 1b7ab1b96ba3..b0fcd50b31d7 100644 --- a/mobile/android/base/resources/layout-large-v11/browser_toolbar.xml +++ b/mobile/android/base/resources/layout-large-v11/browser_toolbar.xml @@ -11,15 +11,15 @@ android:layout_height="fill_parent" android:background="@drawable/address_bar_bg"/> - + - + diff --git a/mobile/android/base/resources/layout/abouthome_addon_row.xml b/mobile/android/base/resources/layout/abouthome_addon_row.xml index 71cf0b64e06d..512ec467b1f8 100644 --- a/mobile/android/base/resources/layout/abouthome_addon_row.xml +++ b/mobile/android/base/resources/layout/abouthome_addon_row.xml @@ -3,10 +3,10 @@ - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - + diff --git a/mobile/android/base/resources/layout/abouthome_content.xml b/mobile/android/base/resources/layout/abouthome_content.xml index ec0c44c6b652..78eb43230c01 100644 --- a/mobile/android/base/resources/layout/abouthome_content.xml +++ b/mobile/android/base/resources/layout/abouthome_content.xml @@ -16,27 +16,27 @@ android:paddingLeft="@dimen/abouthome_gutter_large" android:paddingRight="@dimen/abouthome_gutter_large"> - + - + - + - + - + - + - + diff --git a/mobile/android/base/resources/layout/abouthome_last_tabs_row.xml b/mobile/android/base/resources/layout/abouthome_last_tabs_row.xml index c528cfe71c7e..96471853c8f8 100644 --- a/mobile/android/base/resources/layout/abouthome_last_tabs_row.xml +++ b/mobile/android/base/resources/layout/abouthome_last_tabs_row.xml @@ -9,32 +9,32 @@ android:gravity="left|center_vertical" style="@style/AboutHome.RowItem"> - + - + - + diff --git a/mobile/android/base/resources/layout/abouthome_remote_tab_row.xml b/mobile/android/base/resources/layout/abouthome_remote_tab_row.xml index 68105ba62ab4..accc4780a67f 100644 --- a/mobile/android/base/resources/layout/abouthome_remote_tab_row.xml +++ b/mobile/android/base/resources/layout/abouthome_remote_tab_row.xml @@ -3,10 +3,10 @@ - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - + diff --git a/mobile/android/base/resources/layout/abouthome_section.xml b/mobile/android/base/resources/layout/abouthome_section.xml index b9b218970f37..ef75c9e5ea0a 100644 --- a/mobile/android/base/resources/layout/abouthome_section.xml +++ b/mobile/android/base/resources/layout/abouthome_section.xml @@ -34,12 +34,12 @@ android:isScrollContainer="false" android:duplicateParentState="true"/> - + diff --git a/mobile/android/base/resources/layout/awesomebar_folder_row.xml b/mobile/android/base/resources/layout/awesomebar_folder_row.xml index 59d13c8292d1..b8a95bcc13c5 100644 --- a/mobile/android/base/resources/layout/awesomebar_folder_row.xml +++ b/mobile/android/base/resources/layout/awesomebar_folder_row.xml @@ -8,14 +8,14 @@ android:layout_height="@dimen/awesomebar_row_height" android:padding="6dip"> - + - + - + - + - + diff --git a/mobile/android/base/resources/layout/browser_toolbar.xml b/mobile/android/base/resources/layout/browser_toolbar.xml index 227547900610..84ccadc48c42 100644 --- a/mobile/android/base/resources/layout/browser_toolbar.xml +++ b/mobile/android/base/resources/layout/browser_toolbar.xml @@ -48,32 +48,32 @@ - + - + - + - + diff --git a/mobile/android/base/resources/layout/tabs_counter.xml b/mobile/android/base/resources/layout/tabs_counter.xml index 57ac244626bf..44b1b850cec2 100644 --- a/mobile/android/base/resources/layout/tabs_counter.xml +++ b/mobile/android/base/resources/layout/tabs_counter.xml @@ -3,15 +3,15 @@ - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - + diff --git a/mobile/android/base/resources/layout/tabs_item_cell.xml b/mobile/android/base/resources/layout/tabs_item_cell.xml index 090f2d051252..6bff41e19eec 100644 --- a/mobile/android/base/resources/layout/tabs_item_cell.xml +++ b/mobile/android/base/resources/layout/tabs_item_cell.xml @@ -3,17 +3,17 @@ - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - + - - + - + diff --git a/mobile/android/base/resources/layout/tabs_item_row.xml b/mobile/android/base/resources/layout/tabs_item_row.xml index 121e3e19a025..4dfa92c7c999 100644 --- a/mobile/android/base/resources/layout/tabs_item_row.xml +++ b/mobile/android/base/resources/layout/tabs_item_row.xml @@ -3,16 +3,16 @@ - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. --> - + - + @@ -50,4 +50,4 @@ android:contentDescription="@string/close_tab" android:src="@drawable/tab_close"/> - + diff --git a/mobile/android/base/resources/layout/tabs_panel_header.xml b/mobile/android/base/resources/layout/tabs_panel_header.xml index 36aff0cab5ad..2b3f3478913b 100644 --- a/mobile/android/base/resources/layout/tabs_panel_header.xml +++ b/mobile/android/base/resources/layout/tabs_panel_header.xml @@ -5,11 +5,11 @@ - +