diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-26 12:01:11 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2022-05-26 12:01:11 +0000 |
commit | d0d199b12b697f0b53bb244f990ce8b439230e01 (patch) | |
tree | a59969b442a18d5a72e9dd50a5022121a3a5f04c | |
parent | b5a3aba27d4f13d4fdb3de4bedd6138590053ef3 (diff) | |
parent | 51e32e1013931a20f96d93f0b7e58b6b81e60b49 (diff) | |
download | support-snap-temp-L87200000954798525.tar.gz |
Merge "Mark requestUpdateAll pendingIntent as immutable" into snap-temp-L87200000954798525snap-temp-L87200000954798525
2 files changed, 6 insertions, 6 deletions
diff --git a/wear/watchface/watchface-complications-data-source/src/main/java/androidx/wear/watchface/complications/datasource/ComplicationDataSourceUpdateRequester.kt b/wear/watchface/watchface-complications-data-source/src/main/java/androidx/wear/watchface/complications/datasource/ComplicationDataSourceUpdateRequester.kt index cab623f0f4f..4bd99912c5a 100644 --- a/wear/watchface/watchface-complications-data-source/src/main/java/androidx/wear/watchface/complications/datasource/ComplicationDataSourceUpdateRequester.kt +++ b/wear/watchface/watchface-complications-data-source/src/main/java/androidx/wear/watchface/complications/datasource/ComplicationDataSourceUpdateRequester.kt @@ -15,7 +15,6 @@ */ package androidx.wear.watchface.complications.datasource -import android.annotation.SuppressLint import android.app.PendingIntent import android.content.ComponentName import android.content.Context @@ -108,7 +107,6 @@ private class ComplicationDataSourceUpdateRequesterImpl( private val complicationDataSourceComponent: ComponentName ) : ComplicationDataSourceUpdateRequester { - @SuppressLint("PendingIntentMutability") override fun requestUpdateAll() { val intent = Intent(ComplicationDataSourceUpdateRequester.ACTION_REQUEST_UPDATE_ALL) intent.setPackage(ComplicationDataSourceUpdateRequester.UPDATE_REQUEST_RECEIVER_PACKAGE) @@ -119,12 +117,16 @@ private class ComplicationDataSourceUpdateRequesterImpl( // Add a placeholder PendingIntent to allow the UID to be checked. intent.putExtra( ComplicationDataSourceUpdateRequesterConstants.EXTRA_PENDING_INTENT, - PendingIntent.getActivity(context, 0, Intent(""), 0) + PendingIntent.getActivity( + context, + 0, + Intent(""), + PendingIntent.FLAG_IMMUTABLE + ) ) context.sendBroadcast(intent) } - @SuppressLint("PendingIntentMutability") override fun requestUpdate(vararg complicationInstanceIds: Int) { val intent = Intent(ComplicationDataSourceUpdateRequester.ACTION_REQUEST_UPDATE) intent.setPackage(ComplicationDataSourceUpdateRequester.UPDATE_REQUEST_RECEIVER_PACKAGE) diff --git a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/ComplicationDataSourceChooserIntent.java b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/ComplicationDataSourceChooserIntent.java index 68a1faf81b1..6105f6bf6ce 100644 --- a/wear/watchface/watchface/src/main/java/androidx/wear/watchface/ComplicationDataSourceChooserIntent.java +++ b/wear/watchface/watchface/src/main/java/androidx/wear/watchface/ComplicationDataSourceChooserIntent.java @@ -16,7 +16,6 @@ package androidx.wear.watchface; -import android.annotation.SuppressLint; import android.app.Activity; import android.app.PendingIntent; import android.content.ComponentName; @@ -193,7 +192,6 @@ public class ComplicationDataSourceChooserIntent { * preference. If a data source can supply data for more than one of these types, the type * chosen will be whichever was specified first. */ - @SuppressLint("PendingIntentMutability") public static void startProviderChooserActivity( @NonNull Context context, @NonNull ComponentName watchFace, |