Skip to content

Commit e38698d

Browse files
authored
Merge pull request #112 from OneSignal/remove_android_support_use_in_wrapper
Removed Android Support use in wrapper code
2 parents 81b5db1 + 8a9f6b7 commit e38698d

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

android/src/main/java/com/onesignal/flutter/FlutterRegistrarResponder.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.onesignal.flutter;
22

33
import android.app.Activity;
4-
import android.support.annotation.NonNull;
54

65
import java.util.HashMap;
76

@@ -54,11 +53,11 @@ public void run() {
5453
});
5554
}
5655

57-
protected void runOnMainThread(@NonNull final Runnable runnable) {
56+
protected void runOnMainThread(final Runnable runnable) {
5857
((Activity)flutterRegistrar.activeContext()).runOnUiThread(runnable);
5958
}
6059

61-
protected void invokeMethodOnUiThread(@NonNull final String methodName, @NonNull final HashMap map) {
60+
protected void invokeMethodOnUiThread(final String methodName, final HashMap map) {
6261
final MethodChannel channel = this.channel;
6362
runOnMainThread(new Runnable() {
6463
@Override

android/src/main/java/com/onesignal/flutter/OneSignalPlugin.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package com.onesignal.flutter;
22

33
import android.content.Context;
4-
import android.support.annotation.NonNull;
54

65
import com.onesignal.OSEmailSubscriptionObserver;
76
import com.onesignal.OSEmailSubscriptionStateChanges;
@@ -66,7 +65,7 @@ public static void registerWith(Registrar registrar) {
6665
}
6766

6867
@Override
69-
public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
68+
public void onMethodCall(MethodCall call, Result result) {
7069
if (call.method.contentEquals("OneSignal#init"))
7170
initOneSignal(call, result);
7271
else if (call.method.contentEquals("OneSignal#setLogLevel"))

android/src/main/java/com/onesignal/flutter/OneSignalTagsController.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
package com.onesignal.flutter;
22

3-
import android.support.annotation.NonNull;
4-
53
import io.flutter.plugin.common.MethodCall;
64
import io.flutter.plugin.common.MethodChannel;
75
import io.flutter.plugin.common.MethodChannel.MethodCallHandler;
@@ -31,7 +29,7 @@ class OSFlutterChangeTagsHandler extends FlutterRegistrarResponder implements Ch
3129
// the tags callbacks can in some instances be called more than once
3230
// ie. cached vs. server response.
3331
// this property guarantees the callback will never be called more than once.
34-
@NonNull private AtomicBoolean replySubmitted = new AtomicBoolean(false);
32+
private AtomicBoolean replySubmitted = new AtomicBoolean(false);
3533

3634
OSFlutterChangeTagsHandler(PluginRegistry.Registrar flutterRegistrar, MethodChannel channel, Result res) {
3735
this.flutterRegistrar = flutterRegistrar;
@@ -84,7 +82,7 @@ static void registerWith(Registrar registrar) {
8482
}
8583

8684
@Override
87-
public void onMethodCall(@NonNull MethodCall call, @NonNull Result result) {
85+
public void onMethodCall(MethodCall call, Result result) {
8886
if (call.method.contentEquals("OneSignal#getTags"))
8987
OneSignal.getTags(new OSFlutterChangeTagsHandler(registrar, channel, result));
9088
else if (call.method.contentEquals("OneSignal#sendTags"))

0 commit comments

Comments
 (0)