mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-02 11:19:30 +00:00
Several enhancements:
- Fix errors in start/stop linphoneManager - Fix calls to guiListener().xx when null - Fix restart of linphoneManager - Cleanup some useless code - Work on outgoingCallReceiver - Intent CALL_PRIVILEDGED
This commit is contained in:
parent
3c760cd68d
commit
099907b8ee
3 changed files with 11 additions and 11 deletions
|
|
@ -67,7 +67,7 @@ public class AndroidCameraRecordManager {
|
|||
|
||||
// singleton
|
||||
private AndroidCameraRecordManager() {
|
||||
cc = Version.sdkAbove(9) ? new AndroidCameraConf9() : new AndroidCameraConf();
|
||||
cc = Version.sdkAboveOrEqual(9) ? new AndroidCameraConf9() : new AndroidCameraConf();
|
||||
|
||||
int[] fId = {-1};int[] rId = {-1};int[] cId = {-1};
|
||||
cc.findFrontAndRearCameraIds(fId, rId, cId);
|
||||
|
|
@ -172,11 +172,11 @@ public class AndroidCameraRecordManager {
|
|||
parameters.rotation = bufferRotationForCorrectImageOrientation();
|
||||
|
||||
parameters.surfaceView = surfaceView;
|
||||
if (Version.sdkAbove(9)) {
|
||||
if (Version.sdkAboveOrEqual(9)) {
|
||||
recorder = new AndroidCameraRecord9Impl(parameters);
|
||||
} else if (Version.sdkAbove(8)) {
|
||||
} else if (Version.sdkAboveOrEqual(8)) {
|
||||
recorder = new AndroidCameraRecord8Impl(parameters);
|
||||
} else if (Version.sdkAbove(5)) {
|
||||
} else if (Version.sdkAboveOrEqual(5)) {
|
||||
recorder = new AndroidCameraRecord5Impl(parameters);
|
||||
} else {
|
||||
recorder = new AndroidCameraRecordImpl(parameters);
|
||||
|
|
@ -208,7 +208,7 @@ public class AndroidCameraRecordManager {
|
|||
if (supportedVideoSizes != null) return supportedVideoSizes;
|
||||
}
|
||||
|
||||
if (Version.sdkAbove(5)) {
|
||||
if (Version.sdkAboveOrEqual(5)) {
|
||||
supportedVideoSizes = AndroidCameraRecord5Impl.oneShotSupportedVideoSizes();
|
||||
}
|
||||
|
||||
|
|
@ -253,7 +253,7 @@ public class AndroidCameraRecordManager {
|
|||
|
||||
private int bufferRotationForCorrectImageOrientation() {
|
||||
final int cameraOrientation = cc.getCameraOrientation(cameraId);
|
||||
final int rotation = Version.sdkAbove(8) ?
|
||||
final int rotation = Version.sdkAboveOrEqual(8) ?
|
||||
(360 - cameraOrientation + 90 - phoneOrientation) % 360
|
||||
: 0;
|
||||
Log.d(tag, "Capture video buffer will need a rotation of " + rotation
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
private native void enableEchoCancellation(long nativePtr,boolean enable);
|
||||
private native boolean isEchoCancellationEnabled(long nativePtr);
|
||||
private native long getCurrentCall(long nativePtr) ;
|
||||
private native void playDtmf(long nativePtr,char dtmf,int duration);
|
||||
private native void playDtmf(long nativePtr,char dtmf,int duration, boolean speaker);
|
||||
private native void stopDtmf(long nativePtr);
|
||||
private native void setVideoWindowId(long nativePtr, Object wid);
|
||||
private native void setPreviewWindowId(long nativePtr, Object wid);
|
||||
|
|
@ -298,8 +298,8 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
// TODO Auto-generated method stub
|
||||
return false;
|
||||
}
|
||||
public void playDtmf(char number, int duration) {
|
||||
playDtmf(nativePtr,number, duration);
|
||||
public void playDtmf(char number, int duration, boolean speaker) {
|
||||
playDtmf(nativePtr,number, duration, speaker);
|
||||
|
||||
}
|
||||
public void stopDtmf() {
|
||||
|
|
|
|||
|
|
@ -30,11 +30,11 @@ public class Version {
|
|||
8 : Integer.parseInt(Build.VERSION.SDK); // Force versions above 9 to 8
|
||||
// 7; // 2.1
|
||||
|
||||
public static final boolean sdkAbove(int value) {
|
||||
public static final boolean sdkAboveOrEqual(int value) {
|
||||
return buildVersion >= value;
|
||||
}
|
||||
|
||||
public static final boolean sdkBelow(int value) {
|
||||
public static final boolean sdkStrictlyBelow(int value) {
|
||||
return buildVersion < value;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue