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

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

Merge "Cleanup log spam on system notification post."

parents 29b639c0 19ad7477
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3962,7 +3962,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;