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

Commit a785b805 authored by LuK1337's avatar LuK1337
Browse files

StatusBarSettings: Improve clock icon blacklist handling

* Apparently it is possible to have something with
  'clock' in name that will prevent clock settings
  from showing up. Splitting icon blacklist by ","
  fixes this issue.

Change-Id: Ia2a888401bc0c60b5c3afda07fbcde7c8b1b4309
parent 897fba58
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@ import android.support.v7.preference.PreferenceCategory;
import android.support.v7.preference.PreferenceScreen;
import android.support.v7.preference.Preference.OnPreferenceChangeListener;
import android.text.format.DateFormat;
import android.text.TextUtils;
import android.view.View;

import lineageos.preference.LineageSystemSettingListPreference;
@@ -95,7 +96,7 @@ public class StatusBarSettings extends SettingsPreferenceFragment
        final String curIconBlacklist = Settings.Secure.getString(getContext().getContentResolver(),
                ICON_BLACKLIST);

        if (curIconBlacklist != null && curIconBlacklist.contains("clock")) {
        if (TextUtils.delimitedStringContains(curIconBlacklist, ',', "clock")) {
            getPreferenceScreen().removePreference(mStatusBarClockCategory);
        } else {
            getPreferenceScreen().addPreference(mStatusBarClockCategory);