<commit_before>package com.angcyo.uiview.base;

import android.Manifest;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.Vibrator;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;

import com.angcyo.library.utils.L;
import com.angcyo.rcode.IDecodeCallback;
import com.angcyo.rcode.QRCodeDecoder;
import com.angcyo.rcode.zxing.camera.CameraManager;
import com.angcyo.rcode.zxing.control.AmbientLightManager;
import com.angcyo.rcode.zxing.control.BeepManager;
import com.angcyo.rcode.zxing.decode.CaptureActivityHandler;
import com.angcyo.rcode.zxing.decode.InactivityTimer;
import com.angcyo.rcode.zxing.view.ViewfinderView;
import com.angcyo.uiview.R;
import com.angcyo.uiview.container.ContentLayout;
import com.angcyo.uiview.container.UIParam;
import com.angcyo.uiview.dialog.UILoading;
import com.angcyo.uiview.model.TitleBarPattern;
import com.angcyo.uiview.net.RException;
import com.angcyo.uiview.net.RFunc;
import com.angcyo.uiview.net.RSubscriber;
import com.angcyo.uiview.net.Rx;
import com.angcyo.uiview.resources.AnimUtil;
import com.angcyo.uiview.skin.SkinHelper;
import com.angcyo.uiview.utils.T_;
import com.angcyo.uiview.widget.RImageCheckView;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.DecodeHintType;
import com.google.zxing.Result;
import com.tbruyelle.rxpermissions.RxPermissions;

import java.io.IOException;
import java.util.Collection;
import java.util.Map;

import rx.functions.Action1;

/**
 * Copyright (C) 2016,深圳市红鸟网络科技股份有限公司 All rights reserved.
 * 项目名称：
 * 类的描述：二维码扫描界面
 * 创建人员：Robi
 * 创建时间：2017/04/18 14:48
 * 修改人员：Robi
 * 修改时间：2017/04/18 14:48
 * 修改备注：
 * Version: 1.0.0
 */
public class UIScanView extends UIContentView implements SurfaceHolder.Callback, IDecodeCallback {
    private static final long VIBRATE_DURATION = 50;
    protected BeepManager beepManager;
    protected Action1<String> mResultAction;
    ViewfinderView mViewfinderView;
    private boolean hasSurface;
    private InactivityTimer inactivityTimer;
    private AmbientLightManager ambientLightManager;
    private CameraManager cameraManager;
    private CaptureActivityHandler handler;<commit_msg>add zxingzbar library<commit_after>package com.angcyo.uiview.base;

import android.Manifest;
import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Color;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.Vibrator;
import android.text.TextUtils;
import android.view.LayoutInflater;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;

import com.angcyo.library.utils.L;
import com.angcyo.rcode.IDecodeCallback;
import com.angcyo.rcode.QRCodeDecoder;
import com.angcyo.rcode.zxing.camera.CameraManager;
import com.angcyo.rcode.zxing.control.AmbientLightManager;
import com.angcyo.rcode.zxing.control.BeepManager;
import com.angcyo.rcode.zxing.decode.CaptureActivityHandler;
import com.angcyo.rcode.zxing.decode.InactivityTimer;
import com.angcyo.rcode.zxing.view.ViewfinderView;
import com.angcyo.uiview.R;
import com.angcyo.uiview.container.ContentLayout;
import com.angcyo.uiview.container.UIParam;
import com.angcyo.uiview.dialog.UILoading;
import com.angcyo.uiview.model.TitleBarPattern;
import com.angcyo.uiview.net.RException;
import com.angcyo.uiview.net.RFunc;
import com.angcyo.uiview.net.RSubscriber;
import com.angcyo.uiview.net.Rx;
import com.angcyo.uiview.resources.AnimUtil;
import com.angcyo.uiview.skin.SkinHelper;
import com.angcyo.uiview.utils.T_;
import com.angcyo.uiview.widget.RImageCheckView;
import com.google.zxing.BarcodeFormat;
import com.google.zxing.DecodeHintType;
import com.google.zxing.Result;
import com.tbruyelle.rxpermissions.RxPermissions;

import java.io.IOException;
import java.util.Collection;
import java.util.Map;

import rx.functions.Action1;

/**
 * Copyright (C) 2016,深圳市红鸟网络科技股份有限公司 All rights reserved.
 * 项目名称：
 * 类的描述：二维码扫描界面
 * 创建人员：Robi
 * 创建时间：2017/04/18 14:48
 * 修改人员：Robi
 * 修改时间：2017/04/18 14:48
 * 修改备注：请使用 {@link UIScanView2}
 * Version: 1.0.0
 */
@Deprecated
public class UIScanView extends UIContentView implements SurfaceHolder.Callback, IDecodeCallback {
    private static final long VIBRATE_DURATION = 50;
    protected BeepManager beepManager;
    protected Action1<String> mResultAction;
    ViewfinderView mViewfinderView;
    private boolean hasSurface;
    private InactivityTimer inactivityTimer;
    private AmbientLightManager ambientLightManager;
    private CameraManager cameraManager;
    private CaptureActivityHandler handler;
{'fraction_non_alphanumeric': 0.09860619929269815, 'fraction_numerical': 0.014770126898273351, 'mean_word_length': 5.733893557422969, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2401972', 'n_tokens_mistral': 1800, 'n_tokens_neox': 1794, 'n_words': 288}