Merge "Fix NullPointerException in BatteryUsageStats" into sc-dev am: 8017f4ed5e
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14179252 Change-Id: I86d79adb20c4747763bcf6fc8158cd42088d5651
This commit is contained in:
@@ -6951,9 +6951,9 @@ public class BatteryStatsImpl extends BatteryStats {
|
||||
/**
|
||||
* Returns the names of custom power components.
|
||||
*/
|
||||
public @Nullable String[] getCustomPowerComponentNames() {
|
||||
public @NonNull String[] getCustomPowerComponentNames() {
|
||||
if (mGlobalMeasuredEnergyStats == null) {
|
||||
return null;
|
||||
return new String[0];
|
||||
}
|
||||
final String[] names = mGlobalMeasuredEnergyStats.getCustomBucketNames();
|
||||
for (int i = 0; i < names.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user