Fix getAppUid() logic to handle multiple matching pkgs.

"cmd package list packages <str>" will return information for all
package names that contain "str". So, update DeviceUtils.getAppUid()
to not assume there will be only one line returned from that command.

Fixes: 185790788
Fixes: 186068002
Test: atest ./hostsidetests/blobstore/src/com/android/cts/host/blob/StatsdBlobStoreAtomTest.java
Change-Id: Iebe223f6d4a939f152ac343b556fd63db1d82822
2 files changed