从短信应用进入查看未读信息,状态栏未读信息不消失

路径为:

src/com/android/mms/transaction/MessagingNotification.java

 public static void cancelNotification(Context context, int notificationId) {
        /// M:
        Log.d(TAG, "cancelNotification, notificationId:" + notificationId);
        NotificationManager nm = (NotificationManager) context.getSystemService(
                Context.NOTIFICATION_SERVICE);

        nm.cancelAsUser(TAG, notificationId, UserHandle.CURRENT_OR_SELF);
        nm.cancel(notificationId);//test add
        /// M: ALPS00436165, cancel NotificationManagerPlus shown in other AP @{
        /*
        if (notificationId == NOTIFICATION_ID) {
            EncapsulatedNotificationManagerPlus.cancel(context, 1);
        }
        */
        /// @}
    }

猜你喜欢

转载自blog.csdn.net/fan380485838/article/details/81087465