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

Commit 3b507387 authored by keparal.li's avatar keparal.li Committed by Lili Lin
Browse files

Avoid NetworkPolicyLogger NullPointException

Since uidBlockedState is nullable, need to make sure it's not null before call its function.

Bug: 261365478
Change-Id: Ic1bc5cd64ce7ce0340fa0513569e0626a8f8a35f
parent c0d6224b
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -94,7 +94,7 @@ public class NetworkPolicyLogger {
    void networkBlocked(int uid, @Nullable UidBlockedState uidBlockedState) {
        synchronized (mLock) {
            if (LOGD || uid == mDebugUid) {
                Slog.d(TAG, "Blocked state of " + uid + ": " + uidBlockedState.toString());
                Slog.d(TAG, "Blocked state of " + uid + ": " + uidBlockedState);
            }
            if (uidBlockedState == null) {
                mNetworkBlockedBuffer.networkBlocked(uid, BLOCKED_REASON_NONE, ALLOWED_REASON_NONE,