优化细节

This commit is contained in:
Jenly
2020-12-25 18:36:22 +08:00
parent 46f60195fb
commit 1a09abd66c
4 changed files with 7 additions and 11 deletions

View File

@@ -108,12 +108,6 @@ public class DefaultCameraScan extends CameraScan {
});
ScaleGestureDetector scaleGestureDetector = new ScaleGestureDetector(mContext, mOnScaleGestureListener);
mPreviewView.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
LogUtils.d("click");
}
});
mPreviewView.setOnTouchListener((v, event) -> {
if(isNeedTouchZoom()){
return scaleGestureDetector.onTouchEvent(event);

View File

@@ -53,9 +53,9 @@ public class MultiFormatAnalyzer extends AreaRectAnalyzer {
if(rawResult == null && mDecodeConfig != null){
if(rawResult == null && mDecodeConfig.isSupportVerticalCode()){
byte[] rotatedData = new byte[data.length];
for (int y = 0; y < height; y++) {
for (int x = 0; x < width; x++)
rotatedData[x * height + height - y - 1] = data[x + y * width];
for (int y = 0; y < dataHeight; y++) {
for (int x = 0; x < dataWidth; x++)
rotatedData[x * dataHeight + dataHeight - y - 1] = data[x + y * dataWidth];
}
rawResult = decodeInternal(new PlanarYUVLuminanceSource(rotatedData,dataHeight,dataWidth,top,left,height,width,false),mDecodeConfig.isSupportVerticalCodeMultiDecode());
}