resolved decode example jni names issue for Android
This commit is contained in:
7
Android/.idea/kotlinc.xml
generated
7
Android/.idea/kotlinc.xml
generated
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="KotlinCommonCompilerArguments">
|
||||
<option name="languageVersion" value="1.1" />
|
||||
<option name="apiVersion" value="1.1" />
|
||||
</component>
|
||||
</project>
|
||||
29
Android/.idea/misc.xml
generated
29
Android/.idea/misc.xml
generated
@@ -1,33 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="EntryPointsManager">
|
||||
<entry_points version="2.0" />
|
||||
</component>
|
||||
<component name="NullableNotNullManager">
|
||||
<option name="myDefaultNullable" value="android.support.annotation.Nullable" />
|
||||
<option name="myDefaultNotNull" value="android.support.annotation.NonNull" />
|
||||
<option name="myNullables">
|
||||
<value>
|
||||
<list size="4">
|
||||
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.Nullable" />
|
||||
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nullable" />
|
||||
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.Nullable" />
|
||||
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.Nullable" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
<option name="myNotNulls">
|
||||
<value>
|
||||
<list size="4">
|
||||
<item index="0" class="java.lang.String" itemvalue="org.jetbrains.annotations.NotNull" />
|
||||
<item index="1" class="java.lang.String" itemvalue="javax.annotation.Nonnull" />
|
||||
<item index="2" class="java.lang.String" itemvalue="edu.umd.cs.findbugs.annotations.NonNull" />
|
||||
<item index="3" class="java.lang.String" itemvalue="android.support.annotation.NonNull" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" assert-keyword="true" jdk-15="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
||||
6
Android/.idea/vcs.xml
generated
6
Android/.idea/vcs.xml
generated
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user