Skip to content

Commit 178d6a4

Browse files
committed
DEP-86: update classes to use androidx
1 parent 57d8122 commit 178d6a4

File tree

11 files changed

+42
-35
lines changed

11 files changed

+42
-35
lines changed

sample-app-2/src/main/java/com/yoti/mobile/android/sampleapp2/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.yoti.mobile.android.sampleapp2;
22

33
import android.content.Intent;
4-
import android.support.v7.app.AppCompatActivity;
4+
import androidx.appcompat.app.AppCompatActivity;
55
import android.os.Bundle;
66
import android.view.View;
77
import android.widget.ProgressBar;

sample-app-2/src/main/java/com/yoti/mobile/android/sampleapp2/ProfileActivity.java

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

33
import android.graphics.Bitmap;
44
import android.graphics.BitmapFactory;
5-
import android.support.v7.app.AppCompatActivity;
5+
import androidx.appcompat.app.AppCompatActivity;
66
import android.os.Bundle;
77
import android.util.Base64;
88
import android.widget.ImageView;

sample-app/src/main/java/com/yoti/mobile/android/sdk/sampleapp/MainActivity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.yoti.mobile.android.sdk.sampleapp;
22

33
import android.content.Intent;
4-
import android.support.v7.app.AppCompatActivity;
4+
import androidx.appcompat.app.AppCompatActivity;
55
import android.os.Bundle;
66
import android.view.View;
77
import android.widget.ProgressBar;
@@ -25,9 +25,9 @@ protected void onCreate(Bundle savedInstanceState) {
2525

2626
setContentView(R.layout.activity_main);
2727

28-
mYotiSDKButton = (YotiSDKButton) findViewById(R.id.button);
29-
mProgress = (ProgressBar) findViewById(R.id.progress);
30-
mMessage = (TextView)findViewById(R.id.text);
28+
mYotiSDKButton = findViewById(R.id.button);
29+
mProgress = findViewById(R.id.progress);
30+
mMessage = findViewById(R.id.text);
3131

3232
mYotiSDKButton.setOnYotiButtonClickListener(new YotiSDKButton.OnYotiButtonClickListener() {
3333
@Override

yoti-sdk/src/main/java/com/yoti/mobile/android/sdk/ReceiverActivity.java

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

33
import android.content.Intent;
44
import android.os.Bundle;
5-
import android.support.v7.app.AppCompatActivity;
5+
import androidx.appcompat.app.AppCompatActivity;
66

77
public class ReceiverActivity extends AppCompatActivity {
88

yoti-sdk/src/main/java/com/yoti/mobile/android/sdk/ShareAttributeManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.yoti.mobile.android.sdk;
22

3-
import android.support.annotation.NonNull;
4-
import android.support.annotation.Nullable;
3+
import androidx.annotation.NonNull;
4+
import androidx.annotation.Nullable;
55
import android.text.TextUtils;
66

77
import com.yoti.mobile.android.sdk.model.Scenario;

yoti-sdk/src/main/java/com/yoti/mobile/android/sdk/ShareAttributesContract.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package com.yoti.mobile.android.sdk;
22

33

4-
import android.support.annotation.Nullable;
4+
import androidx.annotation.Nullable;
55

66
public interface ShareAttributesContract {
77

yoti-sdk/src/main/java/com/yoti/mobile/android/sdk/YotiSDK.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import android.content.pm.PackageInfo;
55
import android.content.pm.PackageManager;
66
import android.os.ResultReceiver;
7-
import android.support.annotation.Nullable;
7+
import androidx.annotation.Nullable;
88

99
import com.yoti.mobile.android.sdk.exceptions.YotiSDKException;
1010
import com.yoti.mobile.android.sdk.exceptions.YotiSDKMinVersionException;

yoti-sdk/src/main/java/com/yoti/mobile/android/sdk/YotiSDKButton.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,19 @@
55
import android.os.Bundle;
66
import android.os.Handler;
77
import android.os.ResultReceiver;
8-
import android.support.annotation.NonNull;
9-
import android.support.annotation.Nullable;
10-
import android.support.v7.widget.AppCompatButton;
118
import android.util.AttributeSet;
129
import android.view.View;
1310

11+
import androidx.annotation.Nullable;
12+
import androidx.appcompat.widget.AppCompatButton;
13+
1414
import com.yoti.mobile.android.commons.ui.widget.YotiButton;
1515
import com.yoti.mobile.android.sdk.exceptions.YotiSDKException;
1616
import com.yoti.mobile.android.sdk.exceptions.YotiSDKNoYotiAppException;
1717

1818
/**
19-
* Custom {@link AppCompatButton} which will start its associated {@link com.yoti.mobile.android.sdk.model.Scenario} when clicked.
19+
* Custom {@link AppCompatButton} which will start its associated {@link
20+
* com.yoti.mobile.android.sdk.model.Scenario} when clicked.
2021
*/
2122
public class YotiSDKButton extends YotiButton implements View.OnClickListener {
2223

@@ -69,7 +70,7 @@ public void init(AttributeSet attrs) {
6970
}
7071

7172
@Override
72-
public void setOnClickListener(@Nullable OnClickListener l) {
73+
public void setOnClickListener(@Nullable View.OnClickListener l) {
7374
super.setOnClickListener(this);
7475
}
7576

yoti-sdk/src/main/java/com/yoti/mobile/android/sdk/kernelSDK/CertificateManager.java

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
package com.yoti.mobile.android.sdk.kernelSDK;
22

33
import android.content.Context;
4-
import android.support.annotation.NonNull;
5-
import android.support.annotation.RawRes;
4+
5+
import androidx.annotation.NonNull;
6+
import androidx.annotation.RawRes;
67

78
import com.yoti.mobile.android.sdk.YotiSDKLogger;
89

@@ -30,10 +31,12 @@ public CertificateManager(Context context) {
3031
/**
3132
* Store a certificate in the private file of the application
3233
*
33-
* @param certificateResourceId - the certificate resource identifier ot store in the key store
34-
* @param storeName - the key name used to identify this very store
35-
* @param password - the password to secure the keystore in which the certificate will be stored
36-
* @param alias - the alias for this certificate in the in the keystore
34+
* @param certificateResourceId - the certificate resource identifier ot store in the
35+
* key store
36+
* @param storeName - the key name used to identify this very store
37+
* @param password - the password to secure the keystore in which the certificate will
38+
* be stored
39+
* @param alias - the alias for this certificate in the in the keystore
3740
* @return true if the certificate has been successfully stored
3841
*/
3942
public boolean storeCrt(@RawRes int certificateResourceId,
@@ -57,11 +60,13 @@ public boolean storeCrt(@RawRes int certificateResourceId,
5760
/**
5861
* Force write the certificate in the designated key store
5962
*
60-
* @param certificateResourceId - the certificate resource identifier ot store in the key store
61-
* @param storeName - the key name used to identify this very store
62-
* @param password - the password to secure the keystore in which the certificate will be stored
63-
* @param alias - the alias for this certificate in the in the keystore
64-
* @param keyStore - the key store instance
63+
* @param certificateResourceId - the certificate resource identifier ot store in the
64+
* key store
65+
* @param storeName - the key name used to identify this very store
66+
* @param password - the password to secure the keystore in which the certificate will
67+
* be stored
68+
* @param alias - the alias for this certificate in the in the keystore
69+
* @param keyStore - the key store instance
6570
*/
6671
private void storeCertificateInKeyStore(@RawRes int certificateResourceId, @NonNull String storeName,
6772
@NonNull String password, @NonNull String alias,
@@ -91,10 +96,11 @@ private void storeCertificateInKeyStore(@RawRes int certificateResourceId, @NonN
9196
* Save the certificate in the key store and persist this key store on the file system
9297
*
9398
* @param storeName - the key name used to identify this very store
94-
* @param password - the password to secure the keystore in which the certificate will be stored
95-
* @param alias - the alias for this certificate in the in the keystore
96-
* @param keyStore - the key store instance
97-
* @param ca - the certificate to save
99+
* @param password - the password to secure the keystore in which the certificate will
100+
* be stored
101+
* @param alias - the alias for this certificate in the in the keystore
102+
* @param keyStore - the key store instance
103+
* @param ca - the certificate to save
98104
*/
99105
private void writeCertificateInKeyStore(@NonNull String storeName,
100106
@NonNull String password, @NonNull String alias,
@@ -124,8 +130,8 @@ private void writeCertificateInKeyStore(@NonNull String storeName,
124130
* Attempt to load the keystore from the file system if present or create new one if needed
125131
*
126132
* @param storeName the store name
127-
* @param password the password to load the existing store
128-
* @param store the store instance to load
133+
* @param password the password to load the existing store
134+
* @param store the store instance to load
129135
*/
130136
private void loadKeyStore(@NonNull String storeName, @NonNull String password, KeyStore store) throws CertificateException, NoSuchAlgorithmException, IOException {
131137
try {

yoti-sdk/src/main/java/com/yoti/mobile/android/sdk/kernelSDK/KernelSDK.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package com.yoti.mobile.android.sdk.kernelSDK;
22

3-
import android.support.annotation.NonNull;
3+
import androidx.annotation.NonNull;
44

55
import com.yoti.mobile.android.sdk.YotiSDKLogger;
66
import com.yoti.mobile.android.sdk.model.Scenario;

0 commit comments

Comments
 (0)