Backed out changeset 7957f2f39615
authorDoug Turner <dougt@dougt.org>
Sat, 17 Dec 2011 22:39:08 -0800
changeset 84507 a5e63e00db276489777e1a052979360de2abf087
parent 84506 7957f2f396159230fb1aa5372476de9fbf5ed185
child 84508 d89f3d80d3ecb62e7d35e7f60693168ff80cd57b
push id519
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 00:38:35 +0000
treeherdermozilla-beta@788ea1ef610b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
milestone11.0a1
backs out7957f2f396159230fb1aa5372476de9fbf5ed185
first release with
nightly linux32
a5e63e00db27 / 11.0a1 / 20111218031140 / files
nightly linux64
a5e63e00db27 / 11.0a1 / 20111218031140 / files
nightly mac
a5e63e00db27 / 11.0a1 / 20111218031140 / files
nightly win32
a5e63e00db27 / 11.0a1 / 20111218031140 / files
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
releases
nightly linux32
nightly linux64
nightly mac
nightly win32
Backed out changeset 7957f2f39615
mobile/android/base/AboutHomeContent.java
mobile/android/base/GeckoApp.java
mobile/android/base/resources/layout/gecko_app.xml
--- a/mobile/android/base/AboutHomeContent.java
+++ b/mobile/android/base/AboutHomeContent.java
@@ -57,17 +57,16 @@ import android.content.Context;
 import android.content.res.Configuration;
 import android.database.Cursor;
 import android.graphics.Bitmap;
 import android.graphics.BitmapFactory;
 import android.text.SpannableString;
 import android.text.style.UnderlineSpan;
 import android.util.AttributeSet;
 import android.util.Log;
-import android.view.LayoutInflater;
 import android.view.View;
 import android.widget.AdapterView;
 import android.widget.ArrayAdapter;
 import android.widget.GridView;
 import android.widget.ImageView;
 import android.widget.ListView;
 import android.widget.ScrollView;
 import android.widget.SimpleCursorAdapter;
@@ -157,20 +156,16 @@ public class AboutHomeContent extends Sc
         Configuration config = getContext().getResources().getConfiguration();
         if (config.orientation == Configuration.ORIENTATION_LANDSCAPE)
             return NUMBER_OF_COLS_LANDSCAPE;
         else
             return NUMBER_OF_COLS_PORTRAIT;
     }
 
     void init(final Activity activity) {
-        LayoutInflater inflater =
-            (LayoutInflater) activity.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-        
-        inflater.inflate(R.layout.abouthome_content, this);
         GeckoAppShell.getHandler().post(new Runnable() {
             public void run() {
                 if (mCursor != null)
                     activity.stopManagingCursor(mCursor);
 
                 ContentResolver resolver = GeckoApp.mAppContext.getContentResolver();
                 mCursor = BrowserDB.filter(resolver, "", NUMBER_OF_TOP_SITES_PORTRAIT);
                 activity.startManagingCursor(mCursor);
--- a/mobile/android/base/GeckoApp.java
+++ b/mobile/android/base/GeckoApp.java
@@ -995,29 +995,27 @@ abstract public class GeckoApp
     public class AboutHomeRunnable implements Runnable {
         boolean mShow;
         AboutHomeRunnable(boolean show) {
             mShow = show;
         }
 
         public void run() {
             mAutoCompletePopup.hide();
-            if (mAboutHomeContent == null && mShow) {
-                mAboutHomeContent = new AboutHomeContent(GeckoApp.mAppContext, null);
+            if (mAboutHomeContent == null) {
+                mAboutHomeContent = (AboutHomeContent) findViewById(R.id.abouthome_content);
                 mAboutHomeContent.init(GeckoApp.mAppContext);
                 mAboutHomeContent.setUriLoadCallback(new AboutHomeContent.UriLoadCallback() {
                     public void callback(String url) {
                         mBrowserToolbar.setProgressVisibility(true);
                         loadUrl(url, AwesomeBar.Type.EDIT);
                     }
                 });
-                mGeckoLayout.addView(mAboutHomeContent);
             }
-            if (mAboutHomeContent != null)
-                mAboutHomeContent.setVisibility(mShow ? View.VISIBLE : View.GONE);
+            mAboutHomeContent.setVisibility(mShow ? View.VISIBLE : View.GONE);
         }
     }
 
     void updateAgentModeMenuItem(final Tab tab, final Tab.AgentMode agentMode) {
         if (sMenu == null)
             return;
 
         mMainHandler.post(new Runnable() {
--- a/mobile/android/base/resources/layout/gecko_app.xml
+++ b/mobile/android/base/resources/layout/gecko_app.xml
@@ -15,16 +15,28 @@
                     android:layout_height="fill_parent"
                     android:layout_weight="1">
 
         <AbsoluteLayout android:id="@+id/plugin_container"
                         android:background="@android:color/transparent"
                         android:layout_width="fill_parent"
                         android:layout_height="fill_parent"/>
 
+        <org.mozilla.gecko.AboutHomeContent android:id="@+id/abouthome_content"
+                                            android:orientation="vertical"
+                                            android:layout_width="fill_parent"
+                                            android:layout_height="fill_parent"
+                                            android:background="#ffffff"
+                                            android:isScrollContainer="true"
+                                            android:visibility="gone">
+
+            <include layout="@layout/abouthome_content"/>
+
+        </org.mozilla.gecko.AboutHomeContent>
+
         <org.mozilla.gecko.AutoCompletePopup android:id="@+id/autocomplete_popup"
                                              style="@android:style/Widget.ListView.White"
                                              android:layout_width="fill_parent"
                                              android:layout_height="100dip"
                                              android:background="@drawable/autocomplete_list_bg"
                                              android:cacheColorHint="#ffffff"
                                              android:listSelector="@android:drawable/list_selector_background"
                                              android:visibility="gone"/>