Check commit() IntentSender should come from a mutable PendingIntent

When an IMMUTABLE PendingIntent was used to create an IntentSender
which was passed into Session.commit(IntentSender statusReceiver),
the PendingIntent cannot be modified and the caller couldn't receive
EXTRA_STATUS or any installation results.

The system should provide an error signal to let the caller know to
pass the correct parameter.

Bug: 240618202
Test: atest android.packageinstaller.install.cts.SessionTest
Test: manual. A sample app with an immutable PendingIntent

Change-Id: If3d2ade7d8acb8a91f1223618a02b751e7f5970a
3 files changed