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

Commit 1bb56469 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Remove unneccessary locking"

parents f85dddfd 8a613f86
Loading
Loading
Loading
Loading
+12 −17
Original line number Diff line number Diff line
@@ -583,7 +583,6 @@ public class NotificationManagerService extends SystemService {
    private void loadPolicyFile() {
        if (DBG) Slog.d(TAG, "loadPolicyFile");
        synchronized (mPolicyFile) {

            InputStream infile = null;
            try {
                infile = mPolicyFile.openRead();
@@ -3357,7 +3356,6 @@ public class NotificationManagerService extends SystemService {
                Slog.w(TAG, "getBackupPayload: cannot backup policy for user " + user);
                return null;
            }
            synchronized(mPolicyFile) {
            final ByteArrayOutputStream baos = new ByteArrayOutputStream();
            try {
                writePolicyXml(baos, true /*forBackup*/);
@@ -3365,7 +3363,6 @@ public class NotificationManagerService extends SystemService {
            } catch (IOException e) {
                Slog.w(TAG, "getBackupPayload: error writing payload for user " + user, e);
            }
            }
            return null;
        }

@@ -3383,7 +3380,6 @@ public class NotificationManagerService extends SystemService {
                Slog.w(TAG, "applyRestore: cannot restore policy for user " + user);
                return;
            }
            synchronized(mPolicyFile) {
            final ByteArrayInputStream bais = new ByteArrayInputStream(payload);
            try {
                readPolicyXml(bais, true /*forRestore*/);
@@ -3392,7 +3388,6 @@ public class NotificationManagerService extends SystemService {
                Slog.w(TAG, "applyRestore: error reading payload", e);
            }
        }
        }

        @Override
        public boolean isNotificationPolicyAccessGranted(String pkg) {