예제 #1
0
 @Override
 public void finishNativeInitialization() {
   if (!mWebappInfo.isInitialized()) finish();
   super.finishNativeInitialization();
   initializeUI(getSavedInstanceState());
   mIsInitialized = true;
 }
예제 #2
0
  @Override
  protected void onNewIntent(Intent intent) {
    if (intent == null) return;
    super.onNewIntent(intent);

    WebappInfo newWebappInfo = WebappInfo.create(intent);
    if (newWebappInfo == null) {
      Log.e(TAG, "Failed to parse new Intent: " + intent);
      finish();
    } else if (!TextUtils.equals(mWebappInfo.id(), newWebappInfo.id())) {
      mWebappInfo.copy(newWebappInfo);
      resetSavedInstanceState();
      if (mIsInitialized) initializeUI(null);
    }
  }