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

Commit 84b062e9 authored by Matt Gilbride's avatar Matt Gilbride Committed by Android (Google) Code Review
Browse files

Merge "ProcessStatsService - call PermissionEnforcer helper on methods...

Merge "ProcessStatsService - call PermissionEnforcer helper on methods annotated with @EnforcePermission"
parents 059b3162 dbecd4db
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -567,6 +567,8 @@ public final class ProcessStatsService extends IProcessStats.Stub {
    @android.annotation.EnforcePermission(android.Manifest.permission.PACKAGE_USAGE_STATS)
    @Override
    public byte[] getCurrentStats(List<ParcelFileDescriptor> historic) {
        super.getCurrentStats_enforcePermission();

        Parcel current = Parcel.obtain();
        synchronized (mLock) {
            long now = SystemClock.uptimeMillis();
@@ -623,6 +625,8 @@ public final class ProcessStatsService extends IProcessStats.Stub {
    public long getCommittedStatsMerged(long highWaterMarkMs, int section, boolean doAggregate,
            List<ParcelFileDescriptor> committedStats, ProcessStats mergedStats) {

        super.getCommittedStatsMerged_enforcePermission();

        long newHighWaterMark = highWaterMarkMs;
        mFileLock.lock();
        try {
@@ -709,6 +713,8 @@ public final class ProcessStatsService extends IProcessStats.Stub {
    @android.annotation.EnforcePermission(android.Manifest.permission.PACKAGE_USAGE_STATS)
    @Override
    public ParcelFileDescriptor getStatsOverTime(long minTime) {
        super.getStatsOverTime_enforcePermission();

        Parcel current = Parcel.obtain();
        long curTime;
        synchronized (mLock) {