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

Commit 19ad7477 authored by Julia Reynolds's avatar Julia Reynolds
Browse files

Cleanup log spam on system notification post.

Bug: 33209911
Test: unplug/replug adb cable, monitor log. runtest systemui-notifications
Change-Id: I294ccdcb0a353463fe0c6b52f1dbbd97f4c75079
parent 6ae13327
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3924,7 +3924,7 @@ public class NotificationManagerService extends SystemService {
        }
    }

    private static boolean isUidSystem(int uid) {
    protected static boolean isUidSystem(int uid) {
        final int appid = UserHandle.getAppId(uid);
        return (appid == Process.SYSTEM_UID || appid == Process.PHONE_UID || uid == 0);
    }
+6 −0
Original line number Diff line number Diff line
@@ -136,6 +136,12 @@ public final class NotificationRecord {
    private boolean isPreChannelsNotification() {
        try {
            if (NotificationChannel.DEFAULT_CHANNEL_ID.equals(getChannel().getId())) {
                final boolean isSystemNotification =
                        NotificationManagerService.isUidSystem(sbn.getUid())
                                || ("android".equals(sbn.getPackageName()));
                if (isSystemNotification) {
                    return false;
                }
                final ApplicationInfo applicationInfo =
                        mContext.getPackageManager().getApplicationInfoAsUser(sbn.getPackageName(),
                                0, sbn.getUserId());
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ public class NotificationRecordTest {
    @Mock PackageManager mPm;

    private final String pkg = "com.android.server.notification";
    private final int uid = 0;
    private final int uid = 9583;
    private final String pkg2 = "pkg2";
    private final int uid2 = 1111111;
    private final int id1 = 1;