Backed out changeset 5de4d20f6cfd (bug 880259) for intermittent Android reftest failures.

This commit is contained in:
Ryan VanderMeulen 2013-08-09 12:54:15 -04:00
parent bad3903f40
commit ad985381d5
4 changed files with 17 additions and 16 deletions

View File

@ -18,4 +18,4 @@
# Modifying this file will now automatically clobber the buildbot machines \o/
#
Bug 902908 renamed js/src/ion to js/src/jit and required a clobber
Add an WebIDL interface for bug 892978 requires a clobber for Windows.

View File

@ -31,9 +31,9 @@ public class GeckoView extends LayerView
public GeckoView(Context context, AttributeSet attrs) {
super(context, attrs);
TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.GeckoView);
String url = a.getString(R.styleable.GeckoView_url);
boolean doInit = a.getBoolean(R.styleable.GeckoView_doinit, true);
a.recycle();
if (url != null) {
@ -46,23 +46,27 @@ public class GeckoView extends LayerView
Tabs tabs = Tabs.getInstance();
tabs.attachToContext(context);
}
GeckoProfile profile = GeckoProfile.get(context);
BrowserDB.initialize(profile.getName());
GeckoAppShell.registerEventListener("Gecko:Ready", this);
ThreadUtils.setUiThread(Thread.currentThread(), new Handler());
initializeView(GeckoAppShell.getEventDispatcher());
if (!doInit)
return;
GeckoProfile profile = GeckoProfile.get(context);
BrowserDB.initialize(profile.getName());
if (GeckoThread.checkAndSetLaunchState(GeckoThread.LaunchState.Launching, GeckoThread.LaunchState.Launched)) {
GeckoAppShell.setLayerView(this);
GeckoThread.createAndStart();
}
}
@Override
public void onWindowFocusChanged(boolean hasFocus) {
super.onWindowFocusChanged(hasFocus);
if (hasFocus) {
setBackgroundDrawable(null);
}
}
public void loadUrl(String uri) {
Tabs.getInstance().loadUrl(uri);
}

View File

@ -6,13 +6,11 @@
<!-- This file is used to include shared UI components in different gecko app
layouts, such as gecko_app.xml and web_app.xml -->
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:gecko="http://schemas.android.com/apk/res-auto">
<merge xmlns:android="http://schemas.android.com/apk/res/android">
<org.mozilla.gecko.GeckoView android:id="@+id/layer_view"
gecko:doinit="false"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
<org.mozilla.gecko.gfx.LayerView android:id="@+id/layer_view"
android:layout_width="fill_parent"
android:layout_height="fill_parent"/>
<AbsoluteLayout android:id="@+id/plugin_container"
android:background="@android:color/transparent"

View File

@ -173,7 +173,6 @@
<declare-styleable name="GeckoView">
<attr name="url" format="string"/>
<attr name="doinit" format="boolean"/>
</declare-styleable>
</resources>