public boolean execute(AdditionActionType type, Object... arg) { Log.i(TAG, "[execute],addition action type = " + type); boolean result = false; for (ICameraAddition addition : mModeAddition) { result = addition.execute(type, arg) || result; } return result; }
public void destory() { Log.i(TAG, "[destory]"); for (ICameraAddition addition : mNormalAddition) { addition.destory(); } for (ICameraAddition addition : mModeAddition) { addition.destory(); } }
public void pause() { Log.i(TAG, "[pause]"); for (ICameraAddition addition : mNormalAddition) { addition.pause(); } for (ICameraAddition addition : mModeAddition) { addition.pause(); } }
public void resume() { Log.i(TAG, "[resume]"); for (ICameraAddition addition : mNormalAddition) { addition.resume(); } for (ICameraAddition addition : mModeAddition) { addition.resume(); } }
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 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(); } } }
public boolean execute(ActionType type, boolean isMode, Object... arg) { Log.i(TAG, "[execute]isMode = " + isMode + ",action type = " + type); Vector<ICameraAddition> curAddition = mModeAddition; if (!isMode) { curAddition = mNormalAddition; } boolean result = false; for (ICameraAddition addition : curAddition) { result = result || addition.execute(type, arg); } // must tell effect if preview size changed. if (!isMode && type == ActionType.ACTION_ON_PREVIEW_DISPLAY_SIZE_CHANGED && !mModeAddition.contains(mIEffect)) { if (mIEffect != null) { mIEffect.execute(type, arg); } } return result; }
public void onEffectClick() { if (mIEffect != null) { mIEffect.execute(AdditionActionType.ACTION_EFFECT_CLICK); } }
public void onVoiceCommandNotify(int command) { mIVoiceCapture.execute(AdditionActionType.ACTION_ON_VOICE_COMMAND_NOTIFY, command); }
public void setListener(Listener listener) { for (ICameraAddition addition : mModeAddition) { addition.setListener(listener); } }