Skip to content

Commit a8f8ecc

Browse files
authored
Merge pull request #11 from nubank/prevent-null-pointer
do not get advertisingId anymore
2 parents 6f207a8 + a46b5f9 commit a8f8ecc

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

android/src/main/java/com/amplitude/amplitude_flutter/AmplitudeFlutterPlugin.java

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -146,29 +146,7 @@ public void onMethodCall(MethodCall call, final Result result) {
146146
result.success(getCurrentLocale());
147147
break;
148148
case "advertisingId":
149-
Thread thread = new Thread(){
150-
public void run(){
151-
try {
152-
final String advId = getAdvertisingId();
153-
mActivity.runOnUiThread(new Runnable() {
154-
@Override
155-
public void run() {
156-
result.success(advId);
157-
}
158-
});
159-
} catch (Exception e) {
160-
mActivity.runOnUiThread(new Runnable() {
161-
@Override
162-
public void run() {
163-
result.success(null);
164-
}
165-
});
166-
}
167-
}
168-
};
169-
170-
thread.start();
171-
149+
result.success(null);
172150
break;
173151
default:
174152
result.notImplemented();

0 commit comments

Comments
 (0)