зеркало из https://github.com/mozilla/gecko-dev.git
Backout 03ed6af51318, c65be44ac489, 0ce8da61c6cc, bcc015450e7a because of mochitest failures r=mfinkle a=mfinkle
This commit is contained in:
Родитель
7c49e9b41d
Коммит
1889190bef
|
@ -165,7 +165,7 @@ public class CrashReporter extends Activity
|
||||||
public void run() {
|
public void run() {
|
||||||
sendReport(mPendingMinidumpFile, mExtrasStringMap, mPendingExtrasFile);
|
sendReport(mPendingMinidumpFile, mExtrasStringMap, mPendingExtrasFile);
|
||||||
}
|
}
|
||||||
}, "CrashReporter Thread").start();
|
}).start();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onCloseClick(View v) { // bound via crash_reporter.xml
|
public void onCloseClick(View v) { // bound via crash_reporter.xml
|
||||||
|
|
|
@ -885,12 +885,11 @@ abstract public class GeckoApp
|
||||||
public void run() {
|
public void run() {
|
||||||
if (sMenu != null)
|
if (sMenu != null)
|
||||||
sMenu.findItem(R.id.preferences).setEnabled(true);
|
sMenu.findItem(R.id.preferences).setEnabled(true);
|
||||||
Looper.myQueue().addIdleHandler(new UpdateIdleHandler());
|
|
||||||
connectGeckoLayerClient();
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
setLaunchState(GeckoApp.LaunchState.GeckoRunning);
|
setLaunchState(GeckoApp.LaunchState.GeckoRunning);
|
||||||
GeckoAppShell.sendPendingEventsToGecko();
|
GeckoAppShell.sendPendingEventsToGecko();
|
||||||
|
connectGeckoLayerClient();
|
||||||
} else if (event.equals("ToggleChrome:Hide")) {
|
} else if (event.equals("ToggleChrome:Hide")) {
|
||||||
mMainHandler.post(new Runnable() {
|
mMainHandler.post(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
|
@ -1327,18 +1326,13 @@ abstract public class GeckoApp
|
||||||
* run experience, perhaps?
|
* run experience, perhaps?
|
||||||
*/
|
*/
|
||||||
mLayerController = new LayerController(this);
|
mLayerController = new LayerController(this);
|
||||||
if (mUserDefinedProfile != true &&
|
mPlaceholderLayerClient = mUserDefinedProfile ? null :
|
||||||
GeckoApp.mAppContext.mLastScreen != null) {
|
PlaceholderLayerClient.createInstance(this);
|
||||||
mPlaceholderLayerClient = PlaceholderLayerClient.createInstance(this);
|
|
||||||
if (mPlaceholderLayerClient != null) {
|
if (mPlaceholderLayerClient != null) {
|
||||||
mLayerController.setLayerClient(mPlaceholderLayerClient);
|
mLayerController.setLayerClient(mPlaceholderLayerClient);
|
||||||
|
}
|
||||||
|
|
||||||
mGeckoLayout.addView(mLayerController.getView(), 0);
|
mGeckoLayout.addView(mLayerController.getView(), 0);
|
||||||
if (mLastUri != null && mLastTitle != null) {
|
|
||||||
GeckoAppShell.sendEventToGecko(new GeckoEvent(mLastUri));
|
|
||||||
mBrowserToolbar.setTitle(mLastTitle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
mPluginContainer = (AbsoluteLayout) findViewById(R.id.plugin_container);
|
mPluginContainer = (AbsoluteLayout) findViewById(R.id.plugin_container);
|
||||||
|
@ -1407,6 +1401,31 @@ abstract public class GeckoApp
|
||||||
registerReceiver(mSmsReceiver, smsFilter);
|
registerReceiver(mSmsReceiver, smsFilter);
|
||||||
|
|
||||||
final GeckoApp self = this;
|
final GeckoApp self = this;
|
||||||
|
|
||||||
|
mMainHandler.postDelayed(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
|
||||||
|
Log.w(LOGTAG, "zerdatime " + new Date().getTime() + " - pre checkLaunchState");
|
||||||
|
|
||||||
|
/*
|
||||||
|
XXXX see bug 635342
|
||||||
|
We want to disable this code if possible. It is about 145ms in runtime
|
||||||
|
SharedPreferences settings = getPreferences(Activity.MODE_PRIVATE);
|
||||||
|
String localeCode = settings.getString(getPackageName() + ".locale", "");
|
||||||
|
if (localeCode != null && localeCode.length() > 0)
|
||||||
|
GeckoAppShell.setSelectedLocale(localeCode);
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (!checkLaunchState(LaunchState.Launched)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// it would be good only to do this if MOZ_UPDATER was defined
|
||||||
|
long startTime = new Date().getTime();
|
||||||
|
checkAndLaunchUpdate();
|
||||||
|
Log.w(LOGTAG, "checking for an update took " + (new Date().getTime() - startTime) + "ms");
|
||||||
|
}
|
||||||
|
}, 50);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void enableCameraView() {
|
public void enableCameraView() {
|
||||||
|
@ -1649,21 +1668,6 @@ abstract public class GeckoApp
|
||||||
GeckoAppShell.handleNotification(action, alertName, alertCookie);
|
GeckoAppShell.handleNotification(action, alertName, alertCookie);
|
||||||
}
|
}
|
||||||
|
|
||||||
// it would be good only to do this if MOZ_UPDATER was defined
|
|
||||||
private class UpdateIdleHandler implements MessageQueue.IdleHandler {
|
|
||||||
public boolean queueIdle() {
|
|
||||||
mMainHandler.post(new Runnable() {
|
|
||||||
public void run() {
|
|
||||||
long startTime = new Date().getTime();
|
|
||||||
checkAndLaunchUpdate();
|
|
||||||
Log.w(LOGTAG, "checking for an update took " + (new Date().getTime() - startTime) + "ms");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
// only need to run this once.
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void checkAndLaunchUpdate() {
|
private void checkAndLaunchUpdate() {
|
||||||
Log.i(LOGTAG, "Checking for an update");
|
Log.i(LOGTAG, "Checking for an update");
|
||||||
|
|
||||||
|
@ -2022,13 +2026,8 @@ abstract public class GeckoApp
|
||||||
|
|
||||||
|
|
||||||
private void connectGeckoLayerClient() {
|
private void connectGeckoLayerClient() {
|
||||||
if (mPlaceholderLayerClient != null) {
|
if (mPlaceholderLayerClient != null)
|
||||||
mPlaceholderLayerClient.destroy();
|
mPlaceholderLayerClient.destroy();
|
||||||
}
|
|
||||||
else {
|
|
||||||
// we didn't add a view before, add one now.
|
|
||||||
mGeckoLayout.addView(mLayerController.getView(), 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
LayerController layerController = getLayerController();
|
LayerController layerController = getLayerController();
|
||||||
layerController.setLayerClient(mSoftwareLayerClient);
|
layerController.setLayerClient(mSoftwareLayerClient);
|
||||||
|
@ -2048,7 +2047,7 @@ abstract public class GeckoApp
|
||||||
// we really don't care.
|
// we really don't care.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, "DNSPrefetcher Thread").start();
|
}).start();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -146,7 +146,6 @@ public class GeckoAppShell
|
||||||
new SynchronousQueue<Handler>();
|
new SynchronousQueue<Handler>();
|
||||||
|
|
||||||
public void run() {
|
public void run() {
|
||||||
setName("GeckoLooper Thread");
|
|
||||||
Looper.prepare();
|
Looper.prepare();
|
||||||
try {
|
try {
|
||||||
mHandlerQueue.put(new Handler());
|
mHandlerQueue.put(new Handler());
|
||||||
|
@ -438,11 +437,16 @@ public class GeckoAppShell
|
||||||
if (url != null)
|
if (url != null)
|
||||||
combinedArgs += " -remote " + url;
|
combinedArgs += " -remote " + url;
|
||||||
|
|
||||||
|
/* TODO: Is this complexity necessary? */
|
||||||
|
new Timer("Gecko Setup").schedule(new TimerTask() {
|
||||||
|
public void run() {
|
||||||
GeckoApp.mAppContext.runOnUiThread(new Runnable() {
|
GeckoApp.mAppContext.runOnUiThread(new Runnable() {
|
||||||
public void run() {
|
public void run() {
|
||||||
geckoLoaded();
|
geckoLoaded();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
}, 0);
|
||||||
|
|
||||||
// and go
|
// and go
|
||||||
GeckoAppShell.nativeRun(combinedArgs);
|
GeckoAppShell.nativeRun(combinedArgs);
|
||||||
|
|
|
@ -1009,7 +1009,7 @@ public class GeckoInputConnection
|
||||||
} catch (InterruptedException e) {}
|
} catch (InterruptedException e) {}
|
||||||
}
|
}
|
||||||
|
|
||||||
static private final Timer mIMETimer = new Timer("GeckoInputConnection Timer");
|
static private final Timer mIMETimer = new Timer();
|
||||||
|
|
||||||
static private final int NOTIFY_IME_RESETINPUTSTATE = 0;
|
static private final int NOTIFY_IME_RESETINPUTSTATE = 0;
|
||||||
static private final int NOTIFY_IME_SETOPENSTATE = 1;
|
static private final int NOTIFY_IME_SETOPENSTATE = 1;
|
||||||
|
|
|
@ -513,7 +513,7 @@ public class PanZoomController
|
||||||
stopAnimationTimer();
|
stopAnimationTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
mAnimationTimer = new Timer("Animation Timer");
|
mAnimationTimer = new Timer();
|
||||||
mAnimationTimer.scheduleAtFixedRate(new TimerTask() {
|
mAnimationTimer.scheduleAtFixedRate(new TimerTask() {
|
||||||
@Override
|
@Override
|
||||||
public void run() { mController.post(runnable); }
|
public void run() { mController.post(runnable); }
|
||||||
|
|
Загрузка…
Ссылка в новой задаче