fix to enable pip for CallNotification Controller

methods to update UI are not yet implemented. maybe it's better to make two Activities: one for Call and one for CallNotification...

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2021-10-27 12:47:45 +02:00
parent 0d1e0af9d1
commit 03913b40a2
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B
2 changed files with 16 additions and 6 deletions

View File

@ -76,6 +76,7 @@ class MagicCallActivity : BaseActivity() {
RouterTransaction.with(CallNotificationController(intent.extras)) RouterTransaction.with(CallNotificationController(intent.extras))
.pushChangeHandler(HorizontalChangeHandler()) .pushChangeHandler(HorizontalChangeHandler())
.popChangeHandler(HorizontalChangeHandler()) .popChangeHandler(HorizontalChangeHandler())
.tag(CallNotificationController.TAG)
) )
} else { } else {
router!!.setRoot( router!!.setRoot(
@ -153,6 +154,14 @@ class MagicCallActivity : BaseActivity() {
super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig) super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig)
isInPipMode = isInPictureInPictureMode isInPipMode = isInPictureInPictureMode
if (router?.getControllerWithTag(CallNotificationController.TAG) != null) {
val callNotificationController = router?.getControllerWithTag(CallNotificationController.TAG) as CallNotificationController
if (isInPictureInPictureMode) {
// callNotificationController.updateUiForPipMode()
} else {
// callNotificationController.updateUiForNormalMode()
}
} else if (router?.getControllerWithTag(CallController.TAG) != null) {
val callController = router?.getControllerWithTag(CallController.TAG) as CallController val callController = router?.getControllerWithTag(CallController.TAG) as CallController
if (isInPictureInPictureMode) { if (isInPictureInPictureMode) {
callController.updateUiForPipMode() callController.updateUiForPipMode()
@ -160,6 +169,7 @@ class MagicCallActivity : BaseActivity() {
callController.updateUiForNormalMode() callController.updateUiForNormalMode()
} }
} }
}
override fun onStop() { override fun onStop() {
super.onStop() super.onStop()

View File

@ -101,7 +101,7 @@ import okhttp3.Cache;
@AutoInjector(NextcloudTalkApplication.class) @AutoInjector(NextcloudTalkApplication.class)
public class CallNotificationController extends BaseController { public class CallNotificationController extends BaseController {
private static final String TAG = "CallNotificationController"; public static final String TAG = "CallNotificationController";
@Inject @Inject
NcApi ncApi; NcApi ncApi;