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

Commit 31a82304 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Clear binder identity during network logging notification processing"...

Merge "Clear binder identity during network logging notification processing" into sc-dev am: 5002d711 am: 8250841a

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

Change-Id: I4f71b2751186e86ccd354c7746530b565c3089e7
parents 56a8be79 8250841a
Loading
Loading
Loading
Loading
+12 −12
Original line number Diff line number Diff line
@@ -14991,9 +14991,9 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
    }
    private void setNetworkLoggingActiveInternal(boolean active) {
        final boolean[] shouldSendNotification = new boolean[] {false};
        synchronized (getLockObject()) {
        mInjector.binderWithCleanCallingIdentity(() -> {
            boolean shouldSendNotification = false;
            synchronized (getLockObject()) {
                if (active) {
                    if (mNetworkLogger == null) {
                        final int affectedUserId = getNetworkLoggingAffectedUser();
@@ -15008,7 +15008,7 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
                                + " service not being available yet.");
                    }
                    maybePauseDeviceWideLoggingLocked();
                    shouldSendNotification[0] = shouldSendNetworkLoggingNotificationLocked();
                    shouldSendNotification = shouldSendNetworkLoggingNotificationLocked();
                } else {
                    if (mNetworkLogger != null && !mNetworkLogger.stopNetworkLogging()) {
                        Slogf.wtf(LOG_TAG, "Network logging could not be stopped due to the logging"
@@ -15016,15 +15016,15 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
                    }
                    mNetworkLogger = null;
                }
            });
            }
            if (active) {
            if (shouldSendNotification[0]) {
                if (shouldSendNotification) {
                    sendNetworkLoggingNotification();
                }
            } else {
                mInjector.getNotificationManager().cancel(SystemMessage.NOTE_NETWORK_LOGGING);
            }
        });
    }
    private @UserIdInt int getNetworkLoggingAffectedUser() {