Final (?) fixes on id / pid split.

The main goal of this CL was to change the test cases to send an
EXTRA_ID instead of EXTRA_PID, but in changing that it was revealed 2
minor bugs:

- When setting the name property, it was using id instead of pid (which
  is what dumpstate expects).
- When the pid is replaced by the name in the screenshots, it would be
  replaced twice if the pid was small enough (because the call to
  String.replace() would also replace the counter).

This CL fixes these issues, and removes the temporary assignment of id =
pid when the former is missing.

BUG: 27076108
Change-Id: I70e7ce7d145019438272594686ac0d4d5dbe1723
2 files changed