Android8.1隐藏状态栏电池图标
将下述程序段中最后一行的 VISIBLE 改为 GONE
frameworks/base/packages/SystemUI/src/com/android/systemui/BatteryMeterView.java
@Override
public void onTuningChanged(String key, String newValue) {
if (StatusBarIconController.ICON_BLACKLIST.equals(key)) {
ArraySet icons = StatusBarIconController.getIconBlacklist(newValue);
boolean hidden = icons.contains(mSlotBattery);
Dependency.get(IconLogger.class).onIconVisibility(mSlotBattery, !hidden);
//setVisibility(hidden ? View.GONE : View.VISIBLE);
setVisibility(hidden ? View.GONE : View.GONE);
}
}