Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 54db81c5 authored by Winson Chiu's avatar Winson Chiu Committed by William Loh
Browse files

Encode values when serializing android-app Intent

And decodes them when reconstructing the Intent.

Also adds methods to Uri to check whether a string is already
encoded (whether it does not contain any non-allowed characters)
which are used to enforce that values are encoded when serializing.

This does not solve the problem for generic URIs that were not
serialized using the framework APIs, as it's not possible to tell
whether or not a particular string containing invalid characters
should be encoded or not.

For example, in a query string, `key=value` might accidentally encode
the `=`, which might break some usages of Uri.Part.

This is a high risk that this will break the parsing of arbitrary
URIs which do not conform to the encoding structure the framework
APIs expect, but would otherwise work before this change.

Bug: 281848623
Bug: 281849097
Bug: 281849163

Test: atest android.content.cts.IntentEncodingParameterizedTest

Change-Id: I6e3e93247a8ac02e661d267976c7b6e7093a47c1
parent 7923f0db
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment