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

Commit 38639443 authored by Nate Myren's avatar Nate Myren Committed by Automerger Merge Worker
Browse files

Merge "Enable process state change logs, when they result in uid state...

Merge "Enable process state change logs, when they result in uid state changes" into udc-dev am: 8f5595eb am: a96b4269

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/21732590



Change-Id: I04fd890b94500413e6f1a75078b002bfa3e8dc5f
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents b383d9b4 a96b4269
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -213,8 +213,6 @@ class AppOpsUidStateTrackerImpl implements AppOpsUidStateTracker {

    @Override
    public void updateUidProcState(int uid, int procState, int capability) {
        mEventLog.logUpdateUidProcState(uid, procState, capability);

        int uidState = processStateToUidState(procState);

        int prevUidState = mUidStates.get(uid, AppOpsManager.MIN_PRIORITY_UID_STATE);
@@ -226,6 +224,10 @@ class AppOpsUidStateTrackerImpl implements AppOpsUidStateTracker {
                && (uidState != prevUidState || capability != prevCapability))
                || (pendingStateCommitTime != 0
                && (uidState != pendingUidState || capability != pendingCapability))) {

            // If this process update results in a capability or uid state change, log it. It's
            // not interesting otherwise.
            mEventLog.logUpdateUidProcState(uid, procState, capability);
            mPendingUidStates.put(uid, uidState);
            mPendingCapability.put(uid, capability);

@@ -389,10 +391,8 @@ class AppOpsUidStateTrackerImpl implements AppOpsUidStateTracker {

    private static class EventLog {

        // These seems a bit too verbose and not as useful, turning off for now.
        // DCE should be able to remove most associated code.
        // Memory usage: 16 * size bytes
        private static final int UPDATE_UID_PROC_STATE_LOG_MAX_SIZE = 0;
        private static final int UPDATE_UID_PROC_STATE_LOG_MAX_SIZE = 200;
        // Memory usage: 20 * size bytes
        private static final int COMMIT_UID_STATE_LOG_MAX_SIZE = 200;
        // Memory usage: 24 * size bytes