Clean up protected apps code (2/2)

- Work with actual component names instead of converting them between
  ComponentName and String all the time
- Some misc. coding style adaptions

Change-Id: I7401ea471d618936e880e6d542744f80f89ce40f
(cherry picked from commit 4ff96f59b1403b5949e706462d5e2e08b967dabf)