Skip to content

Commit 34c94ba

Browse files
author
Paolo Rotolo
committed
Remove FreeStyle Libre support, sob :(
1 parent 9c227c6 commit 34c94ba

File tree

8 files changed

+1
-486
lines changed

8 files changed

+1
-486
lines changed

app/src/main/AndroidManifest.xml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@
2020
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
2121
package="org.glucosio.android">
2222

23-
<uses-permission
24-
android:name="android.permission.NFC"
25-
android:required="false" />
26-
27-
<uses-feature
28-
android:name="android.hardware.nfc"
29-
android:required="false" />
30-
3123
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
3224
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
3325

@@ -140,19 +132,6 @@
140132
android:name="android.support.PARENT_ACTIVITY"
141133
android:value="org.glucosio.android.activity.MainActivity" />
142134
</activity>
143-
<activity android:name=".activity.FreestyleLibre">
144-
145-
<!-- NFC for FreeStyle -->
146-
<intent-filter>
147-
<action android:name="android.nfc.action.TECH_DISCOVERED" />
148-
149-
<category android:name="android.intent.category.DEFAULT" />
150-
</intent-filter>
151-
152-
<meta-data
153-
android:name="android.nfc.action.TECH_DISCOVERED"
154-
android:resource="@xml/nfc_tech_filter" />
155-
</activity>
156135
<activity
157136
android:name=".activity.A1cCalculatorActivity"
158137
android:label="@string/activity_converter_title"

app/src/main/java/org/glucosio/android/activity/AddGlucoseActivity.java

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)