Fix starting of bluetooth manager
This commit is contained in:
parent
bb618d51af
commit
0b3c2af420
2 changed files with 7 additions and 4 deletions
|
@ -21,6 +21,7 @@ package org.linphone;
|
||||||
import static android.content.Intent.ACTION_MAIN;
|
import static android.content.Intent.ACTION_MAIN;
|
||||||
|
|
||||||
import org.linphone.assistant.RemoteProvisioningActivity;
|
import org.linphone.assistant.RemoteProvisioningActivity;
|
||||||
|
import org.linphone.mediastream.Version;
|
||||||
import org.linphone.tutorials.TutorialLauncherActivity;
|
import org.linphone.tutorials.TutorialLauncherActivity;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
@ -72,6 +73,11 @@ public class LinphoneLauncherActivity extends Activity {
|
||||||
} else {
|
} else {
|
||||||
classToStart = LinphoneActivity.class;
|
classToStart = LinphoneActivity.class;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// We need LinphoneService to start bluetoothManager
|
||||||
|
if (Version.sdkAboveOrEqual(Version.API11_HONEYCOMB_30)) {
|
||||||
|
BluetoothManager.getInstance().initBluetooth();
|
||||||
|
}
|
||||||
|
|
||||||
mHandler.postDelayed(new Runnable() {
|
mHandler.postDelayed(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -295,6 +295,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
||||||
|
|
||||||
instance = new LinphoneManager(c);
|
instance = new LinphoneManager(c);
|
||||||
instance.startLibLinphone(c);
|
instance.startLibLinphone(c);
|
||||||
|
|
||||||
TelephonyManager tm = (TelephonyManager) c.getSystemService(Context.TELEPHONY_SERVICE);
|
TelephonyManager tm = (TelephonyManager) c.getSystemService(Context.TELEPHONY_SERVICE);
|
||||||
boolean gsmIdle = tm.getCallState() == TelephonyManager.CALL_STATE_IDLE;
|
boolean gsmIdle = tm.getCallState() == TelephonyManager.CALL_STATE_IDLE;
|
||||||
setGsmIdle(gsmIdle);
|
setGsmIdle(gsmIdle);
|
||||||
|
@ -776,10 +777,6 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
|
||||||
|
|
||||||
updateNetworkReachability();
|
updateNetworkReachability();
|
||||||
|
|
||||||
if (Version.sdkAboveOrEqual(Version.API11_HONEYCOMB_30)) {
|
|
||||||
BluetoothManager.getInstance().initBluetooth();
|
|
||||||
}
|
|
||||||
|
|
||||||
resetCameraFromPreferences();
|
resetCameraFromPreferences();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue