Add a mechanism to configure whether the summary should be set or not

Add a mechanism to customize whether the summary information in the
battery entry should be set or not. We can consider is as the extension
for the ag/18062824.

Bug: 220717612
Test: make RunSettingsRoboTests -j56 ROBOTEST_FILTER="com.android.settings.fuelgauge"
Change-Id: I3c21148d288f29ce65378f59f9086dab90c14a7b
This commit is contained in:
ykhung
2022-05-04 11:42:26 +08:00
parent 55d722c2b0
commit 3d1b6fd065
3 changed files with 22 additions and 3 deletions

View File

@@ -25,6 +25,7 @@ import android.util.ArraySet;
import android.util.SparseIntArray;
import com.android.internal.util.ArrayUtils;
import com.android.settings.R;
import com.android.settingslib.fuelgauge.Estimate;
import java.util.Map;
@@ -179,6 +180,7 @@ public class PowerUsageFeatureProviderImpl implements PowerUsageFeatureProvider
@Override
public CharSequence[] getHideApplicationSummary(Context context) {
return new CharSequence[0];
return context.getResources().getTextArray(
R.array.allowlist_hide_summary_in_battery_usage);
}
}