From 82637ff8aba2b9aa3821bb1d65eeff5b50f50e18 Mon Sep 17 00:00:00 2001 From: James Cotton Date: Fri, 10 Aug 2012 10:20:21 -0500 Subject: [PATCH] Now the callbacks disconnect system alarms shouldn't need to check the fields are not null --- .../androidgcs/fragments/SystemAlarmsFragment.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/androidgcs/src/org/openpilot/androidgcs/fragments/SystemAlarmsFragment.java b/androidgcs/src/org/openpilot/androidgcs/fragments/SystemAlarmsFragment.java index 1bcbfee63..e311e7249 100644 --- a/androidgcs/src/org/openpilot/androidgcs/fragments/SystemAlarmsFragment.java +++ b/androidgcs/src/org/openpilot/androidgcs/fragments/SystemAlarmsFragment.java @@ -30,7 +30,6 @@ import org.openpilot.uavtalk.UAVObject; import org.openpilot.uavtalk.UAVObjectField; import org.openpilot.uavtalk.UAVObjectManager; -import android.app.Activity; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; @@ -73,16 +72,7 @@ public class SystemAlarmsFragment extends ObjectManagerFragment { if (DEBUG) Log.d(TAG, "Updated"); if (obj.getName().compareTo("SystemAlarms") == 0) { - Activity activity = getActivity(); - if (activity == null) { - // TODO: Need to unregister all the callbacks - return; - } TextView alarms = (TextView) getActivity().findViewById(R.id.system_alarms_fragment_field); - if (alarms == null) { - // TODO: Need to figure out how to unregister all the callbacks - return; - } UAVObjectField a = obj.getField("Alarm"); List names = a.getElementNames(); String contents = new String();