优化细节
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user