summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2020-06-19 22:06:28 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2020-06-19 22:06:28 +0000
commit78b48db994f041c3d408f2ad37810d75ab204132 (patch)
tree1faec9ea3933ae72bb29f12b8f6aefa1a93e132a
parent56e26091f6213f64cc19e3ef89d5dc717a91ea24 (diff)
parent1e29cefbe65ca8aa2371b4242f46c38784bb26eb (diff)
downloadDialer-78b48db994f041c3d408f2ad37810d75ab204132.tar.gz
Merge "Add config for disabling HUN fullscreen intent" into rvc-dev
-rw-r--r--res/values/configs.xml3
-rw-r--r--src/com/android/car/dialer/notification/InCallNotificationController.java11
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(