mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-11 20:35:50 +00:00
Bug 1370915 - Reorganize compatibility checks in BrowserApp and GeckoApp to avoid attempting to load mozglue on unsupported hardware. r=jchen
This commit is contained in:
parent
09426b3bf3
commit
aa335d6514
@ -621,8 +621,13 @@ public class BrowserApp extends GeckoApp
|
||||
final Context appContext = getApplicationContext();
|
||||
|
||||
showSplashScreen = true;
|
||||
GeckoLoader.loadMozGlue(appContext);
|
||||
if (!HardwareUtils.isSupportedSystem() || !GeckoLoader.neonCompatible()) {
|
||||
|
||||
boolean supported = HardwareUtils.isSupportedSystem();
|
||||
if (supported) {
|
||||
GeckoLoader.loadMozGlue(appContext);
|
||||
supported = GeckoLoader.neonCompatible();
|
||||
}
|
||||
if (!supported) {
|
||||
// This build does not support the Android version of the device; Exit early.
|
||||
super.onCreate(savedInstanceState);
|
||||
return;
|
||||
|
@ -914,11 +914,12 @@ public abstract class GeckoApp extends GeckoActivity
|
||||
enableStrictMode();
|
||||
}
|
||||
|
||||
// Mozglue should already be loaded by BrowserApp.onCreate() in Fennec, but in
|
||||
// custom tabs it may not be.
|
||||
GeckoLoader.loadMozGlue(getApplicationContext());
|
||||
|
||||
if (!HardwareUtils.isSupportedSystem() || !GeckoLoader.neonCompatible()) {
|
||||
boolean supported = HardwareUtils.isSupportedSystem();
|
||||
if (supported) {
|
||||
GeckoLoader.loadMozGlue(getApplicationContext());
|
||||
supported = GeckoLoader.neonCompatible();
|
||||
}
|
||||
if (!supported) {
|
||||
// This build does not support the Android version of the device: Show an error and finish the app.
|
||||
mIsAbortingAppLaunch = true;
|
||||
super.onCreate(savedInstanceState);
|
||||
|
Loading…
Reference in New Issue
Block a user