Flashlight should be gray after finishing Recor...

原创
2012/09/19 11:38
阅读数 74

The process of reproducing the behavior:

          Message App --> New Message --> Attach --> Capture Video -->click the Shutter button to start recording video --> click the shutter button to stop recording video --> flashlight is not gray state

 

The solutions:     

private Runnable mVideoSavedRunnable = new Runnable(){
     public void run(){
         ...
         setEnableRecordingUI(true);
         ...
     }
}

public void setEnableRecordingUI(boolean enable){
    ...
    mFlashIndicator.setEnable(enable);
    ...
}

As the code ,when Saving the video ,the setEnableRecordingUI() has been invoked.So we should add a judge condition to judge whether the activity is started by others or not. If others(like:Message App) start the video activity,we shouldn't enable the RecordingUI .

 

Thus ,we can do like these:

private Runnable mVideoSavedRunnable = new Runnable(){
     public void run(){
         ...
         if (!mIsVideoCaptureIntent){
             setEnableRecordingUI(true);
         }   
         ...
     }
}

 

 

 

 

        

展开阅读全文
打赏
0
0 收藏
分享
加载中
更多评论
打赏
0 评论
0 收藏
0
分享
返回顶部
顶部