isDeclared handles SecurityException as well

It is verbose to handle SecurityException in caller, and the exception
means the service isn't reachable from the caller anyway.

Bug: 298545413
Test: remove some services and then call isDeclared.
Change-Id: I84d4e09d1331538181ec8056e42cb30a29d8fa0f
1 file changed