Trim the invalid uids and tags when reading uids/tags from chain.

Test: manual test.

BUG: b/77817908
Change-Id: I5570c9bd0e76290e09ba84388db027dc272039a6
1 file changed