コード例 #1
0
  @Override
  public void preInflationStartup() {
    WebappInfo info = WebappInfo.create(getIntent());
    if (info != null) mWebappInfo.copy(info);

    updateTaskDescription();

    mCleanupTask =
        new WebappDirectoryManager(
            getActivityDirectory(), WEBAPP_SCHEME, FeatureUtilities.isDocumentModeEligible(this));

    ScreenOrientationProvider.lockOrientation((byte) mWebappInfo.orientation(), this);
    super.preInflationStartup();
  }
コード例 #2
0
  private void initializeUI(Bundle savedInstanceState) {
    // We do not load URL when restoring from saved instance states.
    if (savedInstanceState == null && mWebappInfo.isInitialized()) {
      if (TextUtils.isEmpty(getActivityTab().getUrl())) {
        getActivityTab()
            .loadUrl(new LoadUrlParams(mWebappInfo.uri().toString(), PageTransition.AUTO_TOPLEVEL));
      }
    } else {
      if (NetworkChangeNotifier.isOnline()) getActivityTab().reloadIgnoringCache();
    }

    mWebContentsObserver = createWebContentsObserver();
    getActivityTab().addObserver(createTabObserver());
    getActivityTab()
        .getChromeWebContentsDelegateAndroid()
        .setDisplayMode((int) WebDisplayMode.Standalone);
    updateTaskDescription();
  }