Closed khk624 closed 9 years ago
It works fine. But I think it would be better to implement setPairingType() method in the ConnectableDevice as well. Because in current implementation usage of that method can be like that:
mTV.setPairingLevel(PairingLevel.ON);
WebOSTVService service = (WebOSTVService)mTV.getServiceByName(WebOSTVService.ID);
service.setPairingType(PairingType.PIN_CODE);
and the better case for a developer something like this:
mTV.setPairingLevel(PairingLevel.ON);
mTV.setPairingType(PairingType.PIN_CODE);
So in the ConnectableDevice method setPairingType should set pairing type for each service if it's supported by the service.
I thought it may confuse users, because not every device supports every pairingType. I did it because pairingType is very service specific. If we have that in ConnectableDevice, what if users set FIRST_SCREEN for pairing type. We still need to show PIN Pairing for NetcastTV, etc.
As we discussed with a team we can combine setPairingLevel and setPairingType methods into one method
Moved ConnectableDevicePairingLevel static property to the DeviceService class.
Now we can choose pairingType for webOSTV (PROMPT / PIN_CODE)