Loading src/com/android/settings/WifiCallingSettings.java +9 −9 Original line number Diff line number Diff line Loading @@ -253,15 +253,6 @@ public class WifiCallingSettings extends SettingsPreferenceFragment final Context context = getActivity(); if (ImsManager.isWfcEnabledByPlatform(context)) { TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); tm.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE); mSwitchBar.addOnSwitchChangeListener(this); mValidListener = true; } // NOTE: Buttons will be enabled/disabled in mPhoneStateListener boolean wfcEnabled = ImsManager.isWfcEnabledByUser(context) && ImsManager.isNonTtyOrTtyOnVolteEnabled(context); Loading @@ -272,6 +263,15 @@ public class WifiCallingSettings extends SettingsPreferenceFragment mButtonWfcRoamingMode.setValue(Integer.toString(wfcRoamingMode)); updateButtonWfcMode(context, wfcEnabled, wfcMode, wfcRoamingMode); if (ImsManager.isWfcEnabledByPlatform(context)) { TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); tm.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE); mSwitchBar.addOnSwitchChangeListener(this); mValidListener = true; } context.registerReceiver(mIntentReceiver, mIntentFilter); Intent intent = getActivity().getIntent(); Loading Loading
src/com/android/settings/WifiCallingSettings.java +9 −9 Original line number Diff line number Diff line Loading @@ -253,15 +253,6 @@ public class WifiCallingSettings extends SettingsPreferenceFragment final Context context = getActivity(); if (ImsManager.isWfcEnabledByPlatform(context)) { TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); tm.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE); mSwitchBar.addOnSwitchChangeListener(this); mValidListener = true; } // NOTE: Buttons will be enabled/disabled in mPhoneStateListener boolean wfcEnabled = ImsManager.isWfcEnabledByUser(context) && ImsManager.isNonTtyOrTtyOnVolteEnabled(context); Loading @@ -272,6 +263,15 @@ public class WifiCallingSettings extends SettingsPreferenceFragment mButtonWfcRoamingMode.setValue(Integer.toString(wfcRoamingMode)); updateButtonWfcMode(context, wfcEnabled, wfcMode, wfcRoamingMode); if (ImsManager.isWfcEnabledByPlatform(context)) { TelephonyManager tm = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE); tm.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE); mSwitchBar.addOnSwitchChangeListener(this); mValidListener = true; } context.registerReceiver(mIntentReceiver, mIntentFilter); Intent intent = getActivity().getIntent(); Loading