@Override
  protected void onDestroy() {
    super.onDestroy();

    if (progressDialog != null) progressDialog.dismiss();

    if (completeReceiver != null) unregisterReceiver(completeReceiver);
  }
Esempio n. 2
0
  /** Called when the activity is closed. */
  @Override
  public void onDestroy() {

    if (adView != null) adView.destroy();

    if (ssidReceiver != null) unregisterReceiver(ssidReceiver);

    super.onDestroy();
  }
  @Override
  protected void onDestroy() {
    SharedPreferences settings = Application.getPrefs();
    boolean currentValue =
        settings.getBoolean(getString(R.string.preference_key_auto_select_region), true);

    // If the use has selected to auto-select region, and the previous state of the setting was
    // false,
    // then run the auto-select by going to HomeActivity
    if (currentValue && !autoSelectInitialValue) {
      if (BuildConfig.DEBUG) {
        Log.d(TAG, "User re-enabled auto-select regions pref, auto-selecting via Home Activity...");
      }
      NavHelp.goHome(this);
    }
    super.onDestroy();
  }
  @Override
  protected void onDestroy() {
    trustedPeerPreference.setOnPreferenceChangeListener(null);

    super.onDestroy();
  }