MediaSession2: Fix bug in SessionToken2 constructor

There's a bug in SessionToken2 constructor that session service is
misunderstood as library service. It's because
PackageManager.resolveService(Intent, int) ignores action in the intent
if the class name is specified, and there's no way for getting the
action from the ResolvedInfo.

Use PackageManager.queryIntentServices(Intent, int) instead to query
services with the action.

Also added tests and fixed ID mismatch issue in test service.

Test: Run all MediaComponents tests once
Change-Id: I5df2f36eae8100be268629881122f47e44eb41d1
3 files changed