mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backout changeset d945ae198516 (bug 760152). r=kats
This commit is contained in:
parent
2b0f26004e
commit
19ddb6ee61
@ -1514,12 +1514,7 @@ abstract public class GeckoApp
|
||||
}
|
||||
|
||||
GeckoAppShell.loadMozGlue();
|
||||
if (sGeckoThread == null) {
|
||||
sGeckoThread = new GeckoThread();
|
||||
String uri = getURIFromIntent(getIntent());
|
||||
if (uri != null && uri.length() > 0 && !uri.equals("about:home"))
|
||||
sGeckoThread.start();
|
||||
} else {
|
||||
if (sGeckoThread != null) {
|
||||
// this happens when the GeckoApp activity is destroyed by android
|
||||
// without killing the entire application (see bug 769269)
|
||||
mIsRestoringActivity = true;
|
||||
@ -1627,17 +1622,19 @@ abstract public class GeckoApp
|
||||
passedUri = "about:empty";
|
||||
}
|
||||
|
||||
sGeckoThread.init(intent, passedUri, mRestoreMode);
|
||||
if (!mIsRestoringActivity) {
|
||||
sGeckoThread = new GeckoThread(intent, passedUri, mRestoreMode);
|
||||
}
|
||||
if (!ACTION_DEBUG.equals(action) &&
|
||||
checkAndSetLaunchState(LaunchState.Launching, LaunchState.Launched)) {
|
||||
sGeckoThread.reallyStart();
|
||||
sGeckoThread.start();
|
||||
} else if (ACTION_DEBUG.equals(action) &&
|
||||
checkAndSetLaunchState(LaunchState.Launching, LaunchState.WaitForDebugger)) {
|
||||
mMainHandler.postDelayed(new Runnable() {
|
||||
public void run() {
|
||||
Log.i(LOGTAG, "Launching from debug intent after 5s wait");
|
||||
setLaunchState(LaunchState.Launching);
|
||||
sGeckoThread.reallyStart();
|
||||
sGeckoThread.start();
|
||||
}
|
||||
}, 1000 * 5 /* 5 seconds */);
|
||||
Log.i(LOGTAG, "Intent : ACTION_DEBUG - waiting 5s before launching");
|
||||
|
@ -14,7 +14,6 @@ import android.os.SystemClock;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
||||
public class GeckoThread extends Thread {
|
||||
private static final String LOGTAG = "GeckoThread";
|
||||
@ -22,23 +21,12 @@ public class GeckoThread extends Thread {
|
||||
Intent mIntent;
|
||||
String mUri;
|
||||
int mRestoreMode;
|
||||
CountDownLatch mStartSignal;
|
||||
|
||||
GeckoThread() {
|
||||
mStartSignal = new CountDownLatch(1);
|
||||
setName("Gecko");
|
||||
}
|
||||
|
||||
public void init(Intent intent, String uri, int restoreMode) {
|
||||
GeckoThread(Intent intent, String uri, int restoreMode) {
|
||||
mIntent = intent;
|
||||
mUri = uri;
|
||||
mRestoreMode = restoreMode;
|
||||
}
|
||||
|
||||
public void reallyStart() {
|
||||
mStartSignal.countDown();
|
||||
if (getState() == Thread.State.NEW)
|
||||
start();
|
||||
setName("Gecko");
|
||||
}
|
||||
|
||||
public void run() {
|
||||
@ -65,11 +53,6 @@ public class GeckoThread extends Thread {
|
||||
GeckoAppShell.loadGeckoLibs(resourcePath);
|
||||
|
||||
Locale.setDefault(locale);
|
||||
|
||||
try {
|
||||
mStartSignal.await();
|
||||
} catch (Exception e) { }
|
||||
|
||||
Resources res = app.getBaseContext().getResources();
|
||||
Configuration config = res.getConfiguration();
|
||||
config.locale = locale;
|
||||
|
Loading…
Reference in New Issue
Block a user