• R/O
  • HTTP
  • SSH
  • HTTPS

提交

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

packages/apps/Settings


Commit MetaInfo

修訂fbd36bc62ba3c8dc5d3810672e731ecec161dd51 (tree)
時間2020-12-18 16:38:18
作者Tim Peng <timhypeng@goog...>
Commitertim peng

Log Message

Add the explicitly mutable flag for creating a PendingIntent

Bug: 174047735
Test: make -j50 RunSettingsRoboTests
Merged-In: Ic37b37bdbe6de6bdbad741985d3a920334240d80
Change-Id: Id4a3c67025a06b63628298f4af28fbf5db45a566

Change Summary

差異

--- a/src/com/android/settings/media/RemoteMediaSlice.java
+++ b/src/com/android/settings/media/RemoteMediaSlice.java
@@ -177,7 +177,8 @@ public class RemoteMediaSlice implements CustomSliceable {
177177 mContext.getText(R.string.sound_settings).toString(), 0);
178178 intent.setClassName(mContext.getPackageName(), SubSettings.class.getName());
179179 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);
181182 final SliceAction primarySliceAction = SliceAction.createDeeplink(pendingIntent, icon,
182183 ListBuilder.ICON_IMAGE, actionTitle);
183184 return primarySliceAction;
@@ -192,7 +193,8 @@ public class RemoteMediaSlice implements CustomSliceable {
192193 .putExtra(SESSION_INFO, info)
193194 .addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
194195 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);
196198 final SliceAction primarySliceAction = SliceAction.createDeeplink(
197199 primaryBroadcastIntent,
198200 IconCompat.createWithResource(mContext, R.drawable.ic_volume_remote),