Most of the time, the camera starts up in still photo mode (except for pick activities to pick videos). In that case, we do not need the value of the setting right away, and it would be safe to put this settings query in the deferredInit() method.  That puts one less thing in the startup path, so the user sees an active preview as fast as possible.

There are still the rare times when you do need to query the setting here in loadCameraPreview, however.

If you can, please optimize this so that the setting query is deferred when possible.  I recommend making this getDefaultProfiles() function a top-level method of Camera and adding a callback argument that it calls when done.  After the first time, if vendorDefaultProfiles is already defined, it can just call its callback synchronously.  But otherwise it does the settings query and then calls it.

With that defined, you can call it in deferredInit() and also, call it here in gotCamera(), if needed.  (it would be needed if Camera._captureMode === Camera.VIDEO)