diff options
author | Peter Li <pyli@google.com> | 2020-06-17 19:51:06 -0700 |
---|---|---|
committer | Peter Li <pyli@google.com> | 2020-06-19 21:00:09 +0000 |
commit | 1e29cefbe65ca8aa2371b4242f46c38784bb26eb (patch) | |
tree | 44af56f5ad11fccdef8b63dd214b3df81e0f7aff | |
parent | 96f8e6568fd156c4cd90794a39432d64af8ba536 (diff) | |
download | platform_packages_apps_Car_Dialer-1e29cefbe65ca8aa2371b4242f46c38784bb26eb.tar.gz platform_packages_apps_Car_Dialer-1e29cefbe65ca8aa2371b4242f46c38784bb26eb.tar.bz2 platform_packages_apps_Car_Dialer-1e29cefbe65ca8aa2371b4242f46c38784bb26eb.zip |
Add config for disabling HUN fullscreen intent
Fix: 151770888
Test: Manual
Change-Id: I6d5bb9d82225addf5a7ece159dd019144892388a
-rw-r--r-- | res/values/configs.xml | 3 | ||||
-rw-r--r-- | src/com/android/car/dialer/notification/InCallNotificationController.java | 11 |
2 files changed, 13 insertions, 1 deletions
diff --git a/res/values/configs.xml b/res/values/configs.xml index c4f36714..e3ea6e67 100644 --- a/res/values/configs.xml +++ b/res/values/configs.xml @@ -47,6 +47,9 @@ <!-- Config gate the full screen incall ui --> <bool name="config_show_fullscreen_incall_ui">true</bool> + <!-- Config for enabling incoming call HUN fullscreen intent --> + <bool name="config_show_hun_fullscreen_incall_ui">true</bool> + <!-- A config determines whether to show type down list on Dialpad --> <bool name="config_show_type_down_list_on_dialpad">true</bool> <!-- A config determines whether to show user profile for input number only when type down is diff --git a/src/com/android/car/dialer/notification/InCallNotificationController.java b/src/com/android/car/dialer/notification/InCallNotificationController.java index d1cb5b0d..16ee9f6f 100644 --- a/src/com/android/car/dialer/notification/InCallNotificationController.java +++ b/src/com/android/car/dialer/notification/InCallNotificationController.java @@ -46,6 +46,8 @@ public final class InCallNotificationController { private static InCallNotificationController sInCallNotificationController; + private boolean mShowFullscreenIncallUi; + /** * Initialized a globally accessible {@link InCallNotificationController} which can be retrieved * by {@link #get}. If this function is called a second time before calling {@link #tearDown()}, @@ -85,6 +87,9 @@ public final class InCallNotificationController { private InCallNotificationController(Context context) { mContext = context; + + mShowFullscreenIncallUi = mContext.getResources().getBoolean( + R.bool.config_show_hun_fullscreen_incall_ui); mNotificationManager = (NotificationManager) mContext.getSystemService(Context.NOTIFICATION_SERVICE); @@ -116,8 +121,12 @@ public final class InCallNotificationController { String number = callDetail.getNumber(); String callId = call.getDetails().getTelecomCallId(); mActiveInCallNotifications.add(callId); + + if (mShowFullscreenIncallUi) { + mNotificationBuilder.setFullScreenIntent( + getFullscreenIntent(call), /* highPriority= */true); + } mNotificationBuilder - .setFullScreenIntent(getFullscreenIntent(call), /* highPriority= */true) .setLargeIcon((Icon) null) .setContentTitle(TelecomUtils.getBidiWrappedNumber(number)) .setActions( |