Blame view

src/hdx/HdxUtil.java 1.57 KB
3c2353cd   杜方   1、畅游通核销app源码提交;
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
  package hdx;
  
  import android.content.Context;
  
  public class HdxUtil
  {
    private static final String TAG = "HdxUtil";
    public static final int CARDTYPE_IC = 1;
    public static final int CARDTYPE_PSAM = 2;
    public static final int SERIAL_FUNCTION_PRINTER = 0;
    public static final int SERIAL_FUNCTION_IDCARD = 1;
    private Context mContext = null;
  
    static
    {
      try {
  		System.loadLibrary("hdxutil");
  	} catch (Throwable e) {
  		e.printStackTrace();
  	}
    }
  
    public HdxUtil(Context context)
    {
      this.mContext = context;
    }
  
    public static int EnableBuzze(int enable) {
      return buzzerControl(enable);
    }
  
    public static int SetCameraBacklightness(int br)
    {
      return cameraBacklightControl(br);
    }
  
    public static int SetIDCARDPower(int enable) {
      try {
  		return SetRfidPower(enable);
  	} catch (Throwable e) {
  		e.printStackTrace();
  	}
  	return -1;
    }
  
    public static native int SetRfidPower(int paramInt);
  
    public static native int SetPrinterPower(int paramInt);
  
    public static native int GetCurrentSim();
  
    public static native int GetKey138Status();
  
    private static native int buzzerControl(int paramInt);
  
    public static native int SwitchSimCard(int paramInt);
  
    public static native int SwitchICCard(int paramInt);
  
    public static native int EnableKeyboard(int paramInt);
  
    public static native int SwitchSerialFunction(int paramInt);
  
    public static native int SetV12Power(int paramInt);
  
    public static native int SetDB9Power(int paramInt);
  
    public static native int SetFingerPower(int paramInt);
  
    private static native int cameraBacklightControl(int paramInt);
  }