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

Commit 2c85ce18 authored by Sailesh Nepal's avatar Sailesh Nepal Committed by android-build-merger
Browse files

Merge "DO NOT MERGE: Remove rate limiting for system dialer notifications"...

Merge "DO NOT MERGE: Remove rate limiting for system dialer notifications" into oc-dr1-dev am: b4cc14b5
am: 68e42c74

Change-Id: Ic6122f5523faabb0270970225a7e7fa2281853e6
parents cee33558 68e42c74
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -135,6 +135,7 @@ import android.service.notification.SnoozeCriterion;
import android.service.notification.StatusBarNotification;
import android.service.notification.ZenModeConfig;
import android.service.notification.ZenModeProto;
import android.telecom.TelecomManager;
import android.telephony.PhoneStateListener;
import android.telephony.TelephonyManager;
import android.text.TextUtils;
@@ -3506,8 +3507,11 @@ public class NotificationManagerService extends SystemService {
    private boolean checkDisqualifyingFeatures(int userId, int callingUid, int id, String tag,
            NotificationRecord r) {
        final String pkg = r.sbn.getPackageName();
        final String dialerPackage =
                getContext().getSystemService(TelecomManager.class).getSystemDialerPackage();
        final boolean isSystemNotification =
                isUidSystemOrPhone(callingUid) || ("android".equals(pkg));
                isUidSystemOrPhone(callingUid) || ("android".equals(pkg))
                || TextUtils.equals(pkg, dialerPackage);
        final boolean isNotificationFromListener = mListeners.isListenerPackage(pkg);

        // Limit the number of notifications that any given package except the android