public void close(boolean isMode) { Log.i(TAG, "[close]isMode = " + isMode); Vector<ICameraAddition> curAddition = mModeAddition; if (!isMode) { curAddition = mNormalAddition; } for (ICameraAddition addition : curAddition) { if (addition.isOpen()) { addition.close(); } } }
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(); } } }