Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 78c4e70c authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Use | not ,

To match similar APIs

Test: Settings unit
Bug: 181175697
Change-Id: I2ef56528da7a3d5b2c96be8ecfad1a3d6590bbe4
parent 3d867d50
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ public abstract class TypeFilterPreferenceController extends BasePreferenceContr
        PreferenceControllerMixin, Preference.OnPreferenceChangeListener {

    private static final String TAG = "TypeFilterPrefCntlr";
    private static final String XML_SEPARATOR = ",";
    private static final String FLAG_SEPARATOR = "\\|";

    private ComponentName mCn;
    private int mUserId;
@@ -132,7 +132,7 @@ public abstract class TypeFilterPreferenceController extends BasePreferenceContr
                        NotificationListenerService.META_DATA_DISABLED_FILTER_TYPES).toString();
                if (typeList != null) {
                    int types = 0;
                    String[] typeStrings = typeList.split(XML_SEPARATOR);
                    String[] typeStrings = typeList.split(FLAG_SEPARATOR);
                    for (int i = 0; i < typeStrings.length; i++) {
                        final String typeString = typeStrings[i];
                        if (TextUtils.isEmpty(typeString)) {
+3 −3
Original line number Diff line number Diff line
@@ -152,7 +152,7 @@ public class TypeFilterPreferenceControllerTest {
    public void updateState_enabled_metaData_disableFilter_notThisField() {
        mSi.metaData = new Bundle();
        mSi.metaData.putCharSequence(NotificationListenerService.META_DATA_DISABLED_FILTER_TYPES, 
                "1,alerting");
                "1|alerting");
        when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(true);
        when(mNm.getListenerFilter(mCn, 0)).thenReturn(new NotificationListenerFilter());
        CheckBoxPreference pref = new CheckBoxPreference(mContext);
@@ -165,7 +165,7 @@ public class TypeFilterPreferenceControllerTest {
    public void updateState_enabled_metaData_disableFilter_thisField_stateIsChecked() {
        mSi.metaData = new Bundle();
        mSi.metaData.putCharSequence(NotificationListenerService.META_DATA_DISABLED_FILTER_TYPES,
                "conversations,2,32");
                "conversations|2|32");
        when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(true);
        when(mNm.getListenerFilter(mCn, 0)).thenReturn(
                new NotificationListenerFilter(32, new ArraySet<>()));
@@ -189,7 +189,7 @@ public class TypeFilterPreferenceControllerTest {
    public void updateState_disabled_metaData_disableFilter_thisField_stateIsNotChecked() {
        mSi.metaData = new Bundle();
        mSi.metaData.putCharSequence(NotificationListenerService.META_DATA_DISABLED_FILTER_TYPES,
                "1,2,32");
                "1|2|32");
        when(mNm.isNotificationListenerAccessGranted(mCn)).thenReturn(true);
        NotificationListenerFilter before = new NotificationListenerFilter(4, new ArraySet<>());
        when(mNm.getListenerFilter(mCn, 0)).thenReturn(before);