Merge "[Settings] Reduce the operation of VoLTE config redraw"
diff --git a/src/com/android/settings/network/telephony/Enhanced4gBasePreferenceController.java b/src/com/android/settings/network/telephony/Enhanced4gBasePreferenceController.java
index 0484632..ba12146 100644
--- a/src/com/android/settings/network/telephony/Enhanced4gBasePreferenceController.java
+++ b/src/com/android/settings/network/telephony/Enhanced4gBasePreferenceController.java
@@ -127,7 +127,7 @@
@Override
public void onStart() {
- if (mPhoneStateListener == null) {
+ if (!isModeMatched() || (mPhoneStateListener == null)) {
return;
}
mPhoneStateListener.register(mContext, mSubId);
@@ -241,7 +241,9 @@
public void unregister() {
mCallState = null;
- mTelephonyManager.listen(this, PhoneStateListener.LISTEN_NONE);
+ if (mTelephonyManager != null) {
+ mTelephonyManager.listen(this, PhoneStateListener.LISTEN_NONE);
+ }
}
}