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

Commit 974da210 authored by mrulhania's avatar mrulhania Committed by Manjeet Rulhania
Browse files

Add only access events to discrete accesses in getHistoricalOps API

Fix: 442502806
Test: atest HistoricalRegistryTest
Flag: EXEMPT bug fix
Change-Id: I486871119a8e3cc1c7d69b314d4b59243427cdf1
parent 003b2bc6
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -193,11 +193,14 @@ public class AppOpHistoryHelper {
                }
            }
            if (includeDiscreteEvents) {
                // Discrete accesses doesn't include rejected events.
                if (event.totalAccessCount() > 0) {
                    result.addDiscreteAccess(event.opCode(), event.uid(), event.packageName(),
                            event.attributionTag(), event.uidState(), event.opFlags(),
                            discretizeTimestamp(event.accessTimeMillis()),
                            discretizeDuration(event.durationMillis()), proxy);
                }
            }
            if ((historyFlags & HISTORY_FLAG_AGGREGATE) != 0) {
                addAppOpAccessEventToHistoricalOps(result, event);
            }