Bubble settings: feature, notification, app

* Removed setting from developer options
* Removed bubble settings from normal notifications /
  channels

* Feature available via notification setting
* Feature screen with educational gif

* App level is now a tri-state choice of all / selected /
  none
* App level bubble controls are accessible top-level in
  app notifications

Test: make -j40 RunSettingsRoboTests ROBOTEST_FILTER="Bubble"
Bug: 138116133
Change-Id: Id103e9d3717fdc9b86a916be40c43cda9c35ac34
This commit is contained in:
Mady Mellor
2020-03-05 18:31:39 -08:00
parent 23040a3b2b
commit 409c3dfe68
29 changed files with 1183 additions and 411 deletions

View File

@@ -22,6 +22,10 @@ import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import androidx.preference.Preference;
import androidx.preference.PreferenceGroup;
import androidx.preference.PreferenceScreen;
import com.android.internal.widget.LockPatternUtils;
import com.android.settings.R;
import com.android.settingslib.core.AbstractPreferenceController;
@@ -29,10 +33,6 @@ import com.android.settingslib.core.AbstractPreferenceController;
import java.util.ArrayList;
import java.util.List;
import androidx.preference.Preference;
import androidx.preference.PreferenceGroup;
import androidx.preference.PreferenceScreen;
/** These settings are per app, so should not be returned in global search results. */
public class AppNotificationSettings extends NotificationSettings {
private static final String TAG = "AppNotificationSettings";
@@ -41,8 +41,7 @@ public class AppNotificationSettings extends NotificationSettings {
private static String KEY_ADVANCED_CATEGORY = "app_advanced";
private static String KEY_BADGE = "badge";
private static String KEY_APP_LINK = "app_link";
private static String KEY_BUBBLE = "bubble_link_pref";
private static String[] LEGACY_NON_ADVANCED_KEYS = {KEY_BADGE, KEY_APP_LINK, KEY_BUBBLE};
private static String[] LEGACY_NON_ADVANCED_KEYS = {KEY_BADGE, KEY_APP_LINK};
@Override
public int getMetricsCategory() {
@@ -121,9 +120,9 @@ public class AppNotificationSettings extends NotificationSettings {
mControllers.add(new DescriptionPreferenceController(context));
mControllers.add(new NotificationsOffPreferenceController(context));
mControllers.add(new DeletedChannelsPreferenceController(context, mBackend));
mControllers.add(new BubbleSummaryPreferenceController(context, mBackend));
mControllers.add(new ChannelListPreferenceController(context, mBackend));
mControllers.add(new AppConversationListPreferenceController(context, mBackend));
mControllers.add(new BubbleSummaryPreferenceController(context, mBackend));
return new ArrayList<>(mControllers);
}
}