Merge "Make mutable PendingIntent explicit"
This commit is contained in:
committed by
Android (Google) Code Review
commit
7169fe7ef4
@@ -83,7 +83,9 @@ public class AccessoryChat extends Activity implements Runnable, TextView.OnEdit
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
mUsbManager = (UsbManager) getSystemService(Context.USB_SERVICE);
|
||||
mPermissionIntent = PendingIntent.getBroadcast(this, 0, new Intent(ACTION_USB_PERMISSION), PendingIntent.FLAG_MUTABLE_UNAUDITED);
|
||||
mPermissionIntent = PendingIntent.getBroadcast(this, 0,
|
||||
new Intent(ACTION_USB_PERMISSION).setPackage(this.getPackageName()),
|
||||
PendingIntent.FLAG_MUTABLE);
|
||||
IntentFilter filter = new IntentFilter(ACTION_USB_PERMISSION);
|
||||
registerReceiver(mUsbReceiver, filter);
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ public class MainActivity extends Activity {
|
||||
for (int i = 0; i < mIdsToRollback.size(); i++) {
|
||||
Intent intent = new Intent(ACTION_NAME);
|
||||
intent.putExtra(ROLLBACK_ID_EXTRA, mIdsToRollback.get(i));
|
||||
intent.setPackage(getApplicationContext().getPackageName());
|
||||
PendingIntent pendingIntent = PendingIntent.getBroadcast(
|
||||
getApplicationContext(), 0, intent, FLAG_MUTABLE);
|
||||
mRollbackManager.commitRollback(mIdsToRollback.get(i),
|
||||
|
||||
Reference in New Issue
Block a user