3

CyanogenMod apparently provides a "manual" focus mode without requiring the Camera2 API, but how can one control it?

I discovered this mode on a OnePlus One, by calling:

camera.getParameters().getSupportedFocusModes()

The returned list includes an additional mode named "manual" that isn't documented in the standard Android API Reference. I can set this mode [e.g. using setFocusMode("manual")], but then what?

The CyanogenMod Camera API source shows that the mode is named FOCUS_MODE_MANUAL_POSITION, and it also provides the following:

 private static final int MANUAL_FOCUS_POS_TYPE_INDEX = 0;
 private static final int MANUAL_FOCUS_POS_TYPE_DAC = 1;
 /** @hide
 * Set focus position.
 *
 * @param pos user setting of focus position.
 */
 public void setFocusPosition(int type, int pos) {
   set(KEY_QC_MANUAL_FOCUS_POS_TYPE, Integer.toString(type));
   set(KEY_QC_MANUAL_FOCUS_POSITION, Integer.toString(pos));
 }

 /** @hide
 * Gets the current focus position.
 *
 * @return current focus position
 */
 public String getCurrentFocusPosition() {
    return get(KEY_QC_MANUAL_FOCUS_POSITION);
 }

But the MANUAL_FOCUS_POS_TYPE_ constants are private and the methods are marked @hide.

So my question, again, is: how would one control this "manual" focus mode?

Pete
  • 424
  • 4
  • 14

0 Answers0