diff --git a/src/org/linphone/LinphonePreferences.java b/src/org/linphone/LinphonePreferences.java index c5ef97bf3..abae7649d 100644 --- a/src/org/linphone/LinphonePreferences.java +++ b/src/org/linphone/LinphonePreferences.java @@ -988,6 +988,7 @@ public class LinphonePreferences { public void setPushNotificationRegistrationID(String regId) { getConfig().setString("app", "push_notification_regid", regId); + setPushNotificationEnabled(isPushNotificationEnabled()); } public String getPushNotificationRegistrationID() { diff --git a/src/org/linphone/LinphoneService.java b/src/org/linphone/LinphoneService.java index 6999872ab..9d1a50efb 100644 --- a/src/org/linphone/LinphoneService.java +++ b/src/org/linphone/LinphoneService.java @@ -172,20 +172,6 @@ public final class LinphoneService extends Service { if (state == LinphoneCall.State.IncomingReceived) { onIncomingReceived(); } - - if (state == State.CallUpdatedByRemote) { - // If the correspondent proposes video while audio call - boolean remoteVideo = call.getRemoteParams().getVideoEnabled(); - boolean localVideo = call.getCurrentParamsCopy().getVideoEnabled(); - boolean autoAcceptCameraPolicy = LinphonePreferences.instance().shouldAutomaticallyAcceptVideoRequests(); - if (remoteVideo && !localVideo && !autoAcceptCameraPolicy && !LinphoneManager.getLc().isInConference()) { - try { - LinphoneManager.getLc().deferCallUpdate(call); - } catch (LinphoneCoreException e) { - e.printStackTrace(); - } - } - } if (state == State.StreamsRunning) { // Workaround bug current call seems to be updated after state changed to streams running diff --git a/src/org/linphone/compatibility/ApiEightPlus.java b/src/org/linphone/compatibility/ApiEightPlus.java index c9e47a198..30f5a78fb 100644 --- a/src/org/linphone/compatibility/ApiEightPlus.java +++ b/src/org/linphone/compatibility/ApiEightPlus.java @@ -48,9 +48,7 @@ public class ApiEightPlus { String currentPushSenderID = LinphonePreferences.instance().getPushNotificationRegistrationID(); if (regId.equals("") || currentPushSenderID == null || !currentPushSenderID.equals(newPushSenderID)) { GCMRegistrar.getMethod("register", Context.class, String[].class).invoke(null, context, new String[]{newPushSenderID}); - Log.d("Push Notification: storing current sender id = " + newPushSenderID); - LinphonePreferences.instance().setPushNotificationRegistrationID(newPushSenderID); } else { Log.d("Push Notification: already registered with id = " + regId); LinphonePreferences.instance().setPushNotificationRegistrationID(regId);