OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 package org.chromium.chrome.browser.enhancedbookmarks; |
| 6 |
| 7 import android.os.Bundle; |
| 8 import android.support.v7.app.AppCompatActivity; |
| 9 import android.util.Log; |
| 10 |
| 11 import org.chromium.base.library_loader.ProcessInitException; |
| 12 import org.chromium.chrome.browser.ChromiumApplication; |
| 13 |
| 14 /** |
| 15 * Activity base class that all the EnhnacedBookmark activities inherit. Current
ly it's responsible |
| 16 * for ensuring native library initialization. |
| 17 */ |
| 18 abstract class EnhancedBookmarkActivityBase extends AppCompatActivity { |
| 19 private static final String TAG = "EnhancedBookmarkActivityBase"; |
| 20 |
| 21 @Override |
| 22 protected void onCreate(Bundle savedInstanceState) { |
| 23 super.onCreate(savedInstanceState); |
| 24 // Ensure that native library is loaded. |
| 25 try { |
| 26 ((ChromiumApplication) getApplication()) |
| 27 .startBrowserProcessesAndLoadLibrariesSync(this, true); |
| 28 } catch (ProcessInitException e) { |
| 29 Log.e(TAG, "Failed to start browser process.", e); |
| 30 ChromiumApplication.reportStartupErrorAndExit(e); |
| 31 } |
| 32 } |
| 33 } |
OLD | NEW |