Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 39583b53 authored by Jeff Davidson's avatar Jeff Davidson
Browse files

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
parent 2c0dc3e0
Loading
Loading
Loading
Loading
+14 −8
Original line number Diff line number Diff line
@@ -553,6 +553,7 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
            @Override
            public NetworkStats getSummaryForAllUid(
                    NetworkTemplate template, long start, long end, boolean includeTags) {
                try {
                    @NetworkStatsAccess.Level int accessLevel = checkAccessLevel(mCallingPackage);
                    final NetworkStats stats =
                            getUidComplete().getSummary(template, start, end, accessLevel);
@@ -562,6 +563,11 @@ public class NetworkStatsService extends INetworkStatsService.Stub {
                        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;
                }
            }

            @Override