diff options
author | TreeHugger Robot <treehugger-gerrit@google.com> | 2020-06-19 22:22:42 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2020-06-19 22:22:42 +0000 |
commit | e393cb5115678d25cd209cc09f0665c895678af2 (patch) | |
tree | 67258e3d9b4a67c06a0dac37318977bce13f0f8f | |
parent | f3e63802822eab269837403917a816b2b98830b7 (diff) | |
parent | 78b48db994f041c3d408f2ad37810d75ab204132 (diff) | |
download | platform_packages_apps_Car_Dialer-e393cb5115678d25cd209cc09f0665c895678af2.tar.gz platform_packages_apps_Car_Dialer-e393cb5115678d25cd209cc09f0665c895678af2.tar.bz2 platform_packages_apps_Car_Dialer-e393cb5115678d25cd209cc09f0665c895678af2.zip |
Merge "Add config for disabling HUN fullscreen intent" into rvc-dev am: 78b48db994
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Car/Dialer/+/11902770
Change-Id: I534a036e8536340a9f7ee38ba9f1df925454f8dd
-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( |