Fix CreationExtras.addDefaultArgs when args absent

addDefaultArgs grabs the existing Bundle from CreationExtras
and adds in the additional values. If default args aren't
present (whenever the initial intent did not have extras),
the updated bundle was never returned within the original
instance since it was relying on modifying the Bundle
in-place.

This corrects the issue by explicitly returning a new instance
containing the updated `DEFAULT_ARGS` Bundle.

Test: atest com.android.intentresolver.v2.ext.CreationExtrasExtTest
Change-Id: I5a7c61baaaeefa2878b4041d809c348bf5ac70c0
2 files changed
tree: b9232a20818c0863003e38d512a8cc67ad15ab84
  1. aconfig/
  2. java/
  3. tests/
  4. Android.bp
  5. AndroidManifest-app.xml
  6. AndroidManifest-lib.xml
  7. OWNERS
  8. PREUPLOAD.cfg
  9. proguard.flags
  10. README.md
  11. TEST_MAPPING
README.md

IntentResolver

About

IntentResolver provides the implementation for Intent ACTION_CHOOSER

See also: ShareCompat.IntentBuilder