Use equals() instead of contains() for checking package name

PS2:
Extend checking of package name to see if the package name
is equal and if not check that the next character in the name
is a '.' to reduce possible false positives.

PS3:
Checking if the package names equal is all that is needed.

Change-Id: I1530bb38dd96de515b7a3d0aaa0292defa4b013a