@Override
  public void onPause() {
    super.onPause();

    mAirplaneModeEnabler.pause();
    if (mNfcEnabler != null) {
      mNfcEnabler.pause();
    }
    if (mNsdEnabler != null) {
      mNsdEnabler.pause();
    }
  }
Пример #2
0
  @Override
  public void onPause() {
    super.onPause();

    getActivity().unregisterReceiver(mReceiver);

    mAirplaneModeEnabler.pause();
    if (mNfcEnabler != null) {
      mNfcEnabler.pause();
    }
    if (mNsdEnabler != null) {
      mNsdEnabler.pause();
    }
  }
Пример #3
0
  @Override
  public void onResume() {
    super.onResume();

    mAirplaneModeEnabler.resume();
    if (mNfcEnabler != null) {
      mNfcEnabler.resume();
    }
    if (mNsdEnabler != null) {
      mNsdEnabler.resume();
    }

    // SPRD: add for <Bug#255679> setenable false when no sim card  start
    updateMobileSettingsState();
    // SPRD: add for <Bug#255679> setenable false when no sim card end
    updateVPNSettingState();

    getActivity()
        .registerReceiver(mReceiver, new IntentFilter(TelephonyIntents.ACTION_SIM_STATE_CHANGED));
  }
  @Override
  public void onResume() {
    super.onResume();

    mAirplaneModeEnabler.resume();
    if (mNfcEnabler != null) {
      mNfcEnabler.resume();
    }
    if (mNsdEnabler != null) {
      mNsdEnabler.resume();
    }

    // update WFC setting
    final Context context = getActivity();
    if (ImsManager.isWfcEnabledByPlatform(context)) {
      getPreferenceScreen().addPreference(mButtonWfc);

      mButtonWfc.setSummary(
          WifiCallingSettings.getWfcModeSummary(context, ImsManager.getWfcMode(context)));
    } else {
      removePreference(KEY_WFC_SETTINGS);
    }
  }