[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,7 +285,9 @@ public class NetworkProviderWifiCallingGroup extends
}
public void unregister() {
mTelephonyManager.unregisterTelephonyCallback(this);
if (mTelephonyManager != null) {
mTelephonyManager.unregisterTelephonyCallback(this);
}
}
}