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))
.pushChangeHandler(HorizontalChangeHandler())
.popChangeHandler(HorizontalChangeHandler())
.tag(CallNotificationController.TAG)
)
} else {
router!!.setRoot(
@ -153,6 +154,14 @@ class MagicCallActivity : BaseActivity() {
super.onPictureInPictureModeChanged(isInPictureInPictureMode, newConfig)
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
if (isInPictureInPictureMode) {
callController.updateUiForPipMode()
@ -160,6 +169,7 @@ class MagicCallActivity : BaseActivity() {
callController.updateUiForNormalMode()
}
}
}
override fun onStop() {
super.onStop()

View File

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