Browse Source

fix: ci

master
高志龙 6 months ago
parent
commit
7dcbed6515
  1. 24
      app/src/main/java/qianmu/container/mqtt/MQTTService.java

24
app/src/main/java/qianmu/container/mqtt/MQTTService.java

@ -659,6 +659,27 @@ public class MQTTService extends Service {
screenshotFuture = singleThreadExecutor.submit(() -> screenshotFuture = singleThreadExecutor.submit(() ->
SignWayUtil.ysTakeScreenshot(path) SignWayUtil.ysTakeScreenshot(path)
); );
}else if("bv".equals(Constant.androidBoardType)){
screenshotFuture = singleThreadExecutor.submit(() ->{
try{
Bitmap screenBitmap = MyApplication.getInstance().getLztek().screenCapture();
if(screenBitmap != null){
try (FileOutputStream fos = new FileOutputStream(file)) {
screenBitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);
fos.flush();
} catch (IOException e) {
e.printStackTrace();
}
if(new File(path).exists()){
LoggerUtil.e("screenShot","截屏完成");
return true;
}
}
}catch(Exception exp){
LoggerUtil.e("screenShot",exp.getMessage());
}
return false;
});
}else{ }else{
screenshotFuture = singleThreadExecutor.submit(() -> { screenshotFuture = singleThreadExecutor.submit(() -> {
View decorView = MyApplication.getInstance().getCurrentActivity().getWindow().getDecorView(); View decorView = MyApplication.getInstance().getCurrentActivity().getWindow().getDecorView();
@ -708,9 +729,6 @@ public class MQTTService extends Service {
Thread.currentThread().interrupt(); Thread.currentThread().interrupt();
} }
} }
//
} }
//上传截屏 //上传截屏

Loading…
Cancel
Save