Fix Notification registration crash when LpConfig not exist yet
This commit is contained in:
parent
c5db56b3fa
commit
828ea5943d
1 changed files with 3 additions and 2 deletions
|
@ -1126,6 +1126,7 @@ public class LinphonePreferences {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setPushNotificationRegistrationID(String regId) {
|
public void setPushNotificationRegistrationID(String regId) {
|
||||||
|
if (getConfig() == null) return;
|
||||||
getConfig().setString("app", "push_notification_regid", (regId != null) ? regId: "");
|
getConfig().setString("app", "push_notification_regid", (regId != null) ? regId: "");
|
||||||
setPushNotificationEnabled(isPushNotificationEnabled());
|
setPushNotificationEnabled(isPushNotificationEnabled());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue