Skip to content

Commit c34c727

Browse files
committed
Revert to min SDK 19
1 parent f916c78 commit c34c727

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

DeviceIdentifiersWrapper/src/main/java/com/zebra/deviceidentifierswrapper/RetrieveOEMInfoTask.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,10 @@ private static void registerCurrentApplication(Context context, Uri serviceIdent
107107
// You can copy/paste this snippet if you want to provide your own
108108
// certificate
109109
// TODO: use the following code snippet to extract your custom certificate if necessary
110-
final Signature[] arrSignatures = packageInfo.signingInfo.getApkContentsSigners();
110+
Signature[] arrSignatures = null;
111+
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.P) {
112+
arrSignatures = packageInfo.signingInfo.getApkContentsSigners();
113+
}
111114
if(arrSignatures == null || arrSignatures.length == 0)
112115
{
113116
if(callbackInterface != null)
@@ -125,7 +128,10 @@ private static void registerCurrentApplication(Context context, Uri serviceIdent
125128
final byte[] rawCert = sig.toByteArray();
126129

127130
// Get the certificate as a base64 string
128-
String encoded = Base64.getEncoder().encodeToString(rawCert);
131+
String encoded = null;
132+
if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.O) {
133+
encoded = Base64.getEncoder().encodeToString(rawCert);
134+
}
129135

130136
profileData =
131137
"<?xml version=\"1.0\" encoding=\"utf-8\"?>" +

0 commit comments

Comments
 (0)