@@ -65,7 +65,6 @@ public class AddGlucoseActivity extends AppCompatActivity implements TimePickerD
6565 private TextView readingTextView ;
6666 private EditText typeCustomEditText ;
6767 private EditText notesEditText ;
68- private AppCompatButton addFreeStyleButton ;
6968 private TextInputLayout readingInputLayout ;
7069 private LabelledSpinner readingTypeSpinner ;
7170 private int pagerPosition = 0 ;
@@ -102,7 +101,6 @@ protected void onCreate(Bundle savedInstanceState) {
102101 readingTextView = (TextView ) findViewById (R .id .glucose_add_concentration );
103102 typeCustomEditText = (EditText ) findViewById (R .id .glucose_type_custom );
104103 readingInputLayout = (TextInputLayout ) findViewById (R .id .glucose_add_concentration_layout );
105- addFreeStyleButton = (AppCompatButton ) findViewById (R .id .glucose_add_freestyle_button );
106104 notesEditText = (EditText ) findViewById (R .id .glucose_add_notes );
107105
108106 presenter .updateSpinnerTypeTime ();
@@ -175,7 +173,7 @@ public void onClick(View v) {
175173 unitM .setText ("mmol/L" );
176174 }
177175
178- // If an id was passed, open the activity in edit mode
176+ // If an id is passed, open the activity in edit mode
179177 if (editId != 0 ){
180178 FormatDateTime dateTime = new FormatDateTime (getApplicationContext ());
181179 setTitle (R .string .title_activity_add_glucose_edit );
@@ -193,31 +191,6 @@ public void onClick(View v) {
193191 presenter .setReadingYear (splitDateTime .getYear ());
194192 presenter .setReadingMonth (splitDateTime .getMonth ());
195193 }
196-
197- // Check if activity was started from a NFC sensor
198- if (getIntent ().getExtras () != null ) {
199- Bundle p ;
200- String reading ;
201-
202- p = getIntent ().getExtras ();
203- reading = p .getString ("reading" );
204- if (reading !=null ) {
205- // If yes, first convert the decimal value from Freestyle to Integer
206- double d = Double .parseDouble (reading );
207- int glucoseValue = (int ) d ;
208- readingTextView .setText (glucoseValue + "" );
209- readingInputLayout .setErrorEnabled (true );
210- readingInputLayout .setError (getResources ().getString (R .string .dialog_add_glucose_freestylelibre_added ));
211- addFreeStyleButton .setVisibility (View .GONE );
212-
213- addAnalyticsEvent ();
214- }
215- } else {
216- // Check if FreeStyle support is enabled in Preferences
217- if (presenter .isFreeStyleLibreEnabled ()) {
218- addFreeStyleButton .setVisibility (View .VISIBLE );
219- }
220- }
221194 }
222195
223196 private void addAnalyticsEvent () {
@@ -337,11 +310,6 @@ public void onBackPressed() {
337310 finishActivity ();
338311 }
339312
340- public void startLibreActivity (View view ) {
341- Intent intent = new Intent (this , FreestyleLibre .class );
342- startActivity (intent );
343- }
344-
345313 @ Override
346314 protected void attachBaseContext (Context newBase ) {
347315 super .attachBaseContext (CalligraphyContextWrapper .wrap (newBase ));
0 commit comments