导航菜单

页面标题

页面副标题

六分钟步行测试管理软件 v1.1.0.2112120029 - WalkTestEcgReviewActivity.java 源代码

正在查看: 六分钟步行测试管理软件 v1.1.0.2112120029 应用的 WalkTestEcgReviewActivity.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package cn.neoprint.padmonitor.ui;

import android.content.Intent;
import android.graphics.Rect;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.text.TextUtils;
import android.view.MotionEvent;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import cn.neoprint.padmonitor.R;
import cn.neoprint.padmonitor.app.AppGlobal;
import cn.neoprint.padmonitor.data.DataRepository;
import cn.neoprint.padmonitor.data.entity.EcgMarkEntity;
import cn.neoprint.padmonitor.data.entity.PatientEntity;
import cn.neoprint.padmonitor.data.entity.TestWaveDataLists;
import cn.neoprint.padmonitor.ui.view.EcgMarkListPopupWindow;
import cn.neoprint.padmonitor.ui.view.HisDataGridChart;
import cn.neoprint.padmonitor.utils.DateUtils;
import cn.neoprint.padmonitor.utils.DisplayUtils;
import cn.neoprint.padmonitor.utils.constant.GzjSharePref;
import com.sayeasytech.base.base.BaseActivity;
import com.sayeasytech.base.base.Layout;
import com.sayeasytech.base.log.KLog;
import com.warkiz.widget.ColorCollector;
import com.warkiz.widget.IndicatorSeekBar;
import com.warkiz.widget.OnSeekChangeListener;
import com.warkiz.widget.SeekParams;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Vector;

public class WalkTestEcgReviewActivity extends BaseActivity {
    private static final String DEFAULT_TIME_FORMAT = "--:--:--";
    private Button confirmBtn;
    private long currentTime;
    private Button deleteFastBtn;
    private Button deleteSlowBtn;
    private HisDataGridChart ecgAVFHdgc;
    private HisDataGridChart ecgAVLHdgc;
    private HisDataGridChart ecgAVRHdgc;
    private HisDataGridChart ecgIHdgc;
    private HisDataGridChart ecgIIHdgc;
    private HisDataGridChart ecgIIIHdgc;
    private HisDataGridChart ecgVHdgc;
    private long fastTime;
    private TextView fastTimeTv;
    private int gainType;
    private Button goback;
    private long mSearchTime;
    private TextView markTv;
    private PatientEntity patient;
    private ProgressBar progressBar;
    private HisDataGridChart respHdgc;
    private IndicatorSeekBar seekBar;
    private Button selectFastBtn;
    private Button selectOtherBtn;
    private Button selectSlowBtn;
    private long slowTime;
    private TextView slowTimeTv;
    private HisDataGridChart spo2Hdgc;
    private long startTime;
    private TextView tvGainType;
    private float ydpi;
    private List<EcgMarkEntity> listData = new ArrayList();
    private long dataTime = 0;
    private int speedType = 1;
    Handler mHandler = new Handler() {
        @Override
        public void handleMessage(Message message) {
            if (message.what != 0) {
                return;
            }
            WalkTestEcgReviewActivity.this.clearList();
            WalkTestEcgReviewActivity.this.getLine();
            WalkTestEcgReviewActivity.this.showEcgMark();
        }
    };
    private long originalPoint = 0;
    private List<Integer> ecgIList = new Vector();
    private List<Integer> ecgIIList = new Vector();
    private List<Integer> ecgIIIList = new Vector();
    private List<Integer> ecgVList = new Vector();
    private List<Integer> ecgAVLList = new Vector();
    private List<Integer> ecgAVFList = new Vector();
    private List<Integer> ecgAVRList = new Vector();
    private List<Integer> spo2List = new Vector();
    private List<Integer> respList = new Vector();

    public void onCreate(Bundle bundle) {
        super.onCreate(bundle);
        this.currentTime = getIntent().getLongExtra("current_time", 0L);
        this.startTime = getIntent().getLongExtra("start_time", 0L);
        this.fastTime = getIntent().getLongExtra("fast_time", 0L);
        this.slowTime = getIntent().getLongExtra("slow_time", 0L);
        this.gainType = getIntent().getIntExtra("gain_type", 0);
        this.patient = (PatientEntity) getIntent().getSerializableExtra("current_patient");
        this.mSearchTime = this.startTime;
        this.listData = DataRepository.getInstance().getEcgMarkDao().query(this.patient.getIdCard(), this.currentTime);
        HisDataGridChart hisDataGridChart = (HisDataGridChart) findViewById(R.id.ecgi_hdgc);
        this.ecgIHdgc = hisDataGridChart;
        hisDataGridChart.setAxisMarginLeft(0.0f);
        this.ecgIHdgc.setAxisMarginBottom(0.0f);
        this.ecgIHdgc.SetLineColor(getResources().getColor(R.color.black));
        HisDataGridChart hisDataGridChart2 = (HisDataGridChart) findViewById(R.id.ecgii_hdgc);
        this.ecgIIHdgc = hisDataGridChart2;
        hisDataGridChart2.setAxisMarginLeft(0.0f);
        this.ecgIIHdgc.setAxisMarginBottom(0.0f);
        this.ecgIIHdgc.SetLineColor(getResources().getColor(R.color.black));
        HisDataGridChart hisDataGridChart3 = (HisDataGridChart) findViewById(R.id.ecgiii_hdgc);
        this.ecgIIIHdgc = hisDataGridChart3;
        hisDataGridChart3.setAxisMarginLeft(0.0f);
        this.ecgIIIHdgc.setAxisMarginBottom(0.0f);
        this.ecgIIIHdgc.SetLineColor(getResources().getColor(R.color.black));
        HisDataGridChart hisDataGridChart4 = (HisDataGridChart) findViewById(R.id.ecgavr_hdgc);
        this.ecgAVRHdgc = hisDataGridChart4;
        hisDataGridChart4.setAxisMarginLeft(0.0f);
        this.ecgAVRHdgc.setAxisMarginBottom(0.0f);
        this.ecgAVRHdgc.SetLineColor(getResources().getColor(R.color.black));
        HisDataGridChart hisDataGridChart5 = (HisDataGridChart) findViewById(R.id.ecgavl_hdgc);
        this.ecgAVLHdgc = hisDataGridChart5;
        hisDataGridChart5.setAxisMarginLeft(0.0f);
        this.ecgAVLHdgc.setAxisMarginBottom(0.0f);
        this.ecgAVLHdgc.SetLineColor(getResources().getColor(R.color.black));
        HisDataGridChart hisDataGridChart6 = (HisDataGridChart) findViewById(R.id.ecgavf_hdgc);
        this.ecgAVFHdgc = hisDataGridChart6;
        hisDataGridChart6.setAxisMarginLeft(0.0f);
        this.ecgAVFHdgc.setAxisMarginBottom(0.0f);
        this.ecgAVFHdgc.SetLineColor(getResources().getColor(R.color.black));
        HisDataGridChart hisDataGridChart7 = (HisDataGridChart) findViewById(R.id.ecgv_hdgc);
        this.ecgVHdgc = hisDataGridChart7;
        hisDataGridChart7.setAxisMarginLeft(0.0f);
        this.ecgVHdgc.setAxisMarginBottom(0.0f);
        this.ecgVHdgc.SetLineColor(getResources().getColor(R.color.black));
        HisDataGridChart hisDataGridChart8 = (HisDataGridChart) findViewById(R.id.spo2_hdgc);
        this.spo2Hdgc = hisDataGridChart8;
        hisDataGridChart8.setAxisMarginLeft(0.0f);
        this.spo2Hdgc.setAxisMarginBottom(0.0f);
        this.spo2Hdgc.SetLineColor(getResources().getColor(R.color.black));
        HisDataGridChart hisDataGridChart9 = (HisDataGridChart) findViewById(R.id.resp_hdgc);
        this.respHdgc = hisDataGridChart9;
        hisDataGridChart9.setAxisMarginLeft(0.0f);
        this.respHdgc.setAxisMarginBottom(0.0f);
        this.respHdgc.SetLineColor(getResources().getColor(R.color.black));
        int i = this.gainType;
        if (i == 1) {
            this.ydpi = AppGlobal.getInstance().displayMetrics.ydpi / 2.0f;
        } else if (i == 2) {
            this.ydpi = AppGlobal.getInstance().displayMetrics.ydpi;
        } else if (i == 3) {
            this.ydpi = AppGlobal.getInstance().displayMetrics.ydpi * 2.0f;
        }
        this.ecgIHdgc.SetDPI(this.ydpi / 2.0f);
        this.ecgIIHdgc.SetDPI(this.ydpi / 2.0f);
        this.ecgIIIHdgc.SetDPI(this.ydpi / 2.0f);
        this.ecgAVRHdgc.SetDPI(this.ydpi / 2.0f);
        this.ecgAVLHdgc.SetDPI(this.ydpi / 2.0f);
        this.ecgAVFHdgc.SetDPI(this.ydpi / 2.0f);
        this.ecgVHdgc.SetDPI(this.ydpi / 2.0f);
        this.spo2Hdgc.SetDPI(this.ydpi);
        this.respHdgc.SetDPI(this.ydpi);
        ProgressBar progressBar = (ProgressBar) findViewById(R.id.progressBarserch);
        this.progressBar = progressBar;
        progressBar.setVisibility(8);
        this.seekBar = findViewById(R.id.timer_sb);
        ((LinearLayout) findViewById(R.id.seekbar_ll)).setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View view, MotionEvent motionEvent) {
                float f;
                Rect rect = new Rect();
                WalkTestEcgReviewActivity.this.seekBar.getHitRect(rect);
                if (motionEvent.getY() < rect.top - 500 || motionEvent.getY() > rect.bottom + 500) {
                    return false;
                }
                float height = rect.top + (rect.height() / 2);
                float x = motionEvent.getX() - rect.left;
                if (x < 0.0f) {
                    f = 0.0f;
                } else {
                    f = x > ((float) rect.width()) ? rect.width() : x;
                }
                return WalkTestEcgReviewActivity.this.seekBar.onTouchEvent(MotionEvent.obtain(motionEvent.getDownTime(), motionEvent.getEventTime(), motionEvent.getAction(), f, height, motionEvent.getMetaState()));
            }
        });
        this.seekBar.customTickTexts(new String[]{"", "16s", "", "32s", "", "48s", "", "64s", "", "80s", "", "96s", "", "112s", "", "128s", "", "144s", "", "160s", "", "176s", "", "192s", "", "208s", "", "224s", "", "240s", "", "256s", "", "272s", "", "288s", "", "304s", "", "320s", "", "336s", "", "352s", "", "368s", "", "384s", "", "400s", "", "416s", "", "432s", "", "448s", "", "464s", "", "480s"});
        this.seekBar.customSectionTrackColor(new ColorCollector() {
            public boolean collectSectionTrackColor(int[] iArr) {
                int i2;
                int i3;
                int i4 = 0;
                while (true) {
                    i2 = 7;
                    if (i4 >= 7) {
                        break;
                    }
                    iArr[i4] = WalkTestEcgReviewActivity.this.getResources().getColor(R.color.yellow);
                    i4++;
                }
                while (true) {
                    if (i2 >= 51) {
                        break;
                    }
                    iArr[i2] = WalkTestEcgReviewActivity.this.getResources().getColor(R.color.main_blue);
                    i2++;
                }
                for (i3 = 51; i3 < 59; i3++) {
                    iArr[i3] = WalkTestEcgReviewActivity.this.getResources().getColor(R.color.yellow);
                }
                return true;
            }
        });
        this.seekBar.setOnSeekChangeListener(new OnSeekChangeListener() {
            public void onSeeking(SeekParams seekParams) {
            }

            public void onStartTrackingTouch(IndicatorSeekBar indicatorSeekBar) {
            }

            public void onStopTrackingTouch(IndicatorSeekBar indicatorSeekBar) {
                int count = WalkTestEcgReviewActivity.this.getCount(indicatorSeekBar);
                WalkTestEcgReviewActivity walkTestEcgReviewActivity = WalkTestEcgReviewActivity.this;
                walkTestEcgReviewActivity.mSearchTime = walkTestEcgReviewActivity.startTime + (count * 8000);
                WalkTestEcgReviewActivity.this.mHandler.sendEmptyMessage(0);
            }
        });
        Button button = (Button) findViewById(R.id.goback);
        this.goback = button;
        button.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                WalkTestEcgReviewActivity.this.m232x68ee4b8c(view);
            }
        });
        Button button2 = (Button) findViewById(R.id.confirm_btn);
        this.confirmBtn = button2;
        button2.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                WalkTestEcgReviewActivity.this.m233xf628fd0d(view);
            }
        });
        TextView textView = (TextView) findViewById(R.id.ecg_gain_tv);
        this.tvGainType = textView;
        int i2 = this.gainType;
        if (i2 == 1) {
            textView.setText(R.string.gain1);
        } else if (i2 == 2) {
            textView.setText(R.string.gain2);
        } else if (i2 == 3) {
            textView.setText(R.string.gain3);
        }
        TextView textView2 = (TextView) findViewById(R.id.slow_timestamp_tv);
        this.slowTimeTv = textView2;
        long j = this.slowTime;
        String str = DEFAULT_TIME_FORMAT;
        textView2.setText(j == 0 ? DEFAULT_TIME_FORMAT : DateUtils.longToHourMinuteSecond(j));
        Button button3 = (Button) findViewById(R.id.select_slow_btn);
        this.selectSlowBtn = button3;
        button3.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                WalkTestEcgReviewActivity.this.m234x8363ae8e(view);
            }
        });
        Button button4 = (Button) findViewById(R.id.delete_slow_btn);
        this.deleteSlowBtn = button4;
        button4.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                WalkTestEcgReviewActivity.this.m235x109e600f(view);
            }
        });
        TextView textView3 = (TextView) findViewById(R.id.fast_timestamp_tv);
        this.fastTimeTv = textView3;
        textView3.setText(DEFAULT_TIME_FORMAT);
        TextView textView4 = this.fastTimeTv;
        long j2 = this.fastTime;
        if (j2 != 0) {
            str = DateUtils.longToHourMinuteSecond(j2);
        }
        textView4.setText(str);
        Button button5 = (Button) findViewById(R.id.select_fast_btn);
        this.selectFastBtn = button5;
        button5.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                WalkTestEcgReviewActivity.this.m236x9dd91190(view);
            }
        });
        Button button6 = (Button) findViewById(R.id.delete_fast_btn);
        this.deleteFastBtn = button6;
        button6.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                WalkTestEcgReviewActivity.this.m237x2b13c311(view);
            }
        });
        Button button7 = (Button) findViewById(R.id.select_other_btn);
        this.selectOtherBtn = button7;
        button7.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                WalkTestEcgReviewActivity.this.m238xb84e7492(view);
            }
        });
        this.markTv = (TextView) findViewById(R.id.mark_tv);
        showEcgMark();
        this.mHandler.sendEmptyMessageDelayed(0, 100L);
        hideResp();
    }

    public void m232x68ee4b8c(View view) {
        finish();
    }

    public void m233xf628fd0d(View view) {
        DataRepository.getInstance().getEcgMarkDao().delete(this.patient.getIdCard(), this.currentTime);
        DataRepository.getInstance().getEcgMarkDao().insertOrReplace(this.listData);
        KLog.i("user select ecg slow time: " + ((Object) this.slowTimeTv.getText()) + ", ecg fast time: " + ((Object) this.fastTimeTv.getText()));
        KLog.i("ecg mark list: " + this.listData);
        Intent intent = new Intent();
        intent.putExtra("slow_time", this.slowTime);
        intent.putExtra("fast_time", this.fastTime);
        setResult(-1, intent);
        finish();
    }

    public void m234x8363ae8e(View view) {
        long count = this.startTime + (getCount(this.seekBar) * 8000);
        this.slowTime = count;
        this.slowTimeTv.setText(DateUtils.longToHourMinuteSecond(count));
    }

    public void m235x109e600f(View view) {
        this.slowTimeTv.setText(DEFAULT_TIME_FORMAT);
        this.slowTime = 0L;
    }

    public void m236x9dd91190(View view) {
        long count = this.startTime + (getCount(this.seekBar) * 8000);
        this.fastTime = count;
        this.fastTimeTv.setText(DateUtils.longToHourMinuteSecond(count));
    }

    public void m237x2b13c311(View view) {
        this.fastTimeTv.setText(DEFAULT_TIME_FORMAT);
        this.fastTime = 0L;
    }

    public void m238xb84e7492(View view) {
        EcgMarkListPopupWindow ecgMarkListPopupWindow = new EcgMarkListPopupWindow(this, this.listData, this.patient.getIdCard(), this.currentTime, this.startTime + (getCount(this.seekBar) * 8000), new EcgMarkListPopupWindow.EcgMarkBackListener() {
            @Override
            public void onBack(List<EcgMarkEntity> list) {
                KLog.i("ecg mark list: " + WalkTestEcgReviewActivity.this.listData);
                WalkTestEcgReviewActivity.this.showEcgMark();
            }
        });
        ecgMarkListPopupWindow.setOutSideDismiss(false);
        ecgMarkListPopupWindow.setBackPressEnable(false);
        ecgMarkListPopupWindow.showPopupWindow();
    }

    protected Layout getLayout() {
        return Layout.createLayoutByID(R.layout.activity_walk_test_ecg_review);
    }

    private void hideResp() {
        if (GzjSharePref.getBoolValue(GzjSharePref.KEY_SHOW_RESP)) {
            return;
        }
        findViewById(R.id.fl_resp).setVisibility(8);
    }

    public int getCount(IndicatorSeekBar indicatorSeekBar) {
        float progressFloat = (indicatorSeekBar.getProgressFloat() - 1.0E-4f) / (100.0f / indicatorSeekBar.getTickCount());
        int i = (int) progressFloat;
        System.out.println("seekBar count: " + i + ", seekBar.getProgressFloat()=" + indicatorSeekBar.getProgressFloat() + ", countFloat=" + progressFloat);
        return i;
    }

    public void clearList() {
        this.originalPoint = 0L;
        this.dataTime = 0L;
        this.ecgIList.clear();
        this.ecgIIList.clear();
        this.ecgIIIList.clear();
        this.ecgVList.clear();
        this.ecgAVLList.clear();
        this.ecgAVFList.clear();
        this.ecgAVRList.clear();
        this.spo2List.clear();
        this.respList.clear();
    }

    protected void onDestroy() {
        super.onDestroy();
        DisplayUtils.resetDeviceConfigDisplay(this);
        this.mHandler.removeMessages(0);
    }

    public void drawWaveLine(List<?> list, long j, long j2, int i) {
        System.out.println("进入 drawLine");
        int i2 = this.speedType;
        int i3 = 2000;
        if (i2 == 1) {
            i3 = 4000;
        } else if (i2 != 2 && i2 == 3) {
            i3 = 1000;
        }
        if (list == this.ecgIList) {
            this.ecgIHdgc.SetDataType(10, i3, 10.0f);
            this.ecgIHdgc.drawWaveDataLine(list, j, j2, i, 0.8f);
            this.ecgIHdgc.postInvalidate();
            return;
        }
        if (list == this.ecgIIList) {
            this.ecgIIHdgc.SetDataType(10, i3, 10.0f);
            this.ecgIIHdgc.drawWaveDataLine(list, j, j2, i, 0.8f);
            this.ecgIIHdgc.postInvalidate();
            return;
        }
        if (list == this.ecgIIIList) {
            this.ecgIIIHdgc.SetDataType(10, i3, 10.0f);
            this.ecgIIIHdgc.drawWaveDataLine(list, j, j2, i, 0.8f);
            this.ecgIIIHdgc.postInvalidate();
            return;
        }
        if (list == this.ecgAVRList) {
            this.ecgAVRHdgc.SetDataType(10, i3, 10.0f);
            this.ecgAVRHdgc.drawWaveDataLine(list, j, j2, i, 1.1f);
            this.ecgAVRHdgc.postInvalidate();
            return;
        }
        if (list == this.ecgAVLList) {
            this.ecgAVLHdgc.SetDataType(10, i3, 10.0f);
            this.ecgAVLHdgc.drawWaveDataLine(list, j, j2, i, 0.8f);
            this.ecgAVLHdgc.postInvalidate();
            return;
        }
        if (list == this.ecgAVFList) {
            this.ecgAVFHdgc.SetDataType(10, i3, 10.0f);
            this.ecgAVFHdgc.drawWaveDataLine(list, j, j2, i, 0.8f);
            this.ecgAVFHdgc.postInvalidate();
            return;
        }
        if (list == this.ecgVList) {
            this.ecgVHdgc.SetDataType(10, i3, 10.0f);
            this.ecgVHdgc.drawWaveDataLine(list, j, j2, i, 0.8f);
            this.ecgVHdgc.postInvalidate();
        } else if (list == this.spo2List) {
            this.spo2Hdgc.SetDataType(9, i3 / 2, 10.0f);
            this.spo2Hdgc.drawOtherWaveDataLine(list, j, j2, i);
            this.spo2Hdgc.postInvalidate();
        } else if (list == this.respList) {
            this.respHdgc.SetDataType(8, i3 / 2, 10.0f);
            this.respHdgc.drawOtherWaveDataLine(list, j, j2, i);
            this.respHdgc.postInvalidate();
        }
    }

    public void getECGIList(int i, int i2) {
        int i3;
        int i4 = i;
        while (true) {
            i3 = i + i2;
            if (i4 >= i3) {
                break;
            }
            if (i4 < TestWaveDataLists.getInstance().getECGIWaveDataFilterList().size()) {
                this.ecgIList.add(TestWaveDataLists.getInstance().getECGIWaveDataFilterList().get(i4));
            }
            i4++;
        }
        while (i < i3) {
            if (i < TestWaveDataLists.getInstance().getECGIIWaveDataFilterList().size()) {
                this.ecgIIList.add(TestWaveDataLists.getInstance().getECGIIWaveDataFilterList().get(i));
            }
            i++;
        }
    }

    public void getECGIIIList(int i, int i2) {
        for (int i3 = i; i3 < i + i2; i3++) {
            if (i3 < TestWaveDataLists.getInstance().getECGIIIWaveDataFilterList().size()) {
                this.ecgIIIList.add(TestWaveDataLists.getInstance().getECGIIIWaveDataFilterList().get(i3));
            }
        }
    }

    public void getECGaVLList(int i, int i2) {
        for (int i3 = i; i3 < i + i2; i3++) {
            if (i3 < TestWaveDataLists.getInstance().getECGaVLWaveDataFilterList().size()) {
                this.ecgAVLList.add(TestWaveDataLists.getInstance().getECGaVLWaveDataFilterList().get(i3));
            }
        }
    }

    public void getECGaVFList(int i, int i2) {
        for (int i3 = i; i3 < i + i2; i3++) {
            if (i3 < TestWaveDataLists.getInstance().getECGaVFWaveDataFilterList().size()) {
                this.ecgAVFList.add(TestWaveDataLists.getInstance().getECGaVFWaveDataFilterList().get(i3));
            }
        }
    }

    public void getECGaVRList(int i, int i2) {
        for (int i3 = i; i3 < i + i2; i3++) {
            if (i3 < TestWaveDataLists.getInstance().getECGaVRWaveDataFilterList().size()) {
                this.ecgAVRList.add(TestWaveDataLists.getInstance().getECGaVRWaveDataFilterList().get(i3));
            }
        }
    }

    public void getECGVList(int i, int i2) {
        for (int i3 = i; i3 < i + i2; i3++) {
            if (i3 < TestWaveDataLists.getInstance().getECGVWaveDataFilterList().size()) {
                this.ecgVList.add(TestWaveDataLists.getInstance().getECGVWaveDataFilterList().get(i3));
            }
        }
    }

    public void getSpo2List(int i, int i2) {
        for (int i3 = i; i3 < i + i2; i3++) {
            if (i3 < TestWaveDataLists.getInstance().getSpo2WaveDataList().size()) {
                this.spo2List.add(TestWaveDataLists.getInstance().getSpo2WaveDataList().get(i3));
            }
        }
    }

    public void getRespList(int i, int i2) {
        for (int i3 = i; i3 < i + i2; i3++) {
            if (i3 < TestWaveDataLists.getInstance().getRespWaveDataList().size()) {
                this.respList.add(TestWaveDataLists.getInstance().getRespWaveDataList().get(i3));
            }
        }
    }

    public void getAllEcgList(int i, int i2) {
        getECGIList(i, i2);
        getECGIIIList(i, i2);
        getECGaVLList(i, i2);
        getECGaVFList(i, i2);
        getECGaVRList(i, i2);
        getECGVList(i, i2);
        int i3 = i / 2;
        int i4 = i2 / 2;
        getSpo2List(i3, i4);
        getRespList(i3, i4);
    }

    public void getLine() {
        long j = this.mSearchTime - this.startTime;
        int i = this.speedType;
        int i2 = 2000;
        if (i == 1) {
            i2 = 4000;
        } else if (i != 2 && i == 3) {
            i2 = 1000;
        }
        int i3 = i2;
        getAllEcgList(Math.max((int) (j / 4), 0), i3);
        drawWaveLine(this.ecgIList, this.originalPoint, this.dataTime, i3);
        drawWaveLine(this.ecgIIList, this.originalPoint, this.dataTime, i3);
        drawWaveLine(this.ecgIIIList, this.originalPoint, this.dataTime, i3);
        drawWaveLine(this.ecgAVLList, this.originalPoint, this.dataTime, i3);
        drawWaveLine(this.ecgAVFList, this.originalPoint, this.dataTime, i3);
        drawWaveLine(this.ecgAVRList, this.originalPoint, this.dataTime, i3);
        drawWaveLine(this.ecgVList, this.originalPoint, this.dataTime, i3);
        int i4 = i3 / 2;
        drawWaveLine(this.spo2List, this.originalPoint, this.dataTime, i4);
        drawWaveLine(this.respList, this.originalPoint, this.dataTime, i4);
    }

    public void showEcgMark() {
        StringBuilder sb = new StringBuilder();
        Iterator<EcgMarkEntity> it = this.listData.iterator();
        while (true) {
            if (!it.hasNext()) {
                break;
            }
            EcgMarkEntity next = it.next();
            if (next.getEcgTime().longValue() == this.mSearchTime) {
                sb.append(next.getEcgDesc());
                break;
            }
        }
        long j = this.fastTime;
        long j2 = this.mSearchTime;
        if (j >= j2 && j < j2 + 8000) {
            if (TextUtils.isEmpty(sb)) {
                sb.append(getString(R.string.fast));
            } else {
                sb.append("&").append(getString(R.string.fast));
            }
        }
        long j3 = this.slowTime;
        long j4 = this.mSearchTime;
        if (j3 >= j4 && j3 < j4 + 8000) {
            if (TextUtils.isEmpty(sb)) {
                sb.append(getString(R.string.slow));
            } else {
                sb.append("&").append(getString(R.string.slow));
            }
        }
        this.markTv.setText(sb);
        this.markTv.setVisibility(TextUtils.isEmpty(sb) ? 8 : 0);
    }
}