title: Correct way to update notification actions
body: <p>I have an app with media buttons and text in the notification that I want to update programatically. So I did this:</p>
  <pre><code>public void updateNotificatonIcons() {
      ArrayList&lt;NotificationCompat.Action&gt; acts = NotificationBuilder.mActions;
      acts.set(1, new NotificationCompat.Action((isPlaying) ? R.drawable.my_media_stop : R.drawable.my_media_play, &quot;Stop&quot;, stopintent));
      NotificationBuilder.mActions = acts;
      NotificationManagerCompat.from(context).notify(1, NotificationBuilder.build());
  }
  </code></pre>
  <p>The problem is that AndroidStudio complains about <code>NotificationBuilder.mActions</code>:</p>
  <pre><code>Builder.mActions can only be accessed from within the same library group prefix (referenced groupId=androidx.core with prefix androidx from groupId=Android)
  </code></pre>
  <p>I googled and added a <code>@SuppressLint(&quot;RestrictedApi&quot;)</code> before the method, and it works.</p>
  <p>Is this the &quot;correct&quot; way of updating the notification? Is there a better way without the need of a <code>@SupressLint</code>?</p>