diff --git a/Android/.idea/kotlinc.xml b/Android/.idea/kotlinc.xml deleted file mode 100644 index 1c24f9a..0000000 --- a/Android/.idea/kotlinc.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - \ No newline at end of file diff --git a/Android/.idea/misc.xml b/Android/.idea/misc.xml index d2e6725..c94b33b 100644 --- a/Android/.idea/misc.xml +++ b/Android/.idea/misc.xml @@ -1,33 +1,6 @@ - - - - - - - - + diff --git a/Android/.idea/vcs.xml b/Android/.idea/vcs.xml deleted file mode 100644 index 94a25f7..0000000 --- a/Android/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Android/decodesdk/src/main/java/net/irext/decodesdk/IRDecode.java b/Android/decodesdk/src/main/java/net/irext/decodesdk/IRDecode.java index fdda5e8..8cfb017 100644 --- a/Android/decodesdk/src/main/java/net/irext/decodesdk/IRDecode.java +++ b/Android/decodesdk/src/main/java/net/irext/decodesdk/IRDecode.java @@ -22,11 +22,11 @@ public class IRDecode { System.loadLibrary("irdecode"); } - private native int irACLibOpen(String fileName); + private native int irOpen(int category, int subCate, String fileName); - private native int[] irACControl(ACStatus acStatus, int functionCode); + private native int[] irDecode(int keyCode, ACStatus acStatus, int changeWindDirection); - private native void irACLibClose(); + private native void irClose(); private native TemperatureRange irACGetTemperatureRange(int acMode); @@ -36,12 +36,6 @@ public class IRDecode { private native int irACGetSupportedSwing(int acMode); - private native int irTVLibOpen(String fileName, int irHexEncode); - - private native int[] irTVControl(int key_number); - - private native void irTVLibClose(); - private static IRDecode mInstance; public static IRDecode getInstance() { @@ -51,16 +45,16 @@ public class IRDecode { return mInstance; } - public int openACBinary(String fileName) { - return irACLibOpen(fileName); + public int openBinary(int category, int subCate, String fileName) { + return irOpen(category, subCate, fileName); } - public int[] decodeACBinary(ACStatus acStatus, int functionCode) { - return irACControl(acStatus, functionCode); + public int[] decodeBinary(int keyCode, ACStatus acStatus, int changeWindDir) { + return irDecode(keyCode, acStatus, changeWindDir); } - public void closeACBinary() { - irACLibClose(); + public void closeBinary() { + irClose(); } public TemperatureRange getTemperatureRange(int acMode) { @@ -71,7 +65,8 @@ public class IRDecode { // cool, heat, auto, fan, de-humidification int []retSupportedMode = {0, 0, 0, 0, 0}; int supportedMode = irACGetSupportedMode(); - for (int i = Constants.ACMode.MODE_COOL.getValue(); i <= Constants.ACMode.MODE_DEHUMIDITY.getValue(); i++) { + for (int i = Constants.ACMode.MODE_COOL.getValue(); i <= + Constants.ACMode.MODE_DEHUMIDITY.getValue(); i++) { retSupportedMode[i] = (supportedMode >>> 1) & 1; } return retSupportedMode; @@ -100,20 +95,4 @@ public class IRDecode { } return retSupportedSwing; } - - public int openTVBinary(String fileName, int subCategory) { - int isHexType = 0; - if (2 == subCategory) { - isHexType = 1; - } - return irTVLibOpen(fileName, isHexType); - } - - public int[] decodeTVBinary(int keyCode) { - return irTVControl(keyCode); - } - - public void closeTVBinary() { - irTVLibClose(); - } }