Commit 52862173 by sikang

Bug修复

parent 90bfd08e
...@@ -24,6 +24,7 @@ import tech.starwin.base.BaseActivity; ...@@ -24,6 +24,7 @@ import tech.starwin.base.BaseActivity;
import tech.starwin.impl.OnEventClickListener; import tech.starwin.impl.OnEventClickListener;
import tech.starwin.utils.BitmapUtils; import tech.starwin.utils.BitmapUtils;
import tech.starwin.utils.FileUtils; import tech.starwin.utils.FileUtils;
import tech.starwin.utils.collection.UploadManager;
import tech.starwin.utils.context_utils.ActivityJumper; import tech.starwin.utils.context_utils.ActivityJumper;
import tech.starwin.utils.context_utils.EasyActivityResult; import tech.starwin.utils.context_utils.EasyActivityResult;
import tech.starwin.utils.ui_utils.UIHelper; import tech.starwin.utils.ui_utils.UIHelper;
...@@ -131,7 +132,11 @@ public class TakePhotoActivity extends BaseActivity { ...@@ -131,7 +132,11 @@ public class TakePhotoActivity extends BaseActivity {
@Override @Override
protected void onStart() { protected void onStart() {
super.onStart(); super.onStart();
try {
cameraView.start(); cameraView.start();
}catch (Exception e){
UploadManager.uploadException(e,"camera start exception");
}
} }
@Override @Override
...@@ -142,7 +147,13 @@ public class TakePhotoActivity extends BaseActivity { ...@@ -142,7 +147,13 @@ public class TakePhotoActivity extends BaseActivity {
@Override @Override
protected void onStop() { protected void onStop() {
super.onStop(); super.onStop();
try {
cameraView.stop(); cameraView.stop();
}catch (Exception e){
UploadManager.uploadException(e,"camera stop exception");
}
} }
@Override @Override
......
...@@ -150,11 +150,10 @@ public class UploadManager { ...@@ -150,11 +150,10 @@ public class UploadManager {
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
uploadException(e, e.getMessage());
throw new RuntimeException(e.getMessage());
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
throw new RuntimeException(e.getMessage()); uploadException(e, e.getMessage());
} finally { } finally {
try { try {
os.close(); os.close();
...@@ -312,7 +311,7 @@ public class UploadManager { ...@@ -312,7 +311,7 @@ public class UploadManager {
sendControlCommand(os, "CLOSE", sessionId, "exception upload completed"); sendControlCommand(os, "CLOSE", sessionId, "exception upload completed");
} catch (Exception e) { } catch (Exception e) {
throw new RuntimeException(e); uploadException(e,e.getMessage());
} finally { } finally {
try { try {
if (os != null) { if (os != null) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment