From ec7aecef4658933339fc0da2b5ef086d42b07ad5 Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Tue, 15 May 2018 10:20:19 +0200 Subject: [PATCH] Fix a crash when initiating call Signed-off-by: Mario Danic --- .../bottomsheet/OperationsMenuController.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/OperationsMenuController.java b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/OperationsMenuController.java index c46afa2e9..f2edff338 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/OperationsMenuController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/OperationsMenuController.java @@ -532,17 +532,20 @@ public class OperationsMenuController extends BaseController { } bundle.putString(BundleKeys.KEY_CALL_SESSION, callSession); - Intent callIntent = new Intent(getActivity(), CallActivity.class); - callIntent.putExtras(bundle); - if (getActivity() != null) { + + Intent callIntent = new Intent(getActivity(), CallActivity.class); + callIntent.putExtras(bundle); + InputMethodManager imm = (InputMethodManager) getActivity().getSystemService(Activity.INPUT_METHOD_SERVICE); if (imm != null) { imm.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0); } + + startActivity(callIntent); + } - startActivity(callIntent); } private class OperationsObserver implements Observer {