Пример #1
0
  @Override
  public void onViewCreated(View view, Bundle savedInstanceState) {
    super.onViewCreated(view, savedInstanceState);

    // Restore whatever the UI mode the fragment had before
    // a device rotation.
    if (mUIMode != null) {
      setUIMode(mUIMode);
    }

    mPanelAuthCache.setOnChangeListener(new PanelAuthChangeListener());
    GeckoAppShell.registerEventListener("HomePanels:RefreshDataset", this);
  }
Пример #2
0
  @Override
  public void onDestroyView() {
    super.onDestroyView();
    mView = null;
    mPanelLayout = null;
    mPanelAuthLayout = null;

    mPanelAuthCache.setOnChangeListener(null);
    GeckoAppShell.unregisterEventListener("HomePanels:RefreshDataset", this);

    if (mAuthStateTask != null) {
      mAuthStateTask.cancel(true);
      mAuthStateTask = null;
    }
  }