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

Commit b541f3c5 authored by Michael Wachenschwanz's avatar Michael Wachenschwanz Committed by Android (Google) Code Review
Browse files

Merge "Only start tracking usage on first activity resume"

parents bc05aa2e c790a296
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -493,6 +493,8 @@ public class UsageStatsService extends SystemService implements
            switch (event.mEventType) {
                case Event.ACTIVITY_RESUMED:
                    synchronized (mVisibleActivities) {
                        // check if this activity has already been resumed
                        if (mVisibleActivities.get(event.mInstanceId) != null) break;
                        mVisibleActivities.put(event.mInstanceId, event.getClassName());
                        try {
                            mAppTimeLimit.noteUsageStart(packageName, userId);