Java Code Examples for org.chromium.chrome.browser.ChromeApplication#reportStartupErrorAndExit()

The following examples show how to use org.chromium.chrome.browser.ChromeApplication#reportStartupErrorAndExit() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AsyncInitializationActivity.java    From delion with Apache License 2.0 5 votes vote down vote up
@Override
public final void onCreateWithNative() {
    try {
        ChromeBrowserInitializer.getInstance(this).handlePostNativeStartup(true, this);
    } catch (ProcessInitException e) {
        ChromeApplication.reportStartupErrorAndExit(e);
    }
}
 
Example 2
Source File: AccountsChangedReceiver.java    From delion with Apache License 2.0 5 votes vote down vote up
@SuppressFBWarnings("DM_EXIT")
private static void startBrowserIfNeededAndValidateAccounts(final Context context) {
    BrowserParts parts = new EmptyBrowserParts() {
        @Override
        public void finishNativeInitialization() {
            ThreadUtils.runOnUiThread(new Runnable() {
                @Override
                public void run() {
                    SigninHelper.get(context).validateAccountSettings(true);
                }
            });
        }

        @Override
        public void onStartupFailure() {
            // Startup failed. So notify SigninHelper of changed accounts via
            // shared prefs.
            SigninHelper.markAccountsChangedPref(context);
        }
    };
    try {
        ChromeBrowserInitializer.getInstance(context).handlePreNativeStartup(parts);
        ChromeBrowserInitializer.getInstance(context).handlePostNativeStartup(true, parts);
    } catch (ProcessInitException e) {
        Log.e(TAG, "Unable to load native library.", e);
        ChromeApplication.reportStartupErrorAndExit(e);
    }
}
 
Example 3
Source File: AsyncInitializationActivity.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
@Override
public final void onCreateWithNative() {
    try {
        ChromeBrowserInitializer.getInstance(this).handlePostNativeStartup(true, this);
    } catch (ProcessInitException e) {
        ChromeApplication.reportStartupErrorAndExit(e);
    }
}
 
Example 4
Source File: AccountsChangedReceiver.java    From AndroidChromium with Apache License 2.0 5 votes vote down vote up
@SuppressFBWarnings("DM_EXIT")
private static void startBrowserIfNeededAndValidateAccounts(final Context context) {
    BrowserParts parts = new EmptyBrowserParts() {
        @Override
        public void finishNativeInitialization() {
            ThreadUtils.runOnUiThread(new Runnable() {
                @Override
                public void run() {
                    SigninHelper.get(context).validateAccountSettings(true);
                }
            });
        }

        @Override
        public void onStartupFailure() {
            // Startup failed. So notify SigninHelper of changed accounts via
            // shared prefs.
            SigninHelper.markAccountsChangedPref(context);
        }
    };
    try {
        ChromeBrowserInitializer.getInstance(context).handlePreNativeStartup(parts);
        ChromeBrowserInitializer.getInstance(context).handlePostNativeStartup(true, parts);
    } catch (ProcessInitException e) {
        Log.e(TAG, "Unable to load native library.", e);
        ChromeApplication.reportStartupErrorAndExit(e);
    }
}
 
Example 5
Source File: AsyncInitializationActivity.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@Override
public final void onCreateWithNative() {
    try {
        ChromeBrowserInitializer.getInstance(this).handlePostNativeStartup(true, this);
    } catch (ProcessInitException e) {
        ChromeApplication.reportStartupErrorAndExit(e);
    }
}
 
Example 6
Source File: AccountsChangedReceiver.java    From 365browser with Apache License 2.0 5 votes vote down vote up
@SuppressFBWarnings("DM_EXIT")
private static void startBrowserIfNeededAndValidateAccounts(final Context context) {
    BrowserParts parts = new EmptyBrowserParts() {
        @Override
        public void finishNativeInitialization() {
            ThreadUtils.runOnUiThread(new Runnable() {
                @Override
                public void run() {
                    SigninHelper.get(context).validateAccountSettings(true);
                }
            });
        }

        @Override
        public void onStartupFailure() {
            // Startup failed. So notify SigninHelper of changed accounts via
            // shared prefs.
            SigninHelper.markAccountsChangedPref(context);
        }
    };
    try {
        ChromeBrowserInitializer.getInstance(context).handlePreNativeStartup(parts);
        ChromeBrowserInitializer.getInstance(context).handlePostNativeStartup(true, parts);
    } catch (ProcessInitException e) {
        Log.e(TAG, "Unable to load native library.", e);
        ChromeApplication.reportStartupErrorAndExit(e);
    }
}
 
Example 7
Source File: AsyncInitializationActivity.java    From delion with Apache License 2.0 4 votes vote down vote up
@Override
public void onStartupFailure() {
    ProcessInitException e =
            new ProcessInitException(LoaderErrors.LOADER_ERROR_NATIVE_STARTUP_FAILED);
    ChromeApplication.reportStartupErrorAndExit(e);
}
 
Example 8
Source File: AsyncInitializationActivity.java    From AndroidChromium with Apache License 2.0 4 votes vote down vote up
@Override
public void onStartupFailure() {
    ProcessInitException e =
            new ProcessInitException(LoaderErrors.LOADER_ERROR_NATIVE_STARTUP_FAILED);
    ChromeApplication.reportStartupErrorAndExit(e);
}
 
Example 9
Source File: AsyncInitializationActivity.java    From 365browser with Apache License 2.0 4 votes vote down vote up
@Override
public void onStartupFailure() {
    ProcessInitException e =
            new ProcessInitException(LoaderErrors.LOADER_ERROR_NATIVE_STARTUP_FAILED);
    ChromeApplication.reportStartupErrorAndExit(e);
}