Fixed video overlay
This commit is contained in:
parent
514c3f4e2b
commit
6436cf765e
2 changed files with 21 additions and 4 deletions
|
@ -14,6 +14,9 @@ Group changes to describe their impact on the project, as follows:
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- Added shortcuts to calls history & chat rooms list
|
- Added shortcuts to calls history & chat rooms list
|
||||||
|
- Improved device's do not disturb policy compliance
|
||||||
|
- Added sample application to help developpers getting started with our SDK
|
||||||
|
- Added picture in picture feature if supported instead of video overlay
|
||||||
|
|
||||||
## [4.1.0] - 2019-05-03
|
## [4.1.0] - 2019-05-03
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,7 @@ import androidx.core.app.ActivityCompat;
|
||||||
import androidx.core.content.ContextCompat;
|
import androidx.core.content.ContextCompat;
|
||||||
import androidx.drawerlayout.widget.DrawerLayout;
|
import androidx.drawerlayout.widget.DrawerLayout;
|
||||||
import org.linphone.LinphoneManager;
|
import org.linphone.LinphoneManager;
|
||||||
|
import org.linphone.LinphoneService;
|
||||||
import org.linphone.R;
|
import org.linphone.R;
|
||||||
import org.linphone.activities.DialerActivity;
|
import org.linphone.activities.DialerActivity;
|
||||||
import org.linphone.activities.LinphoneGenericActivity;
|
import org.linphone.activities.LinphoneGenericActivity;
|
||||||
|
@ -455,20 +456,31 @@ public class CallActivity extends LinphoneGenericActivity
|
||||||
Log.w("[Call Activity] Resuming but no call found...");
|
Log.w("[Call Activity] Resuming but no call found...");
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LinphoneService.instance().destroyOverlay();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onPause() {
|
protected void onPause() {
|
||||||
super.onPause();
|
|
||||||
|
|
||||||
ContactsManager.getInstance().removeContactsListener(this);
|
ContactsManager.getInstance().removeContactsListener(this);
|
||||||
LinphoneManager.getCallManager().setCallInterface(null);
|
LinphoneManager.getCallManager().setCallInterface(null);
|
||||||
|
|
||||||
|
Core core = LinphoneManager.getCore();
|
||||||
|
if (LinphonePreferences.instance().isOverlayEnabled()
|
||||||
|
&& core != null
|
||||||
|
&& core.getCurrentCall() != null) {
|
||||||
|
Call call = core.getCurrentCall();
|
||||||
|
if (call.getState() == Call.State.StreamsRunning) {
|
||||||
|
// Prevent overlay creation if video call is paused by remote
|
||||||
|
LinphoneService.instance().createOverlay();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
super.onPause();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onDestroy() {
|
protected void onDestroy() {
|
||||||
super.onDestroy();
|
|
||||||
|
|
||||||
Core core = LinphoneManager.getCore();
|
Core core = LinphoneManager.getCore();
|
||||||
if (core != null) {
|
if (core != null) {
|
||||||
core.removeListener(mListener);
|
core.removeListener(mListener);
|
||||||
|
@ -478,6 +490,8 @@ public class CallActivity extends LinphoneGenericActivity
|
||||||
if (mZoomHelper != null) {
|
if (mZoomHelper != null) {
|
||||||
mZoomHelper.destroy();
|
mZoomHelper.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
super.onDestroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue