From 360cb671f2a735e219b2e9f28d52c31455691497 Mon Sep 17 00:00:00 2001 From: Angela Wang Date: Thu, 4 May 2023 08:56:17 +0000 Subject: [PATCH] Hides Flash Notifications illustration on tablet Since tablet illustrations are not yet finalized, we'll hide the Flash Notifications illustration on tablet for now. Bug: 280748155 Test: checks the UI on phone and tablet manually Change-Id: I5a309dec3291f3585cc1d9769e2465c94250fa7f --- res/xml/flash_notifications_settings.xml | 3 +- ...ationIllustrationPreferenceController.java | 46 +++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 src/com/android/settings/accessibility/FlashNotificationIllustrationPreferenceController.java diff --git a/res/xml/flash_notifications_settings.xml b/res/xml/flash_notifications_settings.xml index 63937b1a486..85cc2cb4d15 100644 --- a/res/xml/flash_notifications_settings.xml +++ b/res/xml/flash_notifications_settings.xml @@ -27,7 +27,8 @@ + settings:lottie_rawRes="@drawable/flash_notifications_illustration" + settings:controller="com.android.settings.accessibility.FlashNotificationIllustrationPreferenceController"/> productCharacteristics = new ArraySet<>(characteristicsSplit.length); + Collections.addAll(productCharacteristics, characteristicsSplit); + final boolean isTablet = productCharacteristics.contains("tablet"); + return isTablet ? UNSUPPORTED_ON_DEVICE : AVAILABLE; + } +}