Skip to content

Commit

Permalink
Merge pull request #11 from nubank/prevent-null-pointer
Browse files Browse the repository at this point in the history
do not get advertisingId anymore
  • Loading branch information
mateusvtt authored Apr 1, 2022
2 parents 6f207a8 + a46b5f9 commit a8f8ecc
Showing 1 changed file with 1 addition and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,29 +146,7 @@ public void onMethodCall(MethodCall call, final Result result) {
result.success(getCurrentLocale());
break;
case "advertisingId":
Thread thread = new Thread(){
public void run(){
try {
final String advId = getAdvertisingId();
mActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
result.success(advId);
}
});
} catch (Exception e) {
mActivity.runOnUiThread(new Runnable() {
@Override
public void run() {
result.success(null);
}
});
}
}
};

thread.start();

result.success(null);
break;
default:
result.notImplemented();
Expand Down

0 comments on commit a8f8ecc

Please sign in to comment.