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

Commit a8e2e605 authored by Christopher Morin's avatar Christopher Morin Committed by Android (Google) Code Review
Browse files

Merge "Drop binder calling identity before updating device stats"

parents 0a93f761 55297003
Loading
Loading
Loading
Loading
+16 −9
Original line number Diff line number Diff line
@@ -20642,6 +20642,9 @@ public class ActivityManagerService extends IActivityManager.Stub
        // Has the UID or resumed package name changed?
        if (uid != mCurResumedUid || (pkg != mCurResumedPackage
                && (pkg == null || !pkg.equals(mCurResumedPackage)))) {
            final long identity = Binder.clearCallingIdentity();
            try {
                if (mCurResumedPackage != null) {
                    mBatteryStatsService.noteEvent(BatteryStats.HistoryItem.EVENT_TOP_FINISH,
                            mCurResumedPackage, mCurResumedUid);
@@ -20652,6 +20655,10 @@ public class ActivityManagerService extends IActivityManager.Stub
                    mBatteryStatsService.noteEvent(BatteryStats.HistoryItem.EVENT_TOP_START,
                            mCurResumedPackage, mCurResumedUid);
                }
            } finally {
                Binder.restoreCallingIdentity(identity);
            }
        }
        return act;
    }