Merge "Trim the invalid uids and tags when reading uids/tags from chain." into pi-dev
am: 9054656c20

Change-Id: I3c67a3842b3444d1dbc068917500db908a383b9c