getCameraIdList() function returns an empty array

The function getCameraIdList works only from version 21 of Android API