Skip to content

Commit

Permalink
FIX #90
Browse files Browse the repository at this point in the history
  • Loading branch information
liyujiang-gzu committed Dec 1, 2024
1 parent ada34ca commit ba12377
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,9 @@ public void onOAIDGetComplete(String result) {
Holder.INSTANCE.clientId = result;
Holder.INSTANCE.oaid = result;
OAIDLog.print("Client id is OAID/AAID: " + result);
if (callback != null) {
callback.onComplete(result, null);
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/
package com.github.gzuliyujiang.oaid.impl;

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

0 comments on commit ba12377

Please sign in to comment.