Merge "Update language to comply with Android’s inclusive language guidance" into rvc-dev-plus-aosp am: ee4e5355bf am: 6a4d212454

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/12308260

Change-Id: I8438e462b052bd1e9ad2ca1e595d65f28f4eb146
This commit is contained in:
TreeHugger Robot
2020-08-05 20:15:35 +00:00
committed by Automerger Merge Worker
10 changed files with 88 additions and 85 deletions

View File

@@ -533,6 +533,8 @@
<!-- Defines the blacklist for system icons. That is to say, the icons in the status bar that <!-- Defines the blacklist for system icons. That is to say, the icons in the status bar that
are part of the blacklist are never displayed. Each item in the blacklist must be a string are part of the blacklist are never displayed. Each item in the blacklist must be a string
defined in core/res/res/config.xml to properly blacklist the icon. defined in core/res/res/config.xml to properly blacklist the icon.
TODO: See if we can rename this config variable.
--> -->
<string-array name="config_statusBarIconBlackList" translatable="false"> <string-array name="config_statusBarIconBlackList" translatable="false">
<item>@*android:string/status_bar_rotate</item> <item>@*android:string/status_bar_rotate</item>

View File

@@ -234,7 +234,7 @@ public class BatteryMeterView extends LinearLayout implements
} }
Dependency.get(TunerService.class) Dependency.get(TunerService.class)
.addTunable(this, StatusBarIconController.ICON_BLACKLIST); .addTunable(this, StatusBarIconController.ICON_HIDE_LIST);
mIsSubscribedForTunerUpdates = true; mIsSubscribedForTunerUpdates = true;
} }
@@ -287,8 +287,8 @@ public class BatteryMeterView extends LinearLayout implements
@Override @Override
public void onTuningChanged(String key, String newValue) { public void onTuningChanged(String key, String newValue) {
if (StatusBarIconController.ICON_BLACKLIST.equals(key)) { if (StatusBarIconController.ICON_HIDE_LIST.equals(key)) {
ArraySet<String> icons = StatusBarIconController.getIconBlacklist( ArraySet<String> icons = StatusBarIconController.getIconHideList(
getContext(), newValue); getContext(), newValue);
setVisibility(icons.contains(mSlotBattery) ? View.GONE : View.VISIBLE); setVisibility(icons.contains(mSlotBattery) ? View.GONE : View.VISIBLE);
} }

View File

@@ -83,15 +83,16 @@ public interface StatusBarIconController {
public void removeIcon(String slot, int tag); public void removeIcon(String slot, int tag);
public void removeAllIconsForSlot(String slot); public void removeAllIconsForSlot(String slot);
public static final String ICON_BLACKLIST = "icon_blacklist"; // TODO: See if we can rename this tunable name.
String ICON_HIDE_LIST = "icon_blacklist";
/** Reads the default blacklist from config value unless blacklistStr is provided. */ /** Reads the default hide list from config value unless hideListStr is provided. */
static ArraySet<String> getIconBlacklist(Context context, String blackListStr) { static ArraySet<String> getIconHideList(Context context, String hideListStr) {
ArraySet<String> ret = new ArraySet<>(); ArraySet<String> ret = new ArraySet<>();
String[] blacklist = blackListStr == null String[] hideList = hideListStr == null
? context.getResources().getStringArray(R.array.config_statusBarIconBlackList) ? context.getResources().getStringArray(R.array.config_statusBarIconBlackList)
: blackListStr.split(","); : hideListStr.split(",");
for (String slot : blacklist) { for (String slot : hideList) {
if (!TextUtils.isEmpty(slot)) { if (!TextUtils.isEmpty(slot)) {
ret.add(slot); ret.add(slot);
} }

View File

@@ -59,7 +59,7 @@ public class StatusBarIconControllerImpl extends StatusBarIconList implements Tu
private static final String TAG = "StatusBarIconController"; private static final String TAG = "StatusBarIconController";
private final ArrayList<IconManager> mIconGroups = new ArrayList<>(); private final ArrayList<IconManager> mIconGroups = new ArrayList<>();
private final ArraySet<String> mIconBlacklist = new ArraySet<>(); private final ArraySet<String> mIconHideList = new ArraySet<>();
// Points to light or dark context depending on the... context? // Points to light or dark context depending on the... context?
private Context mContext; private Context mContext;
@@ -79,7 +79,7 @@ public class StatusBarIconControllerImpl extends StatusBarIconList implements Tu
loadDimens(); loadDimens();
commandQueue.addCallback(this); commandQueue.addCallback(this);
Dependency.get(TunerService.class).addTunable(this, ICON_BLACKLIST); Dependency.get(TunerService.class).addTunable(this, ICON_HIDE_LIST);
} }
@Override @Override
@@ -89,12 +89,12 @@ public class StatusBarIconControllerImpl extends StatusBarIconList implements Tu
for (int i = 0; i < allSlots.size(); i++) { for (int i = 0; i < allSlots.size(); i++) {
Slot slot = allSlots.get(i); Slot slot = allSlots.get(i);
List<StatusBarIconHolder> holders = slot.getHolderListInViewOrder(); List<StatusBarIconHolder> holders = slot.getHolderListInViewOrder();
boolean blocked = mIconBlacklist.contains(slot.getName()); boolean hidden = mIconHideList.contains(slot.getName());
for (StatusBarIconHolder holder : holders) { for (StatusBarIconHolder holder : holders) {
int tag = holder.getTag(); int tag = holder.getTag();
int viewIndex = getViewIndex(getSlotIndex(slot.getName()), holder.getTag()); int viewIndex = getViewIndex(getSlotIndex(slot.getName()), holder.getTag());
group.onIconAdded(viewIndex, slot.getName(), blocked, holder); group.onIconAdded(viewIndex, slot.getName(), hidden, holder);
} }
} }
} }
@@ -107,11 +107,11 @@ public class StatusBarIconControllerImpl extends StatusBarIconList implements Tu
@Override @Override
public void onTuningChanged(String key, String newValue) { public void onTuningChanged(String key, String newValue) {
if (!ICON_BLACKLIST.equals(key)) { if (!ICON_HIDE_LIST.equals(key)) {
return; return;
} }
mIconBlacklist.clear(); mIconHideList.clear();
mIconBlacklist.addAll(StatusBarIconController.getIconBlacklist(mContext, newValue)); mIconHideList.addAll(StatusBarIconController.getIconHideList(mContext, newValue));
ArrayList<Slot> currentSlots = getSlots(); ArrayList<Slot> currentSlots = getSlots();
ArrayMap<Slot, List<StatusBarIconHolder>> slotsToReAdd = new ArrayMap<>(); ArrayMap<Slot, List<StatusBarIconHolder>> slotsToReAdd = new ArrayMap<>();
@@ -142,9 +142,9 @@ public class StatusBarIconControllerImpl extends StatusBarIconList implements Tu
private void addSystemIcon(int index, StatusBarIconHolder holder) { private void addSystemIcon(int index, StatusBarIconHolder holder) {
String slot = getSlotName(index); String slot = getSlotName(index);
int viewIndex = getViewIndex(index, holder.getTag()); int viewIndex = getViewIndex(index, holder.getTag());
boolean blocked = mIconBlacklist.contains(slot); boolean hidden = mIconHideList.contains(slot);
mIconGroups.forEach(l -> l.onIconAdded(viewIndex, slot, blocked, holder)); mIconGroups.forEach(l -> l.onIconAdded(viewIndex, slot, hidden, holder));
} }
@Override @Override

View File

@@ -52,12 +52,12 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba
private final SecurityController mSecurityController; private final SecurityController mSecurityController;
private final Handler mHandler = Handler.getMain(); private final Handler mHandler = Handler.getMain();
private boolean mBlockAirplane; private boolean mHideAirplane;
private boolean mBlockMobile; private boolean mHideMobile;
private boolean mBlockWifi; private boolean mHideWifi;
private boolean mBlockEthernet; private boolean mHideEthernet;
private boolean mActivityEnabled; private boolean mActivityEnabled;
private boolean mForceBlockWifi; private boolean mForceHideWifi;
// Track as little state as possible, and only for padding purposes // Track as little state as possible, and only for padding purposes
private boolean mIsAirplaneMode = false; private boolean mIsAirplaneMode = false;
@@ -80,7 +80,7 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba
mNetworkController = Dependency.get(NetworkController.class); mNetworkController = Dependency.get(NetworkController.class);
mSecurityController = Dependency.get(SecurityController.class); mSecurityController = Dependency.get(SecurityController.class);
Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_BLACKLIST); Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_HIDE_LIST);
mNetworkController.addCallback(this); mNetworkController.addCallback(this);
mSecurityController.addCallback(this); mSecurityController.addCallback(this);
} }
@@ -114,21 +114,21 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba
@Override @Override
public void onTuningChanged(String key, String newValue) { public void onTuningChanged(String key, String newValue) {
if (!StatusBarIconController.ICON_BLACKLIST.equals(key)) { if (!StatusBarIconController.ICON_HIDE_LIST.equals(key)) {
return; return;
} }
ArraySet<String> blockList = StatusBarIconController.getIconBlacklist(mContext, newValue); ArraySet<String> hideList = StatusBarIconController.getIconHideList(mContext, newValue);
boolean blockAirplane = blockList.contains(mSlotAirplane); boolean hideAirplane = hideList.contains(mSlotAirplane);
boolean blockMobile = blockList.contains(mSlotMobile); boolean hideMobile = hideList.contains(mSlotMobile);
boolean blockWifi = blockList.contains(mSlotWifi); boolean hideWifi = hideList.contains(mSlotWifi);
boolean blockEthernet = blockList.contains(mSlotEthernet); boolean hideEthernet = hideList.contains(mSlotEthernet);
if (blockAirplane != mBlockAirplane || blockMobile != mBlockMobile if (hideAirplane != mHideAirplane || hideMobile != mHideMobile
|| blockEthernet != mBlockEthernet || blockWifi != mBlockWifi) { || hideEthernet != mHideEthernet || hideWifi != mHideWifi) {
mBlockAirplane = blockAirplane; mHideAirplane = hideAirplane;
mBlockMobile = blockMobile; mHideMobile = hideMobile;
mBlockEthernet = blockEthernet; mHideEthernet = hideEthernet;
mBlockWifi = blockWifi || mForceBlockWifi; mHideWifi = hideWifi || mForceHideWifi;
// Re-register to get new callbacks. // Re-register to get new callbacks.
mNetworkController.removeCallback(this); mNetworkController.removeCallback(this);
mNetworkController.addCallback(this); mNetworkController.addCallback(this);
@@ -140,7 +140,7 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba
boolean activityIn, boolean activityOut, String description, boolean isTransient, boolean activityIn, boolean activityOut, String description, boolean isTransient,
String statusLabel) { String statusLabel) {
boolean visible = statusIcon.visible && !mBlockWifi; boolean visible = statusIcon.visible && !mHideWifi;
boolean in = activityIn && mActivityEnabled && visible; boolean in = activityIn && mActivityEnabled && visible;
boolean out = activityOut && mActivityEnabled && visible; boolean out = activityOut && mActivityEnabled && visible;
@@ -189,7 +189,7 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba
// Visibility of the data type indicator changed // Visibility of the data type indicator changed
boolean typeChanged = statusType != state.typeId && (statusType == 0 || state.typeId == 0); boolean typeChanged = statusType != state.typeId && (statusType == 0 || state.typeId == 0);
state.visible = statusIcon.visible && !mBlockMobile; state.visible = statusIcon.visible && !mHideMobile;
state.strengthId = statusIcon.icon; state.strengthId = statusIcon.icon;
state.typeId = statusType; state.typeId = statusType;
state.contentDescription = statusIcon.contentDescription; state.contentDescription = statusIcon.contentDescription;
@@ -270,7 +270,7 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba
@Override @Override
public void setEthernetIndicators(IconState state) { public void setEthernetIndicators(IconState state) {
boolean visible = state.visible && !mBlockEthernet; boolean visible = state.visible && !mHideEthernet;
int resId = state.icon; int resId = state.icon;
String description = state.contentDescription; String description = state.contentDescription;
@@ -284,7 +284,7 @@ public class StatusBarSignalPolicy implements NetworkControllerImpl.SignalCallba
@Override @Override
public void setIsAirplaneMode(IconState icon) { public void setIsAirplaneMode(IconState icon) {
mIsAirplaneMode = icon.visible && !mBlockAirplane; mIsAirplaneMode = icon.visible && !mHideAirplane;
int resId = icon.icon; int resId = icon.icon;
String description = icon.contentDescription; String description = icon.contentDescription;

View File

@@ -191,7 +191,7 @@ public class Clock extends TextView implements DemoMode, Tunable, CommandQueue.C
mBroadcastDispatcher.registerReceiverWithHandler(mIntentReceiver, filter, mBroadcastDispatcher.registerReceiverWithHandler(mIntentReceiver, filter,
Dependency.get(Dependency.TIME_TICK_HANDLER), UserHandle.ALL); Dependency.get(Dependency.TIME_TICK_HANDLER), UserHandle.ALL);
Dependency.get(TunerService.class).addTunable(this, CLOCK_SECONDS, Dependency.get(TunerService.class).addTunable(this, CLOCK_SECONDS,
StatusBarIconController.ICON_BLACKLIST); StatusBarIconController.ICON_HIDE_LIST);
mCommandQueue.addCallback(this); mCommandQueue.addCallback(this);
if (mShowDark) { if (mShowDark) {
Dependency.get(DarkIconDispatcher.class).addDarkReceiver(this); Dependency.get(DarkIconDispatcher.class).addDarkReceiver(this);
@@ -305,8 +305,8 @@ public class Clock extends TextView implements DemoMode, Tunable, CommandQueue.C
if (CLOCK_SECONDS.equals(key)) { if (CLOCK_SECONDS.equals(key)) {
mShowSeconds = TunerService.parseIntegerSwitch(newValue, false); mShowSeconds = TunerService.parseIntegerSwitch(newValue, false);
updateShowSeconds(); updateShowSeconds();
} else { } else if (StatusBarIconController.ICON_HIDE_LIST.equals(key)) {
setClockVisibleByUser(!StatusBarIconController.getIconBlacklist(getContext(), newValue) setClockVisibleByUser(!StatusBarIconController.getIconHideList(getContext(), newValue)
.contains("clock")); .contains("clock"));
updateClockVisibility(); updateClockVisibility();
} }

View File

@@ -38,7 +38,7 @@ public class BatteryPreference extends DropDownPreference implements TunerServic
private final String mBattery; private final String mBattery;
private boolean mBatteryEnabled; private boolean mBatteryEnabled;
private boolean mHasPercentage; private boolean mHasPercentage;
private ArraySet<String> mBlacklist; private ArraySet<String> mHideList;
private boolean mHasSetValue; private boolean mHasSetValue;
public BatteryPreference(Context context, AttributeSet attrs) { public BatteryPreference(Context context, AttributeSet attrs) {
@@ -52,7 +52,7 @@ public class BatteryPreference extends DropDownPreference implements TunerServic
super.onAttached(); super.onAttached();
mHasPercentage = Settings.System.getInt(getContext().getContentResolver(), mHasPercentage = Settings.System.getInt(getContext().getContentResolver(),
SHOW_BATTERY_PERCENT, 0) != 0; SHOW_BATTERY_PERCENT, 0) != 0;
Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_BLACKLIST); Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_HIDE_LIST);
} }
@Override @Override
@@ -63,9 +63,9 @@ public class BatteryPreference extends DropDownPreference implements TunerServic
@Override @Override
public void onTuningChanged(String key, String newValue) { public void onTuningChanged(String key, String newValue) {
if (StatusBarIconController.ICON_BLACKLIST.equals(key)) { if (StatusBarIconController.ICON_HIDE_LIST.equals(key)) {
mBlacklist = StatusBarIconController.getIconBlacklist(getContext(), newValue); mHideList = StatusBarIconController.getIconHideList(getContext(), newValue);
mBatteryEnabled = !mBlacklist.contains(mBattery); mBatteryEnabled = !mHideList.contains(mBattery);
} }
if (!mHasSetValue) { if (!mHasSetValue) {
// Because of the complicated tri-state it can end up looping and setting state back to // Because of the complicated tri-state it can end up looping and setting state back to
@@ -88,12 +88,12 @@ public class BatteryPreference extends DropDownPreference implements TunerServic
MetricsLogger.action(getContext(), MetricsEvent.TUNER_BATTERY_PERCENTAGE, v); MetricsLogger.action(getContext(), MetricsEvent.TUNER_BATTERY_PERCENTAGE, v);
Settings.System.putInt(getContext().getContentResolver(), SHOW_BATTERY_PERCENT, v ? 1 : 0); Settings.System.putInt(getContext().getContentResolver(), SHOW_BATTERY_PERCENT, v ? 1 : 0);
if (DISABLED.equals(value)) { if (DISABLED.equals(value)) {
mBlacklist.add(mBattery); mHideList.add(mBattery);
} else { } else {
mBlacklist.remove(mBattery); mHideList.remove(mBattery);
} }
Dependency.get(TunerService.class).setValue(StatusBarIconController.ICON_BLACKLIST, Dependency.get(TunerService.class).setValue(StatusBarIconController.ICON_HIDE_LIST,
TextUtils.join(",", mBlacklist)); TextUtils.join(",", mHideList));
return true; return true;
} }
} }

View File

@@ -33,7 +33,7 @@ public class ClockPreference extends DropDownPreference implements TunerService.
private final String mClock; private final String mClock;
private boolean mClockEnabled; private boolean mClockEnabled;
private boolean mHasSeconds; private boolean mHasSeconds;
private ArraySet<String> mBlacklist; private ArraySet<String> mHideList;
private boolean mHasSetValue; private boolean mHasSetValue;
private boolean mReceivedSeconds; private boolean mReceivedSeconds;
private boolean mReceivedClock; private boolean mReceivedClock;
@@ -47,7 +47,7 @@ public class ClockPreference extends DropDownPreference implements TunerService.
@Override @Override
public void onAttached() { public void onAttached() {
super.onAttached(); super.onAttached();
Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_BLACKLIST, Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_HIDE_LIST,
Clock.CLOCK_SECONDS); Clock.CLOCK_SECONDS);
} }
@@ -59,10 +59,10 @@ public class ClockPreference extends DropDownPreference implements TunerService.
@Override @Override
public void onTuningChanged(String key, String newValue) { public void onTuningChanged(String key, String newValue) {
if (StatusBarIconController.ICON_BLACKLIST.equals(key)) { if (StatusBarIconController.ICON_HIDE_LIST.equals(key)) {
mReceivedClock = true; mReceivedClock = true;
mBlacklist = StatusBarIconController.getIconBlacklist(getContext(), newValue); mHideList = StatusBarIconController.getIconHideList(getContext(), newValue);
mClockEnabled = !mBlacklist.contains(mClock); mClockEnabled = !mHideList.contains(mClock);
} else if (Clock.CLOCK_SECONDS.equals(key)) { } else if (Clock.CLOCK_SECONDS.equals(key)) {
mReceivedSeconds = true; mReceivedSeconds = true;
mHasSeconds = newValue != null && Integer.parseInt(newValue) != 0; mHasSeconds = newValue != null && Integer.parseInt(newValue) != 0;
@@ -87,12 +87,12 @@ public class ClockPreference extends DropDownPreference implements TunerService.
Dependency.get(TunerService.class).setValue(Clock.CLOCK_SECONDS, SECONDS.equals(value) ? 1 Dependency.get(TunerService.class).setValue(Clock.CLOCK_SECONDS, SECONDS.equals(value) ? 1
: 0); : 0);
if (DISABLED.equals(value)) { if (DISABLED.equals(value)) {
mBlacklist.add(mClock); mHideList.add(mClock);
} else { } else {
mBlacklist.remove(mClock); mHideList.remove(mClock);
} }
Dependency.get(TunerService.class).setValue(StatusBarIconController.ICON_BLACKLIST, Dependency.get(TunerService.class).setValue(StatusBarIconController.ICON_HIDE_LIST,
TextUtils.join(",", mBlacklist)); TextUtils.join(",", mHideList));
return true; return true;
} }
} }

View File

@@ -34,7 +34,7 @@ import java.util.Set;
public class StatusBarSwitch extends SwitchPreference implements Tunable { public class StatusBarSwitch extends SwitchPreference implements Tunable {
private Set<String> mBlacklist; private Set<String> mHideList;
public StatusBarSwitch(Context context, AttributeSet attrs) { public StatusBarSwitch(Context context, AttributeSet attrs) {
super(context, attrs); super(context, attrs);
@@ -43,7 +43,7 @@ public class StatusBarSwitch extends SwitchPreference implements Tunable {
@Override @Override
public void onAttached() { public void onAttached() {
super.onAttached(); super.onAttached();
Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_BLACKLIST); Dependency.get(TunerService.class).addTunable(this, StatusBarIconController.ICON_HIDE_LIST);
} }
@Override @Override
@@ -54,35 +54,35 @@ public class StatusBarSwitch extends SwitchPreference implements Tunable {
@Override @Override
public void onTuningChanged(String key, String newValue) { public void onTuningChanged(String key, String newValue) {
if (!StatusBarIconController.ICON_BLACKLIST.equals(key)) { if (!StatusBarIconController.ICON_HIDE_LIST.equals(key)) {
return; return;
} }
mBlacklist = StatusBarIconController.getIconBlacklist(getContext(), newValue); mHideList = StatusBarIconController.getIconHideList(getContext(), newValue);
setChecked(!mBlacklist.contains(getKey())); setChecked(!mHideList.contains(getKey()));
} }
@Override @Override
protected boolean persistBoolean(boolean value) { protected boolean persistBoolean(boolean value) {
if (!value) { if (!value) {
// If not enabled add to blacklist. // If not enabled add to hideList.
if (!mBlacklist.contains(getKey())) { if (!mHideList.contains(getKey())) {
MetricsLogger.action(getContext(), MetricsEvent.TUNER_STATUS_BAR_DISABLE, MetricsLogger.action(getContext(), MetricsEvent.TUNER_STATUS_BAR_DISABLE,
getKey()); getKey());
mBlacklist.add(getKey()); mHideList.add(getKey());
setList(mBlacklist); setList(mHideList);
} }
} else { } else {
if (mBlacklist.remove(getKey())) { if (mHideList.remove(getKey())) {
MetricsLogger.action(getContext(), MetricsEvent.TUNER_STATUS_BAR_ENABLE, getKey()); MetricsLogger.action(getContext(), MetricsEvent.TUNER_STATUS_BAR_ENABLE, getKey());
setList(mBlacklist); setList(mHideList);
} }
} }
return true; return true;
} }
private void setList(Set<String> blacklist) { private void setList(Set<String> hideList) {
ContentResolver contentResolver = getContext().getContentResolver(); ContentResolver contentResolver = getContext().getContentResolver();
Settings.Secure.putStringForUser(contentResolver, StatusBarIconController.ICON_BLACKLIST, Settings.Secure.putStringForUser(contentResolver, StatusBarIconController.ICON_HIDE_LIST,
TextUtils.join(",", blacklist), ActivityManager.getCurrentUser()); TextUtils.join(",", hideList), ActivityManager.getCurrentUser());
} }
} }

View File

@@ -60,7 +60,7 @@ public class TunerServiceImpl extends TunerService {
// Things that use the tunable infrastructure but are now real user settings and // Things that use the tunable infrastructure but are now real user settings and
// shouldn't be reset with tuner settings. // shouldn't be reset with tuner settings.
private static final String[] RESET_BLACKLIST = new String[] { private static final String[] RESET_EXCEPTION_LIST = new String[] {
QSTileHost.TILES_SETTING, QSTileHost.TILES_SETTING,
Settings.Secure.DOZE_ALWAYS_ON, Settings.Secure.DOZE_ALWAYS_ON,
Settings.Secure.MEDIA_CONTROLS_RESUME Settings.Secure.MEDIA_CONTROLS_RESUME
@@ -116,17 +116,17 @@ public class TunerServiceImpl extends TunerService {
private void upgradeTuner(int oldVersion, int newVersion, Handler mainHandler) { private void upgradeTuner(int oldVersion, int newVersion, Handler mainHandler) {
if (oldVersion < 1) { if (oldVersion < 1) {
String blacklistStr = getValue(StatusBarIconController.ICON_BLACKLIST); String hideListStr = getValue(StatusBarIconController.ICON_HIDE_LIST);
if (blacklistStr != null) { if (hideListStr != null) {
ArraySet<String> iconBlacklist = ArraySet<String> iconHideList =
StatusBarIconController.getIconBlacklist(mContext, blacklistStr); StatusBarIconController.getIconHideList(mContext, hideListStr);
iconBlacklist.add("rotate"); iconHideList.add("rotate");
iconBlacklist.add("headset"); iconHideList.add("headset");
Settings.Secure.putStringForUser(mContentResolver, Settings.Secure.putStringForUser(mContentResolver,
StatusBarIconController.ICON_BLACKLIST, StatusBarIconController.ICON_HIDE_LIST,
TextUtils.join(",", iconBlacklist), mCurrentUser); TextUtils.join(",", iconHideList), mCurrentUser);
} }
} }
if (oldVersion < 2) { if (oldVersion < 2) {
@@ -251,7 +251,7 @@ public class TunerServiceImpl extends TunerService {
mContext.sendBroadcast(intent); mContext.sendBroadcast(intent);
for (String key : mTunableLookup.keySet()) { for (String key : mTunableLookup.keySet()) {
if (ArrayUtils.contains(RESET_BLACKLIST, key)) { if (ArrayUtils.contains(RESET_EXCEPTION_LIST, key)) {
continue; continue;
} }
Settings.Secure.putStringForUser(mContentResolver, key, null, user); Settings.Secure.putStringForUser(mContentResolver, key, null, user);