From f04f596600e8fcd993a21eacb4134ff2f8a617e3 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Wed, 26 Sep 2012 15:04:19 +0200 Subject: [PATCH] Fix another PN issue --- src/org/linphone/compatibility/ApiEightPlus.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/org/linphone/compatibility/ApiEightPlus.java b/src/org/linphone/compatibility/ApiEightPlus.java index dd298bd19..90b7e4851 100644 --- a/src/org/linphone/compatibility/ApiEightPlus.java +++ b/src/org/linphone/compatibility/ApiEightPlus.java @@ -50,13 +50,14 @@ public class ApiEightPlus { String currentPushSenderID = prefs.getString(context.getString(R.string.push_sender_id_key), null); if (regId.equals("") || currentPushSenderID == null || !currentPushSenderID.equals(newPushSenderID)) { GCMRegistrar.register(context, newPushSenderID); + String newRegId = GCMRegistrar.getRegistrationId(context); Log.d("Push Notification : storing current sender id = " + newPushSenderID); SharedPreferences.Editor editor = prefs.edit(); editor.putString(context.getString(R.string.push_sender_id_key), newPushSenderID); - Log.d("Push Notification : new id = " + regId); - editor.putString(context.getString(R.string.push_reg_id_key), regId); + Log.d("Push Notification : new id = " + newRegId); + editor.putString(context.getString(R.string.push_reg_id_key), newRegId); editor.commit(); } else {