Upstream version 10.38.217.0
[platform/framework/web/crosswalk.git] / src / xwalk / app / android / runtime_activity / src / org / xwalk / app / XWalkRuntimeActivityBase.java
index 117427e..245b1b6 100644 (file)
@@ -13,6 +13,7 @@ import android.content.Intent;
 import android.content.IntentFilter;
 import android.net.Uri;
 import android.os.Bundle;
+import android.util.Log;
 import android.view.View;
 
 import org.xwalk.app.runtime.extension.XWalkRuntimeExtensionManager;
@@ -25,6 +26,8 @@ public abstract class XWalkRuntimeActivityBase extends Activity {
 
     private static final String DEFAULT_LIBRARY_APK_URL = null;
 
+    private static final String TAG = "XWalkRuntimeActivityBase";
+
     private XWalkRuntimeView mRuntimeView;
 
     private boolean mShownNotFoundDialog = false;
@@ -140,9 +143,9 @@ public abstract class XWalkRuntimeActivityBase extends Activity {
             } else {
                 XWalkPreferences.setValue(XWalkPreferences.ANIMATABLE_XWALK_VIEW, false);
             }
-            mRuntimeView = new XWalkRuntimeView(this, this, null);
             mShownNotFoundDialog = false;
             if (mLibraryNotFoundDialog != null) mLibraryNotFoundDialog.cancel();
+            mRuntimeView = new XWalkRuntimeView(this, this, null);
             if (mRemoteDebugging) {
                 XWalkPreferences.setValue(XWalkPreferences.REMOTE_DEBUGGING, true);
             } else {
@@ -171,13 +174,14 @@ public abstract class XWalkRuntimeActivityBase extends Activity {
             handleException(e.getCause());
             return;
         }
-        throw new RuntimeException(e);
+        Log.e(TAG, Log.getStackTraceString(e));
     }
 
     private void showRuntimeLibraryExceptionDialog(String title, String message) {
         if (!mShownNotFoundDialog) {
+            if (SharedXWalkView.isUsingLibrary()) return;
             AlertDialog.Builder builder = new AlertDialog.Builder(this);
-            if (!SharedXWalkView.usesLibraryOutOfPackage()) {
+            if (SharedXWalkView.containsLibrary()) {
                 builder.setPositiveButton(android.R.string.ok,
                         new DialogInterface.OnClickListener() {
                             public void onClick(DialogInterface dialog, int id) {