зеркало из 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() {
|
||||
sendReport(mPendingMinidumpFile, mExtrasStringMap, mPendingExtrasFile);
|
||||
}
|
||||
}, "CrashReporter Thread").start();
|
||||
}).start();
|
||||
}
|
||||
|
||||
public void onCloseClick(View v) { // bound via crash_reporter.xml
|
||||
|
|
|
@ -885,12 +885,11 @@ abstract public class GeckoApp
|
|||
public void run() {
|
||||
if (sMenu != null)
|
||||
sMenu.findItem(R.id.preferences).setEnabled(true);
|
||||
Looper.myQueue().addIdleHandler(new UpdateIdleHandler());
|
||||
connectGeckoLayerClient();
|
||||
}
|
||||
});
|
||||
setLaunchState(GeckoApp.LaunchState.GeckoRunning);
|
||||
GeckoAppShell.sendPendingEventsToGecko();
|
||||
connectGeckoLayerClient();
|
||||
} else if (event.equals("ToggleChrome:Hide")) {
|
||||
mMainHandler.post(new Runnable() {
|
||||
public void run() {
|
||||
|
@ -1327,18 +1326,13 @@ abstract public class GeckoApp
|
|||
* run experience, perhaps?
|
||||
*/
|
||||
mLayerController = new LayerController(this);
|
||||
if (mUserDefinedProfile != true &&
|
||||
GeckoApp.mAppContext.mLastScreen != null) {
|
||||
mPlaceholderLayerClient = PlaceholderLayerClient.createInstance(this);
|
||||
mPlaceholderLayerClient = mUserDefinedProfile ? null :
|
||||
PlaceholderLayerClient.createInstance(this);
|
||||
if (mPlaceholderLayerClient != null) {
|
||||
mLayerController.setLayerClient(mPlaceholderLayerClient);
|
||||
}
|
||||
|
||||
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);
|
||||
|
@ -1407,6 +1401,31 @@ abstract public class GeckoApp
|
|||
registerReceiver(mSmsReceiver, smsFilter);
|
||||
|
||||
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() {
|
||||
|
@ -1649,21 +1668,6 @@ abstract public class GeckoApp
|
|||
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() {
|
||||
Log.i(LOGTAG, "Checking for an update");
|
||||
|
||||
|
@ -2022,13 +2026,8 @@ abstract public class GeckoApp
|
|||
|
||||
|
||||
private void connectGeckoLayerClient() {
|
||||
if (mPlaceholderLayerClient != null) {
|
||||
if (mPlaceholderLayerClient != null)
|
||||
mPlaceholderLayerClient.destroy();
|
||||
}
|
||||
else {
|
||||
// we didn't add a view before, add one now.
|
||||
mGeckoLayout.addView(mLayerController.getView(), 0);
|
||||
}
|
||||
|
||||
LayerController layerController = getLayerController();
|
||||
layerController.setLayerClient(mSoftwareLayerClient);
|
||||
|
@ -2048,7 +2047,7 @@ abstract public class GeckoApp
|
|||
// we really don't care.
|
||||
}
|
||||
}
|
||||
}, "DNSPrefetcher Thread").start();
|
||||
}).start();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -146,7 +146,6 @@ public class GeckoAppShell
|
|||
new SynchronousQueue<Handler>();
|
||||
|
||||
public void run() {
|
||||
setName("GeckoLooper Thread");
|
||||
Looper.prepare();
|
||||
try {
|
||||
mHandlerQueue.put(new Handler());
|
||||
|
@ -438,11 +437,16 @@ public class GeckoAppShell
|
|||
if (url != null)
|
||||
combinedArgs += " -remote " + url;
|
||||
|
||||
/* TODO: Is this complexity necessary? */
|
||||
new Timer("Gecko Setup").schedule(new TimerTask() {
|
||||
public void run() {
|
||||
GeckoApp.mAppContext.runOnUiThread(new Runnable() {
|
||||
public void run() {
|
||||
geckoLoaded();
|
||||
}
|
||||
});
|
||||
}
|
||||
}, 0);
|
||||
|
||||
// and go
|
||||
GeckoAppShell.nativeRun(combinedArgs);
|
||||
|
|
|
@ -1009,7 +1009,7 @@ public class GeckoInputConnection
|
|||
} 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_SETOPENSTATE = 1;
|
||||
|
|
|
@ -513,7 +513,7 @@ public class PanZoomController
|
|||
stopAnimationTimer();
|
||||
}
|
||||
|
||||
mAnimationTimer = new Timer("Animation Timer");
|
||||
mAnimationTimer = new Timer();
|
||||
mAnimationTimer.scheduleAtFixedRate(new TimerTask() {
|
||||
@Override
|
||||
public void run() { mController.post(runnable); }
|
||||
|
|
Загрузка…
Ссылка в новой задаче