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