Merge branch 'dev' of https://github.com/MilosKozak/AndroidAPS into food
This commit is contained in:
commit
d9f59840b6
|
@ -10,6 +10,7 @@ import android.preference.PreferenceActivity;
|
|||
import android.preference.PreferenceFragment;
|
||||
import android.preference.PreferenceGroup;
|
||||
import android.preference.PreferenceManager;
|
||||
import android.text.TextUtils;
|
||||
|
||||
import info.nightscout.androidaps.events.EventPreferenceChange;
|
||||
import info.nightscout.androidaps.events.EventRefreshGui;
|
||||
|
@ -73,6 +74,9 @@ public class PreferencesActivity extends PreferenceActivity implements SharedPre
|
|||
((EditTextPreference) pref).setDialogMessage(editTextPref.getDialogMessage());
|
||||
pref.setSummary(editTextPref.getText());
|
||||
}
|
||||
else if(pref.getKey().contains("smscommunicator_allowednumbers") && TextUtils.isEmpty(editTextPref.getText().toString().trim())){
|
||||
pref.setSummary(MainApp.sResources.getString(R.string.smscommunicator_allowednumbers_summary));
|
||||
}
|
||||
}
|
||||
if (pref instanceof MultiSelectListPreference) {
|
||||
EditTextPreference editTextPref = (EditTextPreference) pref;
|
||||
|
|
|
@ -180,7 +180,7 @@ public class FillDialog extends DialogFragment implements OnClickListener {
|
|||
builder.setMessage(result.comment);
|
||||
builder.setPositiveButton(MainApp.sResources.getString(R.string.ok), null);
|
||||
builder.show();
|
||||
} catch (WindowManager.BadTokenException e) {
|
||||
} catch (WindowManager.BadTokenException | NullPointerException e) {
|
||||
// window has been destroyed
|
||||
Notification notification = new Notification(Notification.BOLUS_DELIVERY_ERROR, MainApp.sResources.getString(R.string.treatmentdeliveryerror), Notification.URGENT);
|
||||
MainApp.bus().post(new EventNewNotification(notification));
|
||||
|
|
|
@ -112,7 +112,7 @@ public class NewExtendedBolusDialog extends DialogFragment implements View.OnCli
|
|||
builder.setMessage(result.comment);
|
||||
builder.setPositiveButton(context.getString(R.string.ok), null);
|
||||
builder.show();
|
||||
} catch (WindowManager.BadTokenException e) {
|
||||
} catch (WindowManager.BadTokenException | NullPointerException e) {
|
||||
// window has been destroyed
|
||||
Notification notification = new Notification(Notification.BOLUS_DELIVERY_ERROR, MainApp.sResources.getString(R.string.treatmentdeliveryerror), Notification.URGENT);
|
||||
MainApp.bus().post(new EventNewNotification(notification));
|
||||
|
|
|
@ -127,7 +127,7 @@ public class NewTreatmentDialog extends DialogFragment implements OnClickListene
|
|||
builder.setMessage(result.comment);
|
||||
builder.setPositiveButton(MainApp.sResources.getString(R.string.ok), null);
|
||||
builder.show();
|
||||
} catch (WindowManager.BadTokenException e) {
|
||||
} catch (WindowManager.BadTokenException | NullPointerException e) {
|
||||
// window has been destroyed
|
||||
Notification notification = new Notification(Notification.BOLUS_DELIVERY_ERROR, MainApp.sResources.getString(R.string.treatmentdeliveryerror), Notification.URGENT);
|
||||
MainApp.bus().post(new EventNewNotification(notification));
|
||||
|
|
|
@ -367,7 +367,7 @@ public class WizardDialog extends DialogFragment implements OnClickListener, Com
|
|||
builder.setMessage(result.comment);
|
||||
builder.setPositiveButton(MainApp.sResources.getString(R.string.ok), null);
|
||||
builder.show();
|
||||
} catch (WindowManager.BadTokenException e) {
|
||||
} catch (WindowManager.BadTokenException | NullPointerException e) {
|
||||
// window has been destroyed
|
||||
Notification notification = new Notification(Notification.BOLUS_DELIVERY_ERROR, MainApp.sResources.getString(R.string.treatmentdeliveryerror), Notification.URGENT);
|
||||
MainApp.bus().post(new EventNewNotification(notification));
|
||||
|
|
|
@ -713,7 +713,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
|||
builder.setMessage(result.comment);
|
||||
builder.setPositiveButton(MainApp.sResources.getString(R.string.ok), null);
|
||||
builder.show();
|
||||
} catch (WindowManager.BadTokenException e) {
|
||||
} catch (WindowManager.BadTokenException | NullPointerException e) {
|
||||
// window has been destroyed
|
||||
Notification notification = new Notification(Notification.BOLUS_DELIVERY_ERROR, MainApp.sResources.getString(R.string.treatmentdeliveryerror), Notification.URGENT);
|
||||
MainApp.bus().post(new EventNewNotification(notification));
|
||||
|
|
Loading…
Reference in a new issue