docs: public void addNotficationRecord(NotificationRecord record) {
          final boolean wasEmpty = notifications.isEmpty();
          notifications.add(record);
  
          if (wasEmpty) {
              //The list was previously empty, so notify a possible waiting thread
              synchronized (waitFlag) {
                  waitFlag.notifyAll();
              }
          }
      }