From f08b8e63bb8a1e2f2e4410ec5a80ad4136f74818 Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Thu, 25 Jan 2018 15:46:37 +0100 Subject: [PATCH] Keep screen on & close bottom sheet Signed-off-by: Mario Danic --- .../talk/controllers/bottomsheet/CallMenuController.java | 1 + .../talk/controllers/bottomsheet/EntryMenuController.java | 1 + app/src/main/res/layout/controller_server_selection.xml | 5 +++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/CallMenuController.java b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/CallMenuController.java index dbe75759c..94000739e 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/CallMenuController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/CallMenuController.java @@ -206,6 +206,7 @@ public class CallMenuController extends BaseController implements FlexibleAdapte Intent intent = new Intent(shareIntent); intent.setComponent(new ComponentName(appItem.getPackageName(), appItem.getName())); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); + eventBus.post(new BottomSheetLockEvent(true, 0, false)); getActivity().startActivity(intent); } else { bundle.putInt(BundleKeys.KEY_OPERATION_CODE, 7); diff --git a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java index 29beb7d34..c5cf8f1cb 100644 --- a/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java +++ b/app/src/main/java/com/nextcloud/talk/controllers/bottomsheet/EntryMenuController.java @@ -118,6 +118,7 @@ public class EntryMenuController extends BaseController { intent.setComponent(new ComponentName(packageName, name)); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); getActivity().startActivity(intent); + eventBus.post(new BottomSheetLockEvent(true, 0, false)); } } } diff --git a/app/src/main/res/layout/controller_server_selection.xml b/app/src/main/res/layout/controller_server_selection.xml index 5dc0ca0bf..b1ec60c43 100644 --- a/app/src/main/res/layout/controller_server_selection.xml +++ b/app/src/main/res/layout/controller_server_selection.xml @@ -73,6 +73,7 @@ android:indeterminate="true" android:indeterminateTint="@color/nc_white_color_complete" android:indeterminateTintMode="src_in" + android:keepScreenOn="true" android:visibility="invisible"/>