From f15072a854cfd1f77cd75b40cba3aa1fe4608077 Mon Sep 17 00:00:00 2001 From: Alexander Roederer Date: Fri, 10 Mar 2023 17:04:32 +0000 Subject: [PATCH] Removes comment dead link on MIME types Removes a dead link on MIME types in Notification Messages, and adds a pointer to suggest looking at ImageDecoder.isMimeTypeSupported for information about what mime types are supported; notification messages are decoded to drawables using ImageDecoder, so that list should provide useful guidance. Other MIME types may be supported, but the image types are likely to be most common, so ImageDecoder seemed like a reasonable place to direct attention. Change-Id: I474509d8874dc282ab8bcc00a9a6b86a6192d478 Test: Only changing comments Bug: 154803285 --- core/java/android/app/Notification.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/java/android/app/Notification.java b/core/java/android/app/Notification.java index 440ee202cc5bb..e78fb179eb6cf 100644 --- a/core/java/android/app/Notification.java +++ b/core/java/android/app/Notification.java @@ -8657,13 +8657,13 @@ public class Notification implements Parcelable * where the platform doesn't support the MIME type, the original text provided in the * constructor will be used. * @param dataMimeType The MIME type of the content. See - * for the list of supported MIME - * types on Android and Android Wear. + * {@link android.graphics.ImageDecoder#isMimeTypeSupported(String)} for a list of + * supported image MIME types. * @param dataUri The uri containing the content whose type is given by the MIME type. *

+ * Notification Listeners including the System UI need permission to access the + * data the Uri points to. The recommended ways to do this are: *

    - *
  1. Notification Listeners including the System UI need permission to access the - * data the Uri points to. The recommended ways to do this are:
  2. *
  3. Store the data in your own ContentProvider, making sure that other apps have * the correct permission to access your provider. The preferred mechanism for * providing access is to use per-URI permissions which are temporary and only