Skip to content

Commit e730a79

Browse files
committed
v2.0.0
1 parent 2e72f1d commit e730a79

30 files changed

+140
-135
lines changed

hwsecurity-fido/build.gradle

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,11 @@ dependencies {
2727
testImplementation 'org.mockito:mockito-core:2.18.0'
2828
}
2929

30-
3130
android {
3231
compileSdkVersion rootProject.ext.compileSdkVersion
3332

3433
defaultConfig {
35-
minSdkVersion 19
34+
minSdkVersion 14
3635
versionCode rootProject.ext.hwSdkVersionCode
3736
versionName rootProject.ext.hwSdkVersionName
3837
vectorDrawables.useSupportLibrary = true

hwsecurity-fido/src/main/AndroidManifest.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,5 @@
22
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
33
package="de.cotech.hw.fido">
44

5-
<application>
6-
<!--<activity-->
7-
<!--android:name="de.cotech.hw.fido.ui.FidoU2fActivity"-->
8-
<!--android:theme="@style/HwSecurity.Dialog.Translucent" />-->
9-
</application>
5+
<application />
106
</manifest>

hwsecurity-fido/src/main/java/de/cotech/hw/fido/FidoAuthenticateRequest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,7 @@
3535
import org.json.JSONException;
3636
import org.json.JSONObject;
3737

38-
/**
39-
* TODO: Make this more similar to the specified Javascript API?
40-
* https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-javascript-api-v1.2-ps-20170411.html
41-
*/
38+
4239
@AutoValue
4340
public abstract class FidoAuthenticateRequest implements Parcelable {
4441
private static final String REQUEST_TYP_AUTH = "navigator.id.getAssertion";

hwsecurity-fido/src/main/java/de/cotech/hw/fido/FidoRegisterRequest.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,7 @@
3232
import org.json.JSONException;
3333
import org.json.JSONObject;
3434

35-
/**
36-
* TODO: Make this more similar to the specified Javascript API?
37-
* https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-javascript-api-v1.2-ps-20170411.html
38-
*/
35+
3936
@AutoValue
4037
public abstract class FidoRegisterRequest implements Parcelable {
4138
private static final String REQUEST_TYP_REGISTER = "navigator.id.finishEnrollment";

hwsecurity-fido/src/main/java/de/cotech/hw/fido/WebsafeBase64.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@
3434
public class WebsafeBase64 {
3535

3636
/**
37-
* websafe-base64 encoding
38-
* This is the "Base 64 Encoding with URL and Filename Safe Alphabet" from Section 5 in [RFC4648] without padding.
39-
* See Section 7
40-
* https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-raw-message-formats-v1.2-ps-20170411.html#bib-RFC4648
37+
* Websafe Base64 encoding as specified by the FIDO U2F specification:
38+
* https://fidoalliance.org/specs/fido-u2f-v1.2-ps-20170411/fido-u2f-raw-message-formats-v1.2-ps-20170411.html#client-data
4139
*/
4240
public static String encodeToString(byte[] decoded) {
4341
return Base64.encodeToString(decoded, Base64.NO_PADDING | Base64.NO_WRAP | Base64.URL_SAFE);
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/**
2+
* The FIDO package of the Security Hardware SDK.
3+
*/
4+
package de.cotech.hw.fido;

hwsecurity-fido/src/main/java/de/cotech/hw/fido/ui/FidoDialogFragment.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
import androidx.constraintlayout.widget.ConstraintLayout;
6565
import androidx.constraintlayout.widget.Guideline;
6666
import androidx.coordinatorlayout.widget.CoordinatorLayout;
67+
import androidx.core.view.ViewCompat;
6768
import androidx.fragment.app.Fragment;
6869
import androidx.fragment.app.FragmentActivity;
6970
import androidx.fragment.app.FragmentManager;
@@ -556,7 +557,7 @@ private void animateNfcFinal() {
556557
Animatable2Compat.AnimationCallback animationCallback = new Animatable2Compat.AnimationCallback() {
557558
@Override
558559
public void onAnimationEnd(Drawable drawable) {
559-
if (!imageNfcFullscreen.isAttachedToWindow()) {
560+
if (!ViewCompat.isAttachedToWindow(imageNfcFullscreen)) {
560561
return;
561562
}
562563

@@ -749,15 +750,14 @@ private void animateError() {
749750
}
750751
}
751752

752-
@SuppressLint("NewApi")
753753
private void startAndLoopAnimation(ImageView imageView, int resId) {
754754
Animatable2Compat.AnimationCallback animationCallback = new Animatable2Compat.AnimationCallback() {
755755
@NonNull
756756
private final Handler fHandler = new Handler(Looper.getMainLooper());
757757

758758
@Override
759759
public void onAnimationEnd(@NonNull Drawable drawable) {
760-
if (!imageView.isAttachedToWindow()) {
760+
if (!ViewCompat.isAttachedToWindow(imageView)) {
761761
return;
762762
}
763763

hwsecurity-intent-nfc/src/main/AndroidManifest.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
<application>
66
<activity
7-
android:name="de.cotech.hw.NfcIntentDispatchActivity"
7+
android:name="de.cotech.hw.internal.dispatch.NfcIntentDispatchActivity"
88
android:excludeFromRecents="true"
99
android:noHistory="true"
1010
android:theme="@android:style/Theme.Translucent.NoTitleBar">
@@ -17,4 +17,4 @@
1717
android:resource="@xml/nfc_tech_filter" />
1818
</activity>
1919
</application>
20-
</manifest>
20+
</manifest>

hwsecurity-intent-usb/src/main/AndroidManifest.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
<application>
1010
<activity
11-
android:name="de.cotech.hw.UsbIntentDispatchActivity"
11+
android:name="de.cotech.hw.internal.dispatch.UsbIntentDispatchActivity"
1212
android:excludeFromRecents="true"
1313
android:noHistory="true"
1414
android:theme="@android:style/Theme.Translucent.NoTitleBar">
3.84 MB
Binary file not shown.

0 commit comments

Comments
 (0)