コード例 #1
0
 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;
 }
コード例 #2
0
 public void destory() {
   Log.i(TAG, "[destory]");
   for (ICameraAddition addition : mNormalAddition) {
     addition.destory();
   }
   for (ICameraAddition addition : mModeAddition) {
     addition.destory();
   }
 }
コード例 #3
0
 public void pause() {
   Log.i(TAG, "[pause]");
   for (ICameraAddition addition : mNormalAddition) {
     addition.pause();
   }
   for (ICameraAddition addition : mModeAddition) {
     addition.pause();
   }
 }
コード例 #4
0
 public void resume() {
   Log.i(TAG, "[resume]");
   for (ICameraAddition addition : mNormalAddition) {
     addition.resume();
   }
   for (ICameraAddition addition : mModeAddition) {
     addition.resume();
   }
 }
コード例 #5
0
 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();
     }
   }
 }
コード例 #6
0
 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();
     }
   }
 }
コード例 #7
0
 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();
     }
   }
 }
コード例 #8
0
 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;
 }
コード例 #9
0
 public void onEffectClick() {
   if (mIEffect != null) {
     mIEffect.execute(AdditionActionType.ACTION_EFFECT_CLICK);
   }
 }
コード例 #10
0
 public void onVoiceCommandNotify(int command) {
   mIVoiceCapture.execute(AdditionActionType.ACTION_ON_VOICE_COMMAND_NOTIFY, command);
 }
コード例 #11
0
 public void setListener(Listener listener) {
   for (ICameraAddition addition : mModeAddition) {
     addition.setListener(listener);
   }
 }