-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
23 changed files
with
427 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
soter-client-sdk/soter-core/src/main/aidl/com/tencent/soter/soterserver/SoterExtraParam.aidl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
// SoterExtraParam.aidl | ||
package com.tencent.soter.soterserver; | ||
|
||
// Declare any non-default types here with import statements | ||
parcelable SoterExtraParam; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
...dk/soter-core/src/main/java/com/tencent/soter/core/model/SoterExParametersTrebleImpl.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.tencent.soter.core.model; | ||
|
||
import android.support.annotation.NonNull; | ||
|
||
import com.tencent.soter.core.model.ISoterExParameters; | ||
|
||
public class SoterExParametersTrebleImpl implements ISoterExParameters { | ||
|
||
private static int fingerprintType = FINGERPRINT_TYPE_UNDEFINE; | ||
|
||
private static int[] fingerprintPosition = null; | ||
|
||
@Override | ||
public Object getParam(@NonNull String key, Object defVal) { | ||
synchronized (SoterExParametersTrebleImpl.class) { | ||
if (FINGERPRINT_TYPE.equals(key)) { | ||
return fingerprintType != FINGERPRINT_TYPE_UNDEFINE ? fingerprintType : defVal; | ||
} else if (FINGERPRINT_HARDWARE_POSITION.equals(key)) { | ||
return fingerprintPosition != null ? fingerprintPosition : defVal; | ||
} | ||
return null; | ||
} | ||
} | ||
|
||
public static void setParam(@NonNull String key, Object value) { | ||
synchronized (SoterExParametersTrebleImpl.class) { | ||
if (FINGERPRINT_TYPE.equals(key)) { | ||
fingerprintType = (int) value; | ||
} else if (FINGERPRINT_HARDWARE_POSITION.equals(key)) { | ||
fingerprintPosition = (int[]) value; | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 34 additions & 0 deletions
34
soter-client-sdk/soter-core/src/main/java/com/tencent/soter/soterserver/SoterExtraParam.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
package com.tencent.soter.soterserver; | ||
|
||
import android.os.Parcel; | ||
import android.os.Parcelable; | ||
|
||
public class SoterExtraParam implements Parcelable { | ||
public Object result; | ||
|
||
protected SoterExtraParam(Parcel in) { | ||
result = in.readValue(getClass().getClassLoader()); | ||
} | ||
|
||
public static final Creator<SoterExtraParam> CREATOR = new Creator<SoterExtraParam>() { | ||
@Override | ||
public SoterExtraParam createFromParcel(Parcel in) { | ||
return new SoterExtraParam(in); | ||
} | ||
|
||
@Override | ||
public SoterExtraParam[] newArray(int size) { | ||
return new SoterExtraParam[size]; | ||
} | ||
}; | ||
|
||
@Override | ||
public int describeContents() { | ||
return 0; | ||
} | ||
|
||
@Override | ||
public void writeToParcel(Parcel dest, int flags) { | ||
dest.writeValue(result); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters