Fix crash
This commit is contained in:
parent
20a45a72ae
commit
94cd40f141
2 changed files with 30 additions and 22 deletions
|
@ -1125,6 +1125,7 @@ public class LinphoneActivity extends FragmentActivity implements
|
|||
Thread sipContactsHandler = new Thread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if(sipContactCursor != null) {
|
||||
for (int i = 0; i < sipContactCursor.getCount(); i++) {
|
||||
Contact contact = Compatibility.getContact(getContentResolver(), sipContactCursor, i);
|
||||
if (contact == null)
|
||||
|
@ -1136,6 +1137,8 @@ public class LinphoneActivity extends FragmentActivity implements
|
|||
}
|
||||
sipContactList.add(contact);
|
||||
}
|
||||
}
|
||||
if(contactCursor != null) {
|
||||
for (int i = 0; i < contactCursor.getCount(); i++) {
|
||||
Contact contact = Compatibility.getContact(getContentResolver(), contactCursor, i);
|
||||
if (contact == null)
|
||||
|
@ -1150,6 +1153,7 @@ public class LinphoneActivity extends FragmentActivity implements
|
|||
contactList.add(contact);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
contactList = new ArrayList<Contact>();
|
||||
|
|
|
@ -38,7 +38,11 @@ public class ApiEightPlus {
|
|||
try {
|
||||
// Starting the push notification service
|
||||
GCMRegistrar.checkDevice(context);
|
||||
try {
|
||||
GCMRegistrar.checkManifest(context);
|
||||
} catch (IllegalStateException e){
|
||||
Log.e("No receiver found",e);
|
||||
}
|
||||
final String regId = GCMRegistrar.getRegistrationId(context);
|
||||
String newPushSenderID = context.getString(R.string.push_sender_id);
|
||||
String currentPushSenderID = LinphonePreferences.instance().getPushNotificationRegistrationID();
|
||||
|
|
Loading…
Reference in a new issue