Merge "Add support for null tag names from apps." into nyc-dev
am: 9a916e5
* commit '9a916e5602908f579ac846680270677c5a89e5a4':
Add support for null tag names from apps.
Change-Id: Iff0ce8b4faeb935e70ce9bef6fba322707e5aa7d
This commit is contained in:
@@ -1745,6 +1745,9 @@ public class BatteryStatsImpl extends BatteryStats {
|
||||
}
|
||||
|
||||
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 class BatteryStatsImpl extends BatteryStats {
|
||||
}
|
||||
|
||||
public T startObject(String name) {
|
||||
if (name == null) {
|
||||
name = "";
|
||||
}
|
||||
T obj = mMap.get(name);
|
||||
if (obj != null) {
|
||||
return obj;
|
||||
@@ -1825,6 +1831,9 @@ public class BatteryStatsImpl extends BatteryStats {
|
||||
}
|
||||
|
||||
public T stopObject(String name) {
|
||||
if (name == null) {
|
||||
name = "";
|
||||
}
|
||||
T obj = mMap.get(name);
|
||||
if (obj != null) {
|
||||
return obj;
|
||||
|
||||
Reference in New Issue
Block a user