Fix non existing Android API calls from old sdk.
This commit is contained in:
parent
82cb818ddd
commit
ba5811582a
7 changed files with 14 additions and 27 deletions
|
@ -301,7 +301,7 @@ public class DialerActivity extends SoftVolumeActivity implements LinphoneGuiLis
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Dialog onCreateDialog(int id, Bundle b) {
|
protected Dialog onCreateDialog(int id) {
|
||||||
String from = LinphoneManager.getInstance().extractIncomingRemoteName();
|
String from = LinphoneManager.getInstance().extractIncomingRemoteName();
|
||||||
View incomingCallView = getLayoutInflater().inflate(R.layout.incoming_call, null);
|
View incomingCallView = getLayoutInflater().inflate(R.layout.incoming_call, null);
|
||||||
|
|
||||||
|
|
|
@ -129,28 +129,15 @@ public class IncallActivity extends SoftVolumeActivity implements OnClickListene
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Go to home on Back key
|
|
||||||
@Override
|
@Override
|
||||||
public boolean dispatchKeyEvent(KeyEvent event) {
|
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
||||||
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
|
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
|
||||||
if (event.getAction() == KeyEvent.ACTION_DOWN
|
startActivity(new Intent()
|
||||||
&& event.getRepeatCount() == 0) {
|
.setAction(Intent.ACTION_MAIN)
|
||||||
// Tell the framework to start tracking this event.
|
.addCategory(Intent.CATEGORY_HOME));
|
||||||
numpad.getKeyDispatcherState().startTracking(event, this);
|
return true;
|
||||||
return true;
|
|
||||||
|
|
||||||
} else if (event.getAction() == KeyEvent.ACTION_UP) {
|
|
||||||
numpad.getKeyDispatcherState().handleUpEvent(event);
|
|
||||||
if (event.isTracking() && !event.isCanceled()) {
|
|
||||||
startActivity(new Intent()
|
|
||||||
.setAction(Intent.ACTION_MAIN)
|
|
||||||
.addCategory(Intent.CATEGORY_HOME));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return super.dispatchKeyEvent(event);
|
|
||||||
} else {
|
} else {
|
||||||
return super.dispatchKeyEvent(event);
|
return super.onKeyUp(keyCode, event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,7 +38,7 @@ import android.view.SurfaceView;
|
||||||
import android.view.ViewGroup.LayoutParams;
|
import android.view.ViewGroup.LayoutParams;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* For Android SDK >=
|
* For Android SDK >= 5
|
||||||
* @author Guillaume Beraudo
|
* @author Guillaume Beraudo
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -35,7 +35,7 @@ import android.util.Log;
|
||||||
* @author Guillaume Beraudo
|
* @author Guillaume Beraudo
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class AndroidCameraRecordImpl extends AndroidCameraRecord implements PreviewCallback {
|
class AndroidCameraRecord5 extends AndroidCameraRecord implements PreviewCallback {
|
||||||
|
|
||||||
private long filterCtxPtr;
|
private long filterCtxPtr;
|
||||||
private double timeElapsedBetweenFrames = 0;
|
private double timeElapsedBetweenFrames = 0;
|
||||||
|
@ -44,7 +44,7 @@ class AndroidCameraRecordImpl extends AndroidCameraRecord implements PreviewCall
|
||||||
protected final int rotation;
|
protected final int rotation;
|
||||||
private MirrorType mirror;
|
private MirrorType mirror;
|
||||||
|
|
||||||
public AndroidCameraRecordImpl(RecorderParams parameters) {
|
public AndroidCameraRecord5(RecorderParams parameters) {
|
||||||
super(parameters);
|
super(parameters);
|
||||||
expectedTimeBetweenFrames = 1d / Math.round(parameters.fps);
|
expectedTimeBetweenFrames = 1d / Math.round(parameters.fps);
|
||||||
filterCtxPtr = parameters.filterDataNativePtr;
|
filterCtxPtr = parameters.filterDataNativePtr;
|
|
@ -30,7 +30,7 @@ import android.util.Log;
|
||||||
* @author Guillaume Beraudo
|
* @author Guillaume Beraudo
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class AndroidCameraRecord8 extends AndroidCameraRecordImpl {
|
class AndroidCameraRecord8 extends AndroidCameraRecord5 {
|
||||||
|
|
||||||
|
|
||||||
public AndroidCameraRecord8(RecorderParams parameters) {
|
public AndroidCameraRecord8(RecorderParams parameters) {
|
||||||
|
|
|
@ -196,7 +196,7 @@ public class AndroidCameraRecordManager {
|
||||||
} else if (Version.sdkAboveOrEqual(8)) {
|
} else if (Version.sdkAboveOrEqual(8)) {
|
||||||
recorder = new AndroidCameraRecord8(parameters);
|
recorder = new AndroidCameraRecord8(parameters);
|
||||||
} else if (Version.sdkAboveOrEqual(5)) {
|
} else if (Version.sdkAboveOrEqual(5)) {
|
||||||
recorder = new AndroidCameraRecordImpl(parameters);
|
recorder = new AndroidCameraRecord5(parameters);
|
||||||
} else {
|
} else {
|
||||||
throw new RuntimeException("SDK version unsupported " + Version.sdk());
|
throw new RuntimeException("SDK version unsupported " + Version.sdk());
|
||||||
}
|
}
|
||||||
|
@ -228,7 +228,7 @@ public class AndroidCameraRecordManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Version.sdkAboveOrEqual(5)) {
|
if (Version.sdkAboveOrEqual(5)) {
|
||||||
supportedVideoSizes = AndroidCameraRecordImpl.oneShotSupportedVideoSizes();
|
supportedVideoSizes = AndroidCameraRecord5.oneShotSupportedVideoSizes();
|
||||||
}
|
}
|
||||||
|
|
||||||
// eventually null
|
// eventually null
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 840856ca5545dd3e2a18a25db32ce3c00605803d
|
Subproject commit c097b9ab6319e2a7ef758032c0ed6d41e009bedb
|
Loading…
Reference in a new issue