public void open(boolean isMode) { Log.i(TAG, "[open]isMode = " + isMode); Vector<ICameraAddition> curAddition = mModeAddition; if (!isMode) { curAddition = mNormalAddition; } for (ICameraAddition addition : curAddition) { if (addition.isSupport()) { addition.open(); } } }
public void onCameraParameterReady(boolean isMode) { Log.i(TAG, "[onCameraParameterReady]isMode = " + isMode); Vector<ICameraAddition> curAddition = mModeAddition; if (!isMode) { curAddition = mNormalAddition; } for (ICameraAddition addition : curAddition) { boolean isSupport = addition.isSupport(); boolean isOpen = addition.isOpen(); if (isSupport && !isOpen) { addition.open(); } else if (!isSupport && isOpen) { addition.close(); } } }