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

Commit b979a308 authored by Vova Sharaienko's avatar Vova Sharaienko
Browse files

StatsPullAtomService: Fixed StrictMode warning

Added explicit app.usage.NetworkStats termination method call

Bug: 292369405
Test: build, flash & review the logcat
Change-Id: I2598e6141a44ba655acecfc0b1639278ee4d87a0
parent 6fdef471
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1421,6 +1421,7 @@ public class StatsPullAtomService extends SystemService {

        final NetworkStats nonTaggedStats =
                NetworkStatsUtils.fromPublicNetworkStats(queryNonTaggedStats);
        queryNonTaggedStats.close();
        if (!includeTags) return nonTaggedStats;

        final android.app.usage.NetworkStats queryTaggedStats =
@@ -1429,6 +1430,7 @@ public class StatsPullAtomService extends SystemService {
                        currentTimeInMillis);
        final NetworkStats taggedStats =
                NetworkStatsUtils.fromPublicNetworkStats(queryTaggedStats);
        queryTaggedStats.close();
        return nonTaggedStats.add(taggedStats);
    }