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

Commit 672a7765 authored by TYM Tsai's avatar TYM Tsai Committed by Android (Google) Code Review
Browse files

Merge "Add null pointer checker" into main

parents b4e39624 0dd23fe6
Loading
Loading
Loading
Loading
+10 −6
Original line number Diff line number Diff line
@@ -155,21 +155,25 @@ public class UriPermissionOwner {

    public void removeReadPermission(UriPermission perm) {
        synchronized (this) {
            if (mReadPerms != null) {
                mReadPerms.remove(perm);
                if (mReadPerms.isEmpty()) {
                    mReadPerms = null;
                }
            }
        }
    }

    public void removeWritePermission(UriPermission perm) {
        synchronized (this) {
            if (mWritePerms != null) {
                mWritePerms.remove(perm);
                if (mWritePerms.isEmpty()) {
                    mWritePerms = null;
                }
            }
        }
    }

    public void dump(PrintWriter pw, String prefix) {
        synchronized (this) {