Don't show bubble settings when framework doesn't support it

Some devices don't support bubbles by configuring config_supportsBubble
value. When the value is set false, it doesn't make sense to show bubble
related preferences.

This CL disables showing bubble preferences when device doesn't support
it.

Bug: 274711609
Test: Set config_supportsBubble false, and check UI.
Test: m -j80 RunSettingsRoboTests ROBOTEST_FILTER="Bubble"
Change-Id: I670ad2a9e243819ea014e5e1ddb9d62ad76d2168
This commit is contained in:
Hiroki Sato
2023-05-02 12:13:50 +09:00
parent 2095c5c5e9
commit e44848cdce
9 changed files with 88 additions and 70 deletions

View File

@@ -25,8 +25,8 @@ import static android.app.NotificationManager.IMPORTANCE_LOW;
import static android.app.NotificationManager.IMPORTANCE_NONE;
import static android.provider.Settings.Secure.NOTIFICATION_BUBBLES;
import static com.android.settings.notification.app.BubblePreferenceController.SYSTEM_WIDE_OFF;
import static com.android.settings.notification.app.BubblePreferenceController.SYSTEM_WIDE_ON;
import static com.android.settings.notification.BubbleHelper.SYSTEM_WIDE_OFF;
import static com.android.settings.notification.BubbleHelper.SYSTEM_WIDE_ON;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;

View File

@@ -23,8 +23,8 @@ import static android.app.NotificationManager.BUBBLE_PREFERENCE_SELECTED;
import static android.app.NotificationManager.IMPORTANCE_HIGH;
import static android.provider.Settings.Secure.NOTIFICATION_BUBBLES;
import static com.android.settings.notification.app.BubblePreferenceController.SYSTEM_WIDE_OFF;
import static com.android.settings.notification.app.BubblePreferenceController.SYSTEM_WIDE_ON;
import static com.android.settings.notification.BubbleHelper.SYSTEM_WIDE_OFF;
import static com.android.settings.notification.BubbleHelper.SYSTEM_WIDE_ON;
import static junit.framework.TestCase.assertEquals;