mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Backed out changeset a1d7b16101c7 (bug 1064669). r=mfinkle
This commit is contained in:
parent
486c123f0c
commit
9acc632ad9
@ -664,6 +664,16 @@ public class BrowserApp extends GeckoApp
|
||||
// Set the maximum bits-per-pixel the favicon system cares about.
|
||||
IconDirectoryEntry.setMaxBPP(GeckoAppShell.getScreenDepth());
|
||||
|
||||
Class<?> mediaManagerClass = getMediaPlayerManager();
|
||||
if (mediaManagerClass != null) {
|
||||
try {
|
||||
Method init = mediaManagerClass.getMethod("init", Context.class);
|
||||
init.invoke(null, this);
|
||||
} catch(Exception ex) {
|
||||
Log.e(LOGTAG, "Error initializing media manager", ex);
|
||||
}
|
||||
}
|
||||
|
||||
if (getProfile().inGuestMode()) {
|
||||
GuestSession.showNotification(this);
|
||||
} else {
|
||||
@ -1539,19 +1549,6 @@ public class BrowserApp extends GeckoApp
|
||||
}
|
||||
});
|
||||
|
||||
if (AppConstants.MOZ_MEDIA_PLAYER) {
|
||||
// If casting is disabled, these classes aren't built. We use reflection to initialize them.
|
||||
Class<?> mediaManagerClass = getMediaPlayerManager();
|
||||
if (mediaManagerClass != null) {
|
||||
try {
|
||||
Method init = mediaManagerClass.getMethod("init", Context.class);
|
||||
init.invoke(null, this);
|
||||
} catch(Exception ex) {
|
||||
Log.e(LOGTAG, "Error initializing media manager", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (AppConstants.MOZ_STUMBLER_BUILD_TIME_ENABLED) {
|
||||
// Start (this acts as ping if started already) the stumbler lib; if the stumbler has queued data it will upload it.
|
||||
// Stumbler operates on its own thread, and startup impact is further minimized by delaying work (such as upload) a few seconds.
|
||||
@ -1564,7 +1561,6 @@ public class BrowserApp extends GeckoApp
|
||||
}
|
||||
}, oneSecondInMillis);
|
||||
}
|
||||
|
||||
super.handleMessage(event, message);
|
||||
} else if (event.equals("Gecko:Ready")) {
|
||||
// Handle this message in GeckoApp, but also enable the Settings
|
||||
|
@ -191,7 +191,6 @@ public abstract class GeckoApp
|
||||
private Telemetry.Timer mGeckoReadyStartupTimer;
|
||||
|
||||
private String mPrivateBrowsingSession;
|
||||
private volatile boolean mIsPaused = true;
|
||||
|
||||
private volatile HealthRecorder mHealthRecorder;
|
||||
private volatile Locale mLastLocale;
|
||||
@ -247,13 +246,7 @@ public abstract class GeckoApp
|
||||
}
|
||||
|
||||
public void addAppStateListener(GeckoAppShell.AppStateListener listener) {
|
||||
ThreadUtils.assertOnUiThread();
|
||||
mAppStateListeners.add(listener);
|
||||
|
||||
// If we're already resumed, make sure the listener gets a notification.
|
||||
if (!mIsPaused) {
|
||||
listener.onResume();
|
||||
}
|
||||
}
|
||||
|
||||
public void removeAppStateListener(GeckoAppShell.AppStateListener listener) {
|
||||
@ -1892,8 +1885,6 @@ public abstract class GeckoApp
|
||||
listener.onResume();
|
||||
}
|
||||
}
|
||||
// Setting this state will force any listeners added after this to have their onResume() method called
|
||||
mIsPaused = false;
|
||||
|
||||
// We use two times: a pseudo-unique wall-clock time to identify the
|
||||
// current session across power cycles, and the elapsed realtime to
|
||||
@ -1970,9 +1961,6 @@ public abstract class GeckoApp
|
||||
}
|
||||
});
|
||||
|
||||
// Setting this state will keep any listeners registered after this from having their onResume
|
||||
// method called.
|
||||
mIsPaused = true;
|
||||
if (mAppStateListeners != null) {
|
||||
for(GeckoAppShell.AppStateListener listener: mAppStateListeners) {
|
||||
listener.onPause();
|
||||
|
Loading…
Reference in New Issue
Block a user