Merge "Add support for null tag names from apps." into nyc-dev
diff --git a/core/java/com/android/internal/os/BatteryStatsImpl.java b/core/java/com/android/internal/os/BatteryStatsImpl.java
index bbefcb5..10afdb8 100644
--- a/core/java/com/android/internal/os/BatteryStatsImpl.java
+++ b/core/java/com/android/internal/os/BatteryStatsImpl.java
@@ -1745,6 +1745,9 @@
}
public void add(String name, T obj) {
+ if (name == null) {
+ name = "";
+ }
mMap.put(name, obj);
if (OVERFLOW_NAME.equals(name)) {
mCurOverflow = obj;
@@ -1776,6 +1779,9 @@
}
public T startObject(String name) {
+ if (name == null) {
+ name = "";
+ }
T obj = mMap.get(name);
if (obj != null) {
return obj;
@@ -1825,6 +1831,9 @@
}
public T stopObject(String name) {
+ if (name == null) {
+ name = "";
+ }
T obj = mMap.get(name);
if (obj != null) {
return obj;