Merge remote-tracking branch 'origin/master' into dev_phonenumber

This commit is contained in:
Simon Morlat 2016-09-08 12:27:57 +02:00
commit d8d0c292d5
6 changed files with 27 additions and 15 deletions

View file

@ -333,6 +333,7 @@ public class ContactsListFragment extends Fragment implements OnClickListener, O
noSipContact.setVisibility(View.GONE);
noContact.setVisibility(View.GONE);
contactsList.setVisibility(View.VISIBLE);
contactsFetchInProgress.setVisibility(View.GONE);
if (onlyDisplayLinphoneContacts) {
contactsList.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE);
@ -344,11 +345,6 @@ public class ContactsListFragment extends Fragment implements OnClickListener, O
edit.setEnabled(true);
}
ContactsManager.getInstance().setLinphoneContactsPrefered(onlyDisplayLinphoneContacts);
if (contactsList.getCount() == 0) {
contactsFetchInProgress.setVisibility(View.VISIBLE);
} else {
contactsFetchInProgress.setVisibility(View.GONE);
}
}
private void changeContactsToggle() {

View file

@ -1451,8 +1451,12 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
}
if (isTablet()) {
// Prevent fragmentContainer2 to be visible when rotating the device
LinearLayout ll = (LinearLayout) findViewById(R.id.fragmentContainer2);
if (currentFragment == FragmentsAvailable.DIALER) {
if (currentFragment == FragmentsAvailable.DIALER
|| currentFragment == FragmentsAvailable.ABOUT
|| currentFragment == FragmentsAvailable.SETTINGS
|| currentFragment == FragmentsAvailable.ACCOUNT_SETTINGS) {
ll.setVisibility(View.GONE);
}
}

View file

@ -21,6 +21,7 @@ package org.linphone;
import static android.content.Intent.ACTION_MAIN;
import org.linphone.assistant.RemoteProvisioningActivity;
import org.linphone.mediastream.Version;
import org.linphone.tutorials.TutorialLauncherActivity;
import android.app.Activity;
@ -72,6 +73,11 @@ public class LinphoneLauncherActivity extends Activity {
} else {
classToStart = LinphoneActivity.class;
}
// We need LinphoneService to start bluetoothManager
if (Version.sdkAboveOrEqual(Version.API11_HONEYCOMB_30)) {
BluetoothManager.getInstance().initBluetooth();
}
mHandler.postDelayed(new Runnable() {
@Override

View file

@ -295,6 +295,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
instance = new LinphoneManager(c);
instance.startLibLinphone(c);
TelephonyManager tm = (TelephonyManager) c.getSystemService(Context.TELEPHONY_SERVICE);
boolean gsmIdle = tm.getCallState() == TelephonyManager.CALL_STATE_IDLE;
setGsmIdle(gsmIdle);
@ -777,10 +778,6 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
updateNetworkReachability();
if (Version.sdkAboveOrEqual(Version.API11_HONEYCOMB_30)) {
BluetoothManager.getInstance().initBluetooth();
}
resetCameraFromPreferences();
}

View file

@ -77,11 +77,15 @@ public class GCMService extends GCMBaseIntentService {
}
@Override
protected void onRegistered(Context context, String regId) {
protected void onRegistered(Context context, final String regId) {
initLogger(context);
Log.d("[Push Notification] Registered: " + regId);
LinphonePreferences.instance().setPushNotificationRegistrationID(regId);
UIThreadDispatcher.dispatch(new Runnable(){
@Override
public void run() {
LinphonePreferences.instance().setPushNotificationRegistrationID(regId);
}
});
}
@Override
@ -89,7 +93,12 @@ public class GCMService extends GCMBaseIntentService {
initLogger(context);
Log.w("[Push Notification] Unregistered: " + regId);
LinphonePreferences.instance().setPushNotificationRegistrationID(null);
UIThreadDispatcher.dispatch(new Runnable(){
@Override
public void run() {
LinphonePreferences.instance().setPushNotificationRegistrationID(null);
}
});
}
protected String[] getSenderIds(Context context) {

@ -1 +1 @@
Subproject commit 13b4498265ec3e4d356caf79da4cc7d7eb5afef4
Subproject commit b61dd749dec10d1f4bb715de6e0868b50c40f0d6