Add Log.wtf when getSummaryForAllUid NPEs.
This will provide stack trace information from the system process which should enable us to more easily track down where the crash is occurring. Test: Builds locally Bug: 33427276 Change-Id: I584a568fc038771afb28a534e2eefe2f763ed5e1
This commit is contained in:
@@ -553,15 +553,21 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
|
||||
@Override
|
||||
public NetworkStats getSummaryForAllUid(
|
||||
NetworkTemplate template, long start, long end, boolean includeTags) {
|
||||
@NetworkStatsAccess.Level int accessLevel = checkAccessLevel(mCallingPackage);
|
||||
final NetworkStats stats =
|
||||
getUidComplete().getSummary(template, start, end, accessLevel);
|
||||
if (includeTags) {
|
||||
final NetworkStats tagStats = getUidTagComplete()
|
||||
.getSummary(template, start, end, accessLevel);
|
||||
stats.combineAllValues(tagStats);
|
||||
try {
|
||||
@NetworkStatsAccess.Level int accessLevel = checkAccessLevel(mCallingPackage);
|
||||
final NetworkStats stats =
|
||||
getUidComplete().getSummary(template, start, end, accessLevel);
|
||||
if (includeTags) {
|
||||
final NetworkStats tagStats = getUidTagComplete()
|
||||
.getSummary(template, start, end, accessLevel);
|
||||
stats.combineAllValues(tagStats);
|
||||
}
|
||||
return stats;
|
||||
} catch (NullPointerException e) {
|
||||
// TODO: Track down and fix the cause of this crash and remove this catch block.
|
||||
Slog.wtf(TAG, "NullPointerException in getSummaryForAllUid", e);
|
||||
throw e;
|
||||
}
|
||||
return stats;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user