Fix unintended early return in service creation.

The early return is only intended for tests, but we will hit it in prod
if serviceNames has length 2.

This is uncovered when we set a non-empty value for
config_defaultWearableSensingService. Despite how
config_defaultAmbientContextServices is defined as a list with two
elements in frameworks/base/core/res/res/values/config.xml, if
config_defaultWearableSensingService is not defined, its length will be
1, so we do not see this problem in prod now.

Bug: 315506811
Test: On device, atest CtsAmbientContextServiceTestCases, and atest
CtsWearableSensingServiceTestCases

Change-Id: Ic2f8e3d5a61da4a1cb41070a53f22ecea8ace680
1 file changed