mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Back out 2d8822b9c0b5 and 56a268d63e01 (bug 708812) for Android ts red
This commit is contained in:
parent
95c3e37053
commit
46daae9502
@ -78,7 +78,6 @@ public class AboutHomeContent extends ScrollView
|
||||
private BrowserApp mActivity;
|
||||
private Cursor mCursor;
|
||||
UriLoadCallback mUriLoadCallback = null;
|
||||
VoidCallback mLoadCompleteCallback = null;
|
||||
private LayoutInflater mInflater;
|
||||
|
||||
private AccountManager mAccountManager;
|
||||
@ -100,10 +99,6 @@ public class AboutHomeContent extends ScrollView
|
||||
public void callback(String uriSpec);
|
||||
}
|
||||
|
||||
public interface VoidCallback {
|
||||
public void callback();
|
||||
}
|
||||
|
||||
public AboutHomeContent(Context context) {
|
||||
super(context);
|
||||
mContext = context;
|
||||
@ -289,12 +284,6 @@ public class AboutHomeContent extends ScrollView
|
||||
// Free the old Cursor in the right thread now.
|
||||
if (oldCursor != null && !oldCursor.isClosed())
|
||||
oldCursor.close();
|
||||
|
||||
// Even if AboutHome isn't necessarily entirely loaded if we
|
||||
// get here, for phones this is the part the user initially sees,
|
||||
// so it's the one we will care about for now.
|
||||
if (mLoadCompleteCallback != null)
|
||||
mLoadCompleteCallback.callback();
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -321,10 +310,6 @@ public class AboutHomeContent extends ScrollView
|
||||
mUriLoadCallback = uriLoadCallback;
|
||||
}
|
||||
|
||||
public void setLoadCompleteCallback(VoidCallback callback) {
|
||||
mLoadCompleteCallback = callback;
|
||||
}
|
||||
|
||||
public void onActivityContentChanged() {
|
||||
update(EnumSet.of(UpdateFlags.TOP_SITES));
|
||||
}
|
||||
|
@ -639,16 +639,12 @@ abstract public class BrowserApp extends GeckoApp
|
||||
loadUrl(url, AwesomeBar.Target.CURRENT_TAB);
|
||||
}
|
||||
});
|
||||
mAboutHomeContent.setLoadCompleteCallback(new AboutHomeContent.VoidCallback() {
|
||||
public void callback() {
|
||||
mAboutHomeStartupTimer.stop();
|
||||
}
|
||||
});
|
||||
mAboutHomeContent.setOnInterceptTouchListener(new ContentTouchListener());
|
||||
} else {
|
||||
mAboutHomeContent.update(EnumSet.of(AboutHomeContent.UpdateFlags.TOP_SITES,
|
||||
AboutHomeContent.UpdateFlags.REMOTE_TABS));
|
||||
}
|
||||
|
||||
mAboutHomeContent.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
findViewById(R.id.abouthome_content).setVisibility(View.GONE);
|
||||
|
@ -124,13 +124,6 @@ abstract public class GeckoApp
|
||||
NEW_PROFILE
|
||||
}
|
||||
|
||||
private static enum StartupAction {
|
||||
NORMAL, /* normal application start */
|
||||
URL, /* launched with a passed URL */
|
||||
PREFETCH, /* launched with a passed URL that we prefetch */
|
||||
REDIRECTOR /* launched with a passed URL in our redirect list */
|
||||
}
|
||||
|
||||
public static final String ACTION_ALERT_CLICK = "org.mozilla.gecko.ACTION_ALERT_CLICK";
|
||||
public static final String ACTION_ALERT_CLEAR = "org.mozilla.gecko.ACTION_ALERT_CLEAR";
|
||||
public static final String ACTION_ALERT_CALLBACK = "org.mozilla.gecko.ACTION_ALERT_CALLBACK";
|
||||
@ -183,9 +176,6 @@ abstract public class GeckoApp
|
||||
|
||||
protected int mRestoreMode = GeckoAppShell.RESTORE_NONE;
|
||||
protected boolean mInitialized = false;
|
||||
protected Telemetry.Timer mAboutHomeStartupTimer;
|
||||
private Telemetry.Timer mJavaUiStartupTimer;
|
||||
private Telemetry.Timer mGeckoReadyStartupTimer;
|
||||
|
||||
public enum LaunchState {Launching, WaitForDebugger,
|
||||
Launched, GeckoRunning, GeckoExiting};
|
||||
@ -980,7 +970,6 @@ abstract public class GeckoApp
|
||||
final int tabId = message.getInt("tabID");
|
||||
handlePageShow(tabId);
|
||||
} else if (event.equals("Gecko:Ready")) {
|
||||
mGeckoReadyStartupTimer.stop();
|
||||
sIsGeckoReady = true;
|
||||
setLaunchState(GeckoApp.LaunchState.GeckoRunning);
|
||||
GeckoAppShell.sendPendingEventsToGecko();
|
||||
@ -1450,14 +1439,8 @@ abstract public class GeckoApp
|
||||
@Override
|
||||
public void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
GeckoAppShell.registerGlobalExceptionHandler();
|
||||
|
||||
// The clock starts...now. Better hurry!
|
||||
mJavaUiStartupTimer = new Telemetry.Timer("FENNEC_STARTUP_TIME_JAVACHROME");
|
||||
mAboutHomeStartupTimer = new Telemetry.Timer("FENNEC_STARTUP_TIME_ABOUTHOME");
|
||||
mGeckoReadyStartupTimer = new Telemetry.Timer("FENNEC_STARTUP_TIME_GECKOREADY");
|
||||
|
||||
((GeckoApplication)getApplication()).initialize();
|
||||
GeckoAppShell.registerGlobalExceptionHandler();
|
||||
|
||||
mAppContext = this;
|
||||
Tabs.getInstance().attachToActivity(this);
|
||||
@ -1595,13 +1578,6 @@ abstract public class GeckoApp
|
||||
boolean isExternalURL = passedUri != null && !passedUri.equals("about:home");
|
||||
initializeChrome(uri, isExternalURL);
|
||||
|
||||
StartupAction startupAction;
|
||||
if (isExternalURL) {
|
||||
startupAction = StartupAction.URL;
|
||||
} else {
|
||||
startupAction = StartupAction.NORMAL;
|
||||
}
|
||||
|
||||
// Start migrating as early as possible, can do this in
|
||||
// parallel with Gecko load.
|
||||
checkMigrateProfile();
|
||||
@ -1611,7 +1587,6 @@ abstract public class GeckoApp
|
||||
Intent copy = new Intent(intent);
|
||||
copy.setAction(ACTION_LOAD);
|
||||
if (isHostOnRedirectWhitelist(data.getHost())) {
|
||||
startupAction = StartupAction.REDIRECTOR;
|
||||
GeckoAppShell.getHandler().post(new RedirectorRunnable(copy));
|
||||
// We're going to handle this uri with the redirector, so setting
|
||||
// the action to MAIN and clearing the uri data prevents us from
|
||||
@ -1620,13 +1595,10 @@ abstract public class GeckoApp
|
||||
intent.setData(null);
|
||||
passedUri = "about:empty";
|
||||
} else {
|
||||
startupAction = StartupAction.PREFETCH;
|
||||
GeckoAppShell.getHandler().post(new PrefetchRunnable(copy));
|
||||
}
|
||||
}
|
||||
|
||||
Telemetry.HistogramAdd("FENNEC_STARTUP_GECKOAPP_ACTION", startupAction.ordinal());
|
||||
|
||||
if (!mIsRestoringActivity) {
|
||||
sGeckoThread = new GeckoThread(intent, passedUri, mRestoreMode);
|
||||
}
|
||||
@ -1718,9 +1690,6 @@ abstract public class GeckoApp
|
||||
|
||||
final GeckoApp self = this;
|
||||
|
||||
// End of the startup of our Java App
|
||||
mJavaUiStartupTimer.stop();
|
||||
|
||||
GeckoAppShell.getHandler().postDelayed(new Runnable() {
|
||||
public void run() {
|
||||
Log.w(LOGTAG, "zerdatime " + SystemClock.uptimeMillis() + " - pre checkLaunchState");
|
||||
|
@ -37,22 +37,13 @@ public class Telemetry {
|
||||
public static class Timer {
|
||||
private long mStartTime;
|
||||
private String mName;
|
||||
private boolean mHasFinished;
|
||||
|
||||
public Timer(String name) {
|
||||
mName = name;
|
||||
mStartTime = SystemClock.uptimeMillis();
|
||||
mHasFinished = false;
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
// Only the first stop counts.
|
||||
if (mHasFinished) {
|
||||
return;
|
||||
} else {
|
||||
mHasFinished = true;
|
||||
}
|
||||
|
||||
long elapsed = SystemClock.uptimeMillis() - mStartTime;
|
||||
if (elapsed < Integer.MAX_VALUE) {
|
||||
HistogramAdd(mName, (int)(elapsed));
|
||||
|
@ -26,6 +26,14 @@
|
||||
"n_buckets": 50,
|
||||
"description": "time spent updating accessibility (ms)"
|
||||
},
|
||||
"FENNEC_AWESOMEBAR_ALLPAGES_EMPTY_TIME": {
|
||||
"kind": "exponential",
|
||||
"low": 10,
|
||||
"high": "20000",
|
||||
"n_buckets": 20,
|
||||
"description": "Fennec: Time for the Awesomebar Top Sites query to return with no filter set (ms)",
|
||||
"cpp_guard": "ANDROID"
|
||||
},
|
||||
"CYCLE_COLLECTOR": {
|
||||
"kind": "exponential",
|
||||
"high": "10000",
|
||||
@ -2235,44 +2243,6 @@
|
||||
"description": "Number of history entries in the original XUL places database",
|
||||
"cpp_guard": "ANDROID"
|
||||
},
|
||||
"FENNEC_AWESOMEBAR_ALLPAGES_EMPTY_TIME": {
|
||||
"kind": "exponential",
|
||||
"low": 10,
|
||||
"high": "20000",
|
||||
"n_buckets": 20,
|
||||
"description": "Fennec: Time for the Awesomebar Top Sites query to return with no filter set (ms)",
|
||||
"cpp_guard": "ANDROID"
|
||||
},
|
||||
"FENNEC_STARTUP_TIME_JAVAUI": {
|
||||
"kind": "exponential",
|
||||
"low": 100,
|
||||
"high": "5000",
|
||||
"n_buckets": 20,
|
||||
"description": "Time for the Java UI to load (ms)",
|
||||
"cpp_guard": "ANDROID"
|
||||
},
|
||||
"FENNEC_STARTUP_TIME_ABOUTHOME": {
|
||||
"kind": "exponential",
|
||||
"low": 100,
|
||||
"high": "10000",
|
||||
"n_buckets": 20,
|
||||
"description": "Time for the about:home page to be displayed (ms)",
|
||||
"cpp_guard": "ANDROID"
|
||||
},
|
||||
"FENNEC_STARTUP_TIME_GECKOREADY": {
|
||||
"kind": "exponential",
|
||||
"low": 500,
|
||||
"high": "20000",
|
||||
"n_buckets": 20,
|
||||
"description": "Time for the Gecko:Ready message to arrive (ms)",
|
||||
"cpp_guard": "ANDROID"
|
||||
},
|
||||
"FENNEC_STARTUP_GECKOAPP_ACTION": {
|
||||
"kind": "enumerated",
|
||||
"n_values": 4,
|
||||
"description": "The way the GeckoApp was launched. (Normal, URL, Prefetch, Redirector)",
|
||||
"cpp_guard": "ANDROID"
|
||||
},
|
||||
"OUT_OF_MEMORY_KILLED": {
|
||||
"kind": "flag",
|
||||
"description": "Killed due to an OOM condition",
|
||||
|
Loading…
Reference in New Issue
Block a user