Skip to content

Commit ba12377

Browse files
committed
FIX #90
1 parent ada34ca commit ba12377

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

library/src/main/java/com/github/gzuliyujiang/oaid/DeviceID.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ public void onOAIDGetComplete(String result) {
125125
Holder.INSTANCE.clientId = result;
126126
Holder.INSTANCE.oaid = result;
127127
OAIDLog.print("Client id is OAID/AAID: " + result);
128+
if (callback != null) {
129+
callback.onComplete(result, null);
130+
}
128131
}
129132

130133
@Override

library/src/main/java/com/github/gzuliyujiang/oaid/impl/MeizuImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
*/
1313
package com.github.gzuliyujiang.oaid.impl;
1414

15+
import android.annotation.SuppressLint;
1516
import android.content.Context;
1617
import android.content.pm.ProviderInfo;
1718
import android.database.Cursor;
@@ -58,6 +59,7 @@ public void doGet(final IGetter getter) {
5859
try (Cursor cursor = context.getContentResolver().query(uri, null, null,
5960
new String[]{"oaid"}, null)) {
6061
Objects.requireNonNull(cursor).moveToFirst();
62+
@SuppressLint("Range")
6163
String oaid = cursor.getString(cursor.getColumnIndex("value"));
6264
if (oaid == null || oaid.length() == 0) {
6365
throw new OAIDException("OAID query failed");

0 commit comments

Comments
 (0)