[Settings] Add null protection to avoid the crash

Change-Id: Id933a33ecf2931445a57cf6588a9c9123c170707
Test: manual
Bug: 202162176
This commit is contained in:
Zoey Chen
2021-10-12 03:59:55 +00:00
parent 99e05ea46c
commit 9632cd7087

View File

@@ -285,9 +285,11 @@ public class NetworkProviderWifiCallingGroup extends
} }
public void unregister() { public void unregister() {
if (mTelephonyManager != null) {
mTelephonyManager.unregisterTelephonyCallback(this); mTelephonyManager.unregisterTelephonyCallback(this);
} }
} }
}
/** /**
* To indicate that should show the Wi-Fi calling preference or not. * To indicate that should show the Wi-Fi calling preference or not.