Skip to content

Commit

Permalink
fix incorrect handle key
Browse files Browse the repository at this point in the history
  • Loading branch information
pstromberg98 committed Aug 31, 2024
1 parent 6d4c981 commit 28fafbc
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public class RadarFlutterHeadlessReceiver extends RadarReceiver {
private static final Object lock = new Object();
private static final String TAG = "RadarFlutterPersistentReceiver";
private static final String CALLBACK_DISPATCHER_HANDLE_KEY = "callbackDispatcherHandle";
private static final String HEADLESS_EVENT_CALLBACK_HANDLE_KEY = "headlesEventCallbackHandle";
private static final String HEADLESS_EVENT_CALLBACK_HANDLE_KEY = "headlessEventCallbackHandle";

public RadarFlutterHeadlessReceiver(Context context) {
notification(context, "Initializing");
Expand Down Expand Up @@ -112,7 +112,7 @@ public void onClientLocationUpdated(Context context, Location location, boolean
HashMap<String, Object> res = new Gson().fromJson(obj.toString(), HashMap.class);

SharedPreferences sharedPrefs = context.getSharedPreferences(TAG, Context.MODE_PRIVATE);
Long headlessEventHandlerHandle = sharedPrefs.getLong("headlessEventCallbackHandle", 0);
Long headlessEventHandlerHandle = sharedPrefs.getLong(HEADLESS_EVENT_CALLBACK_HANDLE_KEY, 0);
// notification(context, "Attempting");
if (headlessEventHandlerHandle == 0L) {
// notification(context, "Failed: " + headlessEventHandlerHandle.toString());
Expand Down

0 comments on commit 28fafbc

Please sign in to comment.