packages/apps/Settings
リビジョン | fbd36bc62ba3c8dc5d3810672e731ecec161dd51 (tree) |
---|---|
日時 | 2020-12-18 16:38:18 |
作者 | Tim Peng <timhypeng@goog...> |
コミッター | tim peng |
Add the explicitly mutable flag for creating a PendingIntent
Bug: 174047735
Test: make -j50 RunSettingsRoboTests
Merged-In: Ic37b37bdbe6de6bdbad741985d3a920334240d80
Change-Id: Id4a3c67025a06b63628298f4af28fbf5db45a566
@@ -177,7 +177,8 @@ public class RemoteMediaSlice implements CustomSliceable { | ||
177 | 177 | mContext.getText(R.string.sound_settings).toString(), 0); |
178 | 178 | intent.setClassName(mContext.getPackageName(), SubSettings.class.getName()); |
179 | 179 | intent.setData(contentUri); |
180 | - final PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, intent, 0); | |
180 | + final PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, intent, | |
181 | + PendingIntent.FLAG_IMMUTABLE); | |
181 | 182 | final SliceAction primarySliceAction = SliceAction.createDeeplink(pendingIntent, icon, |
182 | 183 | ListBuilder.ICON_IMAGE, actionTitle); |
183 | 184 | return primarySliceAction; |
@@ -192,7 +193,8 @@ public class RemoteMediaSlice implements CustomSliceable { | ||
192 | 193 | .putExtra(SESSION_INFO, info) |
193 | 194 | .addFlags(Intent.FLAG_RECEIVER_FOREGROUND); |
194 | 195 | final PendingIntent primaryBroadcastIntent = PendingIntent.getBroadcast(mContext, |
195 | - info.hashCode(), intent, PendingIntent.FLAG_UPDATE_CURRENT); | |
196 | + info.hashCode(), intent, | |
197 | + PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE); | |
196 | 198 | final SliceAction primarySliceAction = SliceAction.createDeeplink( |
197 | 199 | primaryBroadcastIntent, |
198 | 200 | IconCompat.createWithResource(mContext, R.drawable.ic_volume_remote), |