Merge pull request #2 from MilosKozak/dev

Dev
This commit is contained in:
Andreas 2018-11-30 12:05:23 +01:00 committed by GitHub
commit 3f91188775
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
62 changed files with 18718 additions and 17414 deletions

View file

@ -1,6 +1,6 @@
Reporting bugs Reporting bugs
-------------- --------------
- Note the precise time the problem occurred and describe the circumstances and steps that caused - **Note the precise time the problem occurred** and describe the circumstances and steps that caused
the problem the problem
- Note the Build version (found in the About dialog in the app, when pressing the three dots in the - Note the Build version (found in the About dialog in the app, when pressing the three dots in the
upper-right corner). upper-right corner).

View file

@ -1,6 +1,6 @@
# AndroidAPS # AndroidAPS
* Check the wiki: https://github.com/MilosKozak/AndroidAPS/wiki * Check the wiki: http://wiki.androidaps.org
* Everyone whos been looping with AndroidAPS needs to fill out the form after 3 days of looping https://docs.google.com/forms/d/14KcMjlINPMJHVt28MDRupa4sz4DDIooI4SrW0P3HSN8/viewform?c=0&w=1 * Everyone whos been looping with AndroidAPS needs to fill out the form after 3 days of looping https://docs.google.com/forms/d/14KcMjlINPMJHVt28MDRupa4sz4DDIooI4SrW0P3HSN8/viewform?c=0&w=1
[![Gitter](https://badges.gitter.im/MilosKozak/AndroidAPS.svg)](https://gitter.im/MilosKozak/AndroidAPS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Gitter](https://badges.gitter.im/MilosKozak/AndroidAPS.svg)](https://gitter.im/MilosKozak/AndroidAPS?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

View file

@ -63,7 +63,7 @@ android {
targetSdkVersion 25 targetSdkVersion 25
multiDexEnabled true multiDexEnabled true
versionCode 1500 versionCode 1500
version "2.0i-dev" version "2.0"
buildConfigField "String", "VERSION", '"' + version + '"' buildConfigField "String", "VERSION", '"' + version + '"'
buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"' buildConfigField "String", "BUILDVERSION", '"' + generateGitBuild() + '-' + generateDate() + '"'
buildConfigField "String", "HEAD", '"' + generateGitBuild() + '"' buildConfigField "String", "HEAD", '"' + generateGitBuild() + '"'

View file

@ -12,6 +12,7 @@
<uses-permission android:name="android.permission.RECEIVE_SMS" /> <uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECEIVE_MMS" /> <uses-permission android:name="android.permission.RECEIVE_MMS" />
<uses-permission android:name="android.permission.SEND_SMS" /> <uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.SEND_MMS" /> <uses-permission android:name="android.permission.SEND_MMS" />
<uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.INTERNET" /> <uses-permission android:name="android.permission.INTERNET" />
@ -34,6 +35,9 @@
android:label="@string/app_name" android:label="@string/app_name"
android:supportsRtl="true" android:supportsRtl="true"
android:theme="@style/AppTheme.NoActionBar"> android:theme="@style/AppTheme.NoActionBar">
<meta-data
android:name="com.google.android.gms.car.application"
android:resource="@xml/automotive_app_desc" />
<activity android:name=".MainActivity"> <activity android:name=".MainActivity">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />

View file

@ -326,6 +326,7 @@ public class MainActivity extends AppCompatActivity {
case AndroidPermission.CASE_LOCATION: case AndroidPermission.CASE_LOCATION:
case AndroidPermission.CASE_SMS: case AndroidPermission.CASE_SMS:
case AndroidPermission.CASE_BATTERY: case AndroidPermission.CASE_BATTERY:
case AndroidPermission.CASE_PHONESTATE:
break; break;
} }
} }

View file

@ -398,7 +398,7 @@ public class Profile {
public String getIsfList() { public String getIsfList() {
if (isf_v == null) if (isf_v == null)
isf_v = convertToSparseArray(isf); isf_v = convertToSparseArray(isf);
return getValuesList(isf_v, null, new DecimalFormat("0.0"), getUnits() + "/U"); return getValuesList(isf_v, null, new DecimalFormat("0.0"), getUnits() + MainApp.gs(R.string.profile_per_unit));
} }
public double getIc() { public double getIc() {
@ -418,7 +418,7 @@ public class Profile {
public String getIcList() { public String getIcList() {
if (ic_v == null) if (ic_v == null)
ic_v = convertToSparseArray(ic); ic_v = convertToSparseArray(ic);
return getValuesList(ic_v, null, new DecimalFormat("0.0"), "g/U"); return getValuesList(ic_v, null, new DecimalFormat("0.0"), MainApp.gs(R.string.profile_carbs_per_unit));
} }
public double getBasal() { public double getBasal() {
@ -439,7 +439,7 @@ public class Profile {
public String getBasalList() { public String getBasalList() {
if (basal_v == null) if (basal_v == null)
basal_v = convertToSparseArray(basal); basal_v = convertToSparseArray(basal);
return getValuesList(basal_v, null, new DecimalFormat("0.00"), "U/h"); return getValuesList(basal_v, null, new DecimalFormat("0.00"), MainApp.gs(R.string.profile_ins_units_per_hout));
} }
public class BasalValue { public class BasalValue {

View file

@ -156,6 +156,12 @@ public class DatabaseHelper extends OrmLiteSqliteOpenHelper {
} }
} }
@Override
public void onDowngrade(SQLiteDatabase db, int oldVersion, int newVersion) {
log.info("Do nothing for downgrading...");
log.debug("oldVersion: {}, newVersion: {}", oldVersion, newVersion);
}
public int getOldVersion() { public int getOldVersion() {
return oldVersion; return oldVersion;
} }

View file

@ -101,6 +101,11 @@ public class ProfileSwitch implements Interval, DataPointWithLabelInterface {
return profile; return profile;
} }
/**
* Note: the name returned here is used as the PS name when uploading to NS. When such a PS is retrieved
* again from NS, the added parts must be removed again, see
* {@link info.nightscout.utils.PercentageSplitter#pureName}
*/
public String getCustomizedName() { public String getCustomizedName() {
String name = profileName; String name = profileName;
if(LocalProfilePlugin.LOCAL_PROFILE.equals(name)){ if(LocalProfilePlugin.LOCAL_PROFILE.equals(name)){

View file

@ -99,13 +99,13 @@ public class L {
private static void initialize() { private static void initialize() {
logElements = new ArrayList<>(); logElements = new ArrayList<>();
logElements.add(new LogElement(APS, true)); logElements.add(new LogElement(APS, true));
logElements.add(new LogElement(AUTOSENS, true)); logElements.add(new LogElement(AUTOSENS, false));
logElements.add(new LogElement(BGSOURCE, true)); logElements.add(new LogElement(BGSOURCE, true));
logElements.add(new LogElement(CONFIGBUILDER, true)); logElements.add(new LogElement(CONFIGBUILDER, false));
logElements.add(new LogElement(CONSTRAINTS, true)); logElements.add(new LogElement(CONSTRAINTS, true));
logElements.add(new LogElement(CORE, true)); logElements.add(new LogElement(CORE, true));
logElements.add(new LogElement(DATABASE, true)); logElements.add(new LogElement(DATABASE, true));
logElements.add(new LogElement(DATAFOOD, true)); logElements.add(new LogElement(DATAFOOD, false));
logElements.add(new LogElement(DATASERVICE, true)); logElements.add(new LogElement(DATASERVICE, true));
logElements.add(new LogElement(DATATREATMENTS, true)); logElements.add(new LogElement(DATATREATMENTS, true));
logElements.add(new LogElement(EVENTS, false, true)); logElements.add(new LogElement(EVENTS, false, true));

View file

@ -409,8 +409,10 @@ public class LoopPlugin extends PluginBase {
.setAutoCancel(true) .setAutoCancel(true)
.setPriority(Notification.PRIORITY_HIGH) .setPriority(Notification.PRIORITY_HIGH)
.setCategory(Notification.CATEGORY_ALARM) .setCategory(Notification.CATEGORY_ALARM)
.setVisibility(Notification.VISIBILITY_PUBLIC) .setVisibility(Notification.VISIBILITY_PUBLIC);
.setLocalOnly(true); if (SP.getBoolean("wearcontrol", false)) {
builder.setLocalOnly(true);
}
// Creates an explicit intent for an Activity in your app // Creates an explicit intent for an Activity in your app
Intent resultIntent = new Intent(MainApp.instance().getApplicationContext(), MainActivity.class); Intent resultIntent = new Intent(MainApp.instance().getApplicationContext(), MainActivity.class);

View file

@ -446,7 +446,8 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
super.onCreateContextMenu(menu, v, menuInfo); super.onCreateContextMenu(menu, v, menuInfo);
if (v == apsModeView) { if (v == apsModeView) {
final LoopPlugin loopPlugin = LoopPlugin.getPlugin(); final LoopPlugin loopPlugin = LoopPlugin.getPlugin();
final PumpDescription pumpDescription = ConfigBuilderPlugin.getPlugin().getActivePump().getPumpDescription(); final PumpDescription pumpDescription =
ConfigBuilderPlugin.getPlugin().getActivePump().getPumpDescription();
if (!ProfileFunctions.getInstance().isProfileValid("ContexMenuCreation")) if (!ProfileFunctions.getInstance().isProfileValid("ContexMenuCreation"))
return; return;
menu.setHeaderTitle(MainApp.gs(R.string.loop)); menu.setHeaderTitle(MainApp.gs(R.string.loop));
@ -457,19 +458,21 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
menu.add(MainApp.gs(R.string.suspendloopfor2h)); menu.add(MainApp.gs(R.string.suspendloopfor2h));
menu.add(MainApp.gs(R.string.suspendloopfor3h)); menu.add(MainApp.gs(R.string.suspendloopfor3h));
menu.add(MainApp.gs(R.string.suspendloopfor10h)); menu.add(MainApp.gs(R.string.suspendloopfor10h));
if (pumpDescription.tempDurationStep15mAllowed)
menu.add(MainApp.gs(R.string.disconnectpumpfor15m));
if (pumpDescription.tempDurationStep30mAllowed)
menu.add(MainApp.gs(R.string.disconnectpumpfor30m));
menu.add(MainApp.gs(R.string.disconnectpumpfor1h));
menu.add(MainApp.gs(R.string.disconnectpumpfor2h));
menu.add(MainApp.gs(R.string.disconnectpumpfor3h));
} else { } else {
menu.add(MainApp.gs(R.string.resume)); menu.add(MainApp.gs(R.string.resume));
} }
} }
if (!loopPlugin.isEnabled(PluginType.LOOP))
if (!loopPlugin.isEnabled(PluginType.LOOP)) {
menu.add(MainApp.gs(R.string.enableloop)); menu.add(MainApp.gs(R.string.enableloop));
}
if (!loopPlugin.isDisconnected()) {
showSuspendtPump(menu, pumpDescription);
} else {
menu.add(MainApp.gs(R.string.reconnect));
}
} else if (v == activeProfileView) { } else if (v == activeProfileView) {
menu.setHeaderTitle(MainApp.gs(R.string.profile)); menu.setHeaderTitle(MainApp.gs(R.string.profile));
menu.add(MainApp.gs(R.string.danar_viewprofile)); menu.add(MainApp.gs(R.string.danar_viewprofile));
@ -488,6 +491,17 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
} }
} }
private void showSuspendtPump(ContextMenu menu,
PumpDescription pumpDescription) {
if (pumpDescription.tempDurationStep15mAllowed)
menu.add(MainApp.gs(R.string.disconnectpumpfor15m));
if (pumpDescription.tempDurationStep30mAllowed)
menu.add(MainApp.gs(R.string.disconnectpumpfor30m));
menu.add(MainApp.gs(R.string.disconnectpumpfor1h));
menu.add(MainApp.gs(R.string.disconnectpumpfor2h));
menu.add(MainApp.gs(R.string.disconnectpumpfor3h));
}
@Override @Override
public boolean onContextItemSelected(MenuItem item) { public boolean onContextItemSelected(MenuItem item) {
final Profile profile = ProfileFunctions.getInstance().getProfile(); final Profile profile = ProfileFunctions.getInstance().getProfile();
@ -516,7 +530,8 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
updateGUI("suspendmenu"); updateGUI("suspendmenu");
NSUpload.uploadOpenAPSOffline(0); NSUpload.uploadOpenAPSOffline(0);
return true; return true;
} else if (item.getTitle().equals(MainApp.gs(R.string.resume))) { } else if (item.getTitle().equals(MainApp.gs(R.string.resume)) ||
item.getTitle().equals(MainApp.gs(R.string.reconnect))) {
loopPlugin.suspendTo(0L); loopPlugin.suspendTo(0L);
updateGUI("suspendmenu"); updateGUI("suspendmenu");
ConfigBuilderPlugin.getPlugin().getCommandQueue().cancelTempBasal(true, new Callback() { ConfigBuilderPlugin.getPlugin().getCommandQueue().cancelTempBasal(true, new Callback() {
@ -1095,7 +1110,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
apsModeView.setBackgroundColor(MainApp.gc(R.color.looppumpsuspended)); apsModeView.setBackgroundColor(MainApp.gc(R.color.looppumpsuspended));
apsModeView.setText(String.format(MainApp.gs(R.string.loopsuperbolusfor), loopPlugin.minutesToEndOfSuspend())); apsModeView.setText(String.format(MainApp.gs(R.string.loopsuperbolusfor), loopPlugin.minutesToEndOfSuspend()));
apsModeView.setTextColor(Color.WHITE); apsModeView.setTextColor(Color.WHITE);
} else if (loopPlugin.isEnabled(PluginType.LOOP) && loopPlugin.isDisconnected()) { } else if (loopPlugin.isDisconnected()) {
apsModeView.setBackgroundColor(MainApp.gc(R.color.looppumpsuspended)); apsModeView.setBackgroundColor(MainApp.gc(R.color.looppumpsuspended));
apsModeView.setText(String.format(MainApp.gs(R.string.loopdisconnectedfor), loopPlugin.minutesToEndOfSuspend())); apsModeView.setText(String.format(MainApp.gs(R.string.loopdisconnectedfor), loopPlugin.minutesToEndOfSuspend()));
apsModeView.setTextColor(Color.WHITE); apsModeView.setTextColor(Color.WHITE);
@ -1364,7 +1379,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
// Sensitivity // Sensitivity
if (sensitivityView != null) { if (sensitivityView != null) {
AutosensData autosensData = IobCobCalculatorPlugin.getPlugin().getLastAutosensDataSynchronized("Overview"); AutosensData autosensData = IobCobCalculatorPlugin.getPlugin().getLastAutosensData("Overview");
if (autosensData != null) if (autosensData != null)
sensitivityView.setText(String.format("%.0f%%", autosensData.autosensResult.ratio * 100)); sensitivityView.setText(String.format("%.0f%%", autosensData.autosensResult.ratio * 100));
else else

View file

@ -71,6 +71,7 @@ public class Notification {
public static final int DEVICENOTPAIRED = 43; public static final int DEVICENOTPAIRED = 43;
public static final int MEDTRONIC_PUMP_ALARM = 44; public static final int MEDTRONIC_PUMP_ALARM = 44;
public static final int RILEYLINK_CONNECTION = 45; public static final int RILEYLINK_CONNECTION = 45;
public static final int PERMISSION_PHONESTATE = 46;
public int id; public int id;

View file

@ -13,6 +13,14 @@ import android.os.Build;
import android.support.v4.app.NotificationCompat; import android.support.v4.app.NotificationCompat;
import android.support.v4.app.TaskStackBuilder; import android.support.v4.app.TaskStackBuilder;
// Android Auto
import android.support.v4.app.NotificationCompat;
import android.support.v4.app.NotificationManagerCompat;
import android.support.v4.app.RemoteInput;
import com.squareup.otto.Subscribe; import com.squareup.otto.Subscribe;
import info.nightscout.androidaps.Config; import info.nightscout.androidaps.Config;
@ -60,6 +68,18 @@ public class PersistentNotificationPlugin extends PluginBase {
public static final int ONGOING_NOTIFICATION_ID = 4711; public static final int ONGOING_NOTIFICATION_ID = 4711;
private final Context ctx; private final Context ctx;
/// For Android Auto
/// Intents are not declared in manifest and not consumed, this is intentionally because actually we can't do anything with
private static final String PACKAGE = "info.nightscout";
private static final String READ_ACTION =
"info.nightscout.androidaps.ACTION_MESSAGE_READ";
private static final String REPLY_ACTION =
"info.nightscout.androidaps.ACTION_MESSAGE_REPLY";
private static final String CONVERSATION_ID = "conversation_id";
private static final String EXTRA_VOICE_REPLY = "extra_voice_reply";
/// End Android Auto
public PersistentNotificationPlugin(Context ctx) { public PersistentNotificationPlugin(Context ctx) {
super(new PluginDescription() super(new PluginDescription()
.mainType(PluginType.GENERAL) .mainType(PluginType.GENERAL)
@ -107,7 +127,8 @@ public class PersistentNotificationPlugin extends PluginBase {
return null; return null;
} }
String line1 = ""; String line1;
String line1_aa;
if (ConfigBuilderPlugin.getPlugin().getActiveProfileInterface() == null || !ProfileFunctions.getInstance().isProfileValid("Notificiation")) if (ConfigBuilderPlugin.getPlugin().getActiveProfileInterface() == null || !ProfileFunctions.getInstance().isProfileValid("Notificiation"))
return null; return null;
@ -118,22 +139,25 @@ public class PersistentNotificationPlugin extends PluginBase {
GlucoseStatus glucoseStatus = GlucoseStatus.getGlucoseStatusData(); GlucoseStatus glucoseStatus = GlucoseStatus.getGlucoseStatusData();
if (lastBG != null) { if (lastBG != null) {
line1 = lastBG.valueToUnitsToString(units); line1 = line1_aa = lastBG.valueToUnitsToString(units);
if (glucoseStatus != null) { if (glucoseStatus != null) {
line1 += " Δ" + deltastring(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units) line1 += " Δ" + deltastring(glucoseStatus.delta, glucoseStatus.delta * Constants.MGDL_TO_MMOLL, units)
+ " avgΔ" + deltastring(glucoseStatus.avgdelta, glucoseStatus.avgdelta * Constants.MGDL_TO_MMOLL, units); + " avgΔ" + deltastring(glucoseStatus.avgdelta, glucoseStatus.avgdelta * Constants.MGDL_TO_MMOLL, units);
line1_aa += " " + lastBG.directionToSymbol();
} else { } else {
line1 += " " + line1 += " " +
MainApp.gs(R.string.old_data) + MainApp.gs(R.string.old_data) +
" "; " ";
line1_aa += line1 + ".";
} }
} else { } else {
line1 = MainApp.gs(R.string.missed_bg_readings); line1 = line1_aa = MainApp.gs(R.string.missed_bg_readings);
} }
TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(System.currentTimeMillis()); TemporaryBasal activeTemp = TreatmentsPlugin.getPlugin().getTempBasalFromHistory(System.currentTimeMillis());
if (activeTemp != null) { if (activeTemp != null) {
line1 += " " + activeTemp.toStringShort(); line1 += " " + activeTemp.toStringShort();
line1_aa += " " + activeTemp.toStringShort() + ".";
} }
//IOB //IOB
@ -143,12 +167,55 @@ public class PersistentNotificationPlugin extends PluginBase {
IobTotal basalIob = TreatmentsPlugin.getPlugin().getLastCalculationTempBasals().round(); IobTotal basalIob = TreatmentsPlugin.getPlugin().getLastCalculationTempBasals().round();
String line2 = MainApp.gs(R.string.treatments_iob_label_string) + " " + DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob) + "U " + MainApp.gs(R.string.cob)+": " + IobCobCalculatorPlugin.getPlugin().getCobInfo(false, "PersistentNotificationPlugin").generateCOBString();; String line2 = MainApp.gs(R.string.treatments_iob_label_string) + " " + DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob) + "U " + MainApp.gs(R.string.cob)+": " + IobCobCalculatorPlugin.getPlugin().getCobInfo(false, "PersistentNotificationPlugin").generateCOBString();
String line2_aa = MainApp.gs(R.string.treatments_iob_label_string) + " " + DecimalFormatter.to2Decimal(bolusIob.iob + basalIob.basaliob) + "U. " + MainApp.gs(R.string.cob)+": " + IobCobCalculatorPlugin.getPlugin().getCobInfo(false, "PersistentNotificationPlugin").generateCOBString() + ".";
String line3 = DecimalFormatter.to2Decimal(ConfigBuilderPlugin.getPlugin().getActivePump().getBaseBasalRate()) + " U/h"; String line3 = DecimalFormatter.to2Decimal(ConfigBuilderPlugin.getPlugin().getActivePump().getBaseBasalRate()) + " U/h";
String line3_aa = DecimalFormatter.to2Decimal(ConfigBuilderPlugin.getPlugin().getActivePump().getBaseBasalRate()) + " U/h.";
line3 += " - " + ProfileFunctions.getInstance().getProfileName(); line3 += " - " + ProfileFunctions.getInstance().getProfileName();
line3_aa += " - " + ProfileFunctions.getInstance().getProfileName() + ".";
/// For Android Auto
Intent msgReadIntent = new Intent()
.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES)
.setAction(READ_ACTION)
.putExtra(CONVERSATION_ID, ONGOING_NOTIFICATION_ID)
.setPackage(PACKAGE);
PendingIntent msgReadPendingIntent =
PendingIntent.getBroadcast(ctx,
ONGOING_NOTIFICATION_ID,
msgReadIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
Intent msgReplyIntent = new Intent()
.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES)
.setAction(REPLY_ACTION)
.putExtra(CONVERSATION_ID, ONGOING_NOTIFICATION_ID)
.setPackage(PACKAGE);
PendingIntent msgReplyPendingIntent = PendingIntent.getBroadcast(
ctx,
ONGOING_NOTIFICATION_ID,
msgReplyIntent,
PendingIntent.FLAG_UPDATE_CURRENT);
// Build a RemoteInput for receiving voice input from devices
RemoteInput remoteInput = new RemoteInput.Builder(EXTRA_VOICE_REPLY).build();
// Create the UnreadConversation
NotificationCompat.CarExtender.UnreadConversation.Builder unreadConversationBuilder =
new NotificationCompat.CarExtender.UnreadConversation.Builder(line1_aa + "\n" + line2_aa)
.setLatestTimestamp(System.currentTimeMillis())
.setReadPendingIntent(msgReadPendingIntent)
.setReplyAction(msgReplyPendingIntent, remoteInput);
/// Add dot to produce a "more natural sounding result"
unreadConversationBuilder.addMessage(line3_aa);
/// End Android Auto
NotificationCompat.Builder builder = new NotificationCompat.Builder(ctx, CHANNEL_ID); NotificationCompat.Builder builder = new NotificationCompat.Builder(ctx, CHANNEL_ID);
@ -167,6 +234,11 @@ public class PersistentNotificationPlugin extends PluginBase {
builder.setContentTitle(line1); builder.setContentTitle(line1);
builder.setContentText(line2); builder.setContentText(line2);
builder.setSubText(line3); builder.setSubText(line3);
/// Android Auto
builder.extend(new NotificationCompat.CarExtender()
.setUnreadConversation(unreadConversationBuilder.build()));
/// End Android Auto
Intent resultIntent = new Intent(ctx, MainActivity.class); Intent resultIntent = new Intent(ctx, MainActivity.class);

View file

@ -156,7 +156,7 @@ public class LocalProfileFragment extends SubscriberFragment {
public String getSumLabel() { public String getSumLabel() {
ProfileStore profile = LocalProfilePlugin.getPlugin().createProfileStore(); ProfileStore profile = LocalProfilePlugin.getPlugin().createProfileStore();
if (profile != null) if (profile != null)
return "" + DecimalFormatter.to2Decimal(profile.getDefaultProfile().baseBasalSum()) + "U"; return "" + DecimalFormatter.to2Decimal(profile.getDefaultProfile().baseBasalSum()) + MainApp.gs(R.string.insulin_unit_shortname);
else else
return MainApp.gs(R.string.localprofile); return MainApp.gs(R.string.localprofile);
} }

View file

@ -52,6 +52,8 @@ public class NSProfileFragment extends SubscriberFragment {
TextView isf; TextView isf;
@BindView(R.id.profileview_basal) @BindView(R.id.profileview_basal)
TextView basal; TextView basal;
@BindView(R.id.profileview_basaltotal)
TextView basaltotal;
@BindView(R.id.profileview_target) @BindView(R.id.profileview_target)
TextView target; TextView target;
@BindView(R.id.basal_graph) @BindView(R.id.basal_graph)
@ -116,6 +118,7 @@ public class NSProfileFragment extends SubscriberFragment {
ic.setText(profile.getIcList()); ic.setText(profile.getIcList());
isf.setText(profile.getIsfList()); isf.setText(profile.getIsfList());
basal.setText(profile.getBasalList()); basal.setText(profile.getBasalList());
basaltotal.setText(String.format(MainApp.gs(R.string.profile_total), DecimalFormatter.to2Decimal(profile.baseBasalSum())));
target.setText(profile.getTargetList()); target.setText(profile.getTargetList());
basalGraph.show(profile); basalGraph.show(profile);
} }
@ -141,6 +144,7 @@ public class NSProfileFragment extends SubscriberFragment {
ic.setText(""); ic.setText("");
isf.setText(""); isf.setText("");
basal.setText(""); basal.setText("");
basaltotal.setText("");
target.setText(""); target.setText("");
activateButton.setVisibility(View.GONE); activateButton.setVisibility(View.GONE);
} }

View file

@ -81,7 +81,7 @@ public class SWItem {
} }
public static LinearLayout generateLayout(View view) { public static LinearLayout generateLayout(View view) {
LinearLayout layout = (LinearLayout) view.findViewById(view.getId()); LinearLayout layout = (LinearLayout) view;
layout.removeAllViews(); layout.removeAllViews();
return layout; return layout;
} }

View file

@ -21,6 +21,7 @@ public class AndroidPermission {
public static final int CASE_SMS = 0x2; public static final int CASE_SMS = 0x2;
public static final int CASE_LOCATION = 0x3; public static final int CASE_LOCATION = 0x3;
public static final int CASE_BATTERY = 0x4; public static final int CASE_BATTERY = 0x4;
public static final int CASE_PHONESTATE = 0x5;
public static void askForPermission(Activity activity, String[] permission, Integer requestCode) { public static void askForPermission(Activity activity, String[] permission, Integer requestCode) {
boolean test = false; boolean test = false;
@ -55,6 +56,16 @@ public class AndroidPermission {
} else } else
MainApp.bus().post(new EventDismissNotification(Notification.PERMISSION_SMS)); MainApp.bus().post(new EventDismissNotification(Notification.PERMISSION_SMS));
} }
// Following is a bug in Android 8
if (Build.VERSION.SDK_INT == Build.VERSION_CODES.O) {
if (!checkForPermission(activity, Manifest.permission.READ_PHONE_STATE)) {
NotificationWithAction notification = new NotificationWithAction(Notification.PERMISSION_PHONESTATE, MainApp.gs(R.string.smscommunicator_missingphonestatepermission), Notification.URGENT);
notification.action(MainApp.gs(R.string.request), () ->
AndroidPermission.askForPermission(activity, new String[]{Manifest.permission.READ_PHONE_STATE}, AndroidPermission.CASE_PHONESTATE));
MainApp.bus().post(new EventNewNotification(notification));
} else
MainApp.bus().post(new EventDismissNotification(Notification.PERMISSION_PHONESTATE));
}
} }
} }

View file

@ -8,23 +8,15 @@ import java.util.regex.Pattern;
*/ */
public class PercentageSplitter { public class PercentageSplitter {
// "Profile name (200%,2h)" // Matches "Profile name (200%,-2h)", "Profile name (50%)
private static final Pattern percentagePattern = Pattern.compile("(.+)\\(\\d+%,\\d+h\\)"); private static final Pattern splitPattern = Pattern.compile("(.+)\\(\\d+%(,-?\\d+h)?\\)");
// "Profile name (200%)"
private static final Pattern percentageShiftPattern = Pattern.compile("(.+)\\(\\d+%\\)");
/** Removes the suffix for percentage and timeshift from a profile name. */ /** Removes the suffix for percentage and timeshift from a profile name. This is the inverse of what
* {@link info.nightscout.androidaps.db.ProfileSwitch#getCustomizedName()} does.
* Since the customized name is used for the PS upload to NS, this is needed get the original profile name
* when retrieving the PS from NS again. */
public static String pureName(String name) { public static String pureName(String name) {
Matcher percentageMatch = percentagePattern.matcher(name); Matcher percentageMatch = splitPattern.matcher(name);
if (percentageMatch.find()) { return percentageMatch.find() ? percentageMatch.group(1).trim() : name;
return percentageMatch.group(1).trim();
}
Matcher percentageShiftMatch = percentageShiftPattern.matcher(name);
if (percentageShiftMatch.find()) {
return percentageShiftMatch.group(1).trim();
}
return name;
} }
} }

View file

@ -345,6 +345,42 @@
</LinearLayout> </LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="2"
android:gravity="end"
android:paddingRight="5dp"
android:text=""
android:textSize="14sp" />
<TextView
android:layout_width="5dp"
android:layout_height="wrap_content"
android:layout_weight="0"
android:gravity="center_horizontal"
android:paddingEnd="2dp"
android:paddingStart="2dp"
android:text=""
android:textSize="14sp" />
<TextView
android:id="@+id/profileview_basaltotal"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:gravity="start"
android:paddingLeft="17dp"
android:textColor="@android:color/white"
android:textSize="14sp" />
</LinearLayout>
<info.nightscout.androidaps.plugins.Treatments.fragments.ProfileGraph <info.nightscout.androidaps.plugins.Treatments.fragments.ProfileGraph
android:id="@+id/basal_graph" android:id="@+id/basal_graph"
android:layout_width="match_parent" android:layout_width="match_parent"

View file

@ -532,6 +532,7 @@
<string name="disconnectpumpfor2h">Ontkoppel pomp vir 2 h</string> <string name="disconnectpumpfor2h">Ontkoppel pomp vir 2 h</string>
<string name="disconnectpumpfor3h">Ontkoppel pomp vir 3 h</string> <string name="disconnectpumpfor3h">Ontkoppel pomp vir 3 h</string>
<string name="resume">Hervat</string> <string name="resume">Hervat</string>
<string name="reconnect">Herverbind Pomp</string>
<string name="smscommunicator_wrongduration">Verkeerde duur</string> <string name="smscommunicator_wrongduration">Verkeerde duur</string>
<string name="smscommunicator_loopsuspended">Lus opgeskort</string> <string name="smscommunicator_loopsuspended">Lus opgeskort</string>
<string name="smscommunicator_loopresumed">Lus hervat</string> <string name="smscommunicator_loopresumed">Lus hervat</string>
@ -556,6 +557,7 @@
<string name="danar_bluetooth_status">Bluetooth status</string> <string name="danar_bluetooth_status">Bluetooth status</string>
<string name="nav_about">Omtrent</string> <string name="nav_about">Omtrent</string>
<string name="smscommunicator_missingsmspermission">Vermiste SMS toestemming</string> <string name="smscommunicator_missingsmspermission">Vermiste SMS toestemming</string>
<string name="smscommunicator_missingphonestatepermission">Toestemming vir foon status nog nie gegee nie</string>
<string name="xdripstatus_settings">xDrip Status (horlosie)</string> <string name="xdripstatus_settings">xDrip Status (horlosie)</string>
<string name="xdripstatus">xDrip Statusline (horlosie)</string> <string name="xdripstatus">xDrip Statusline (horlosie)</string>
<string name="xdripstatus_shortname">xds</string> <string name="xdripstatus_shortname">xds</string>
@ -1053,6 +1055,10 @@
<string name="loop_openmode_min_change">Minimale versoek verandering [%]</string> <string name="loop_openmode_min_change">Minimale versoek verandering [%]</string>
<string name="loop_openmode_min_change_summary">Lus sal opspring en nuwe verandering versoek slegs as verandering is groter as hierdie waarde. Verstek waarde is 20%</string> <string name="loop_openmode_min_change_summary">Lus sal opspring en nuwe verandering versoek slegs as verandering is groter as hierdie waarde. Verstek waarde is 20%</string>
<string name="pairfirst">Verbind asseblief jou pomp met jou selfoon!</string> <string name="pairfirst">Verbind asseblief jou pomp met jou selfoon!</string>
<string name="profile_total">== ∑ %1$s U</string>
<string name="profile_ins_units_per_hout">U/h</string>
<string name="profile_carbs_per_unit">g/U</string>
<string name="profile_per_unit">/U</string>
<plurals name="objective_days"> <plurals name="objective_days">
<item quantity="one">%1$d dae</item> <item quantity="one">%1$d dae</item>
<item quantity="other">%1$d dae</item> <item quantity="other">%1$d dae</item>

View file

@ -532,6 +532,7 @@
<string name="disconnectpumpfor2h">Odpojit pumpu na 2 h</string> <string name="disconnectpumpfor2h">Odpojit pumpu na 2 h</string>
<string name="disconnectpumpfor3h">Odpojit pumpu na 3 h</string> <string name="disconnectpumpfor3h">Odpojit pumpu na 3 h</string>
<string name="resume">Uvolnit</string> <string name="resume">Uvolnit</string>
<string name="reconnect">Znovu připojit pumpu</string>
<string name="smscommunicator_wrongduration">Chybná doba trvání</string> <string name="smscommunicator_wrongduration">Chybná doba trvání</string>
<string name="smscommunicator_loopsuspended">Smyčka pozastavena</string> <string name="smscommunicator_loopsuspended">Smyčka pozastavena</string>
<string name="smscommunicator_loopresumed">Smyčka obnovena</string> <string name="smscommunicator_loopresumed">Smyčka obnovena</string>
@ -556,6 +557,7 @@
<string name="danar_bluetooth_status">Stav Bluetooth</string> <string name="danar_bluetooth_status">Stav Bluetooth</string>
<string name="nav_about">O aplikaci</string> <string name="nav_about">O aplikaci</string>
<string name="smscommunicator_missingsmspermission">Chybějící povolení SMS</string> <string name="smscommunicator_missingsmspermission">Chybějící povolení SMS</string>
<string name="smscommunicator_missingphonestatepermission">Chybí oprávnění pro zjišťování stavu telefonu</string>
<string name="xdripstatus_settings">Status z xDripu (hodinky)</string> <string name="xdripstatus_settings">Status z xDripu (hodinky)</string>
<string name="xdripstatus">Statusový řádek xDripu (hodinky)</string> <string name="xdripstatus">Statusový řádek xDripu (hodinky)</string>
<string name="xdripstatus_shortname">XDS</string> <string name="xdripstatus_shortname">XDS</string>
@ -1053,6 +1055,10 @@
<string name="loop_openmode_min_change">Minimální změna pro výzvu [%]</string> <string name="loop_openmode_min_change">Minimální změna pro výzvu [%]</string>
<string name="loop_openmode_min_change_summary">Smyčka vytvoří novou žádost o změnu pouze v případě, že změna je větší než tato hodnota. Výchozí hodnota je 20 %</string> <string name="loop_openmode_min_change_summary">Smyčka vytvoří novou žádost o změnu pouze v případě, že změna je větší než tato hodnota. Výchozí hodnota je 20 %</string>
<string name="pairfirst">Spárujte pumpu s telefonem!</string> <string name="pairfirst">Spárujte pumpu s telefonem!</string>
<string name="profile_total">== ∑ %1$s U</string>
<string name="profile_ins_units_per_hout">U/h</string>
<string name="profile_carbs_per_unit">g/U</string>
<string name="profile_per_unit">/U</string>
<plurals name="objective_days"> <plurals name="objective_days">
<item quantity="one">%1$d den</item> <item quantity="one">%1$d den</item>
<item quantity="few">%1$d dnů</item> <item quantity="few">%1$d dnů</item>

View file

@ -889,6 +889,7 @@ maxIOB = durchschnittlicher Essensbolus + 3 x maximale Basalrate</string>
<string name="closedmodedisabledinpreferences">Closed-Loop-Modus in den Einstellungen deaktiviert</string> <string name="closedmodedisabledinpreferences">Closed-Loop-Modus in den Einstellungen deaktiviert</string>
<string name="autosensdisabledinpreferences">Autosens in den Einstellungen deaktiviert</string> <string name="autosensdisabledinpreferences">Autosens in den Einstellungen deaktiviert</string>
<string name="smbdisabledinpreferences">SMB in Einstellungen deaktiviert</string> <string name="smbdisabledinpreferences">SMB in Einstellungen deaktiviert</string>
<string name="uamdisabledinpreferences">UAM in Einstellungen deaktiviert</string>
<string name="limitingbasalratio">Begrenzung der max. Basalrate auf %1$.2f IE/h wegen %2$s</string> <string name="limitingbasalratio">Begrenzung der max. Basalrate auf %1$.2f IE/h wegen %2$s</string>
<string name="pumplimit">Limit der Pumpe</string> <string name="pumplimit">Limit der Pumpe</string>
<string name="itmustbepositivevalue">Es muss ein positiver Wert sein.</string> <string name="itmustbepositivevalue">Es muss ein positiver Wert sein.</string>
@ -955,7 +956,7 @@ maxIOB = durchschnittlicher Essensbolus + 3 x maximale Basalrate</string>
<string name="virtualpump_pump_def">Bolus: Schritt=%1$s\nVerzögerter Bolus: [Schritt=%2$s, Dauer=%3$smin-%4$sh]\nBasal: Schritt=%5$s\nTBR: %6$s (bei %7$s), Dauer=%8$smin-%9$sh\n%10$s</string> <string name="virtualpump_pump_def">Bolus: Schritt=%1$s\nVerzögerter Bolus: [Schritt=%2$s, Dauer=%3$smin-%4$sh]\nBasal: Schritt=%5$s\nTBR: %6$s (bei %7$s), Dauer=%8$smin-%9$sh\n%10$s</string>
<string name="virtualpump_pump_def_extended_note">* Bei der virtuellen Pumpe können nur einzelne Werte und keine Bereiche zur Festlegung der Basal/Bolus-Granularität gewählt werden.</string> <string name="virtualpump_pump_def_extended_note">* Bei der virtuellen Pumpe können nur einzelne Werte und keine Bereiche zur Festlegung der Basal/Bolus-Granularität gewählt werden.</string>
<string name="ns_autobackfill_title">BZ automatisch auffüllen</string> <string name="ns_autobackfill_title">BZ automatisch auffüllen</string>
<string name="wear_wizard_settings">Einrichtungsassistent</string> <string name="wear_wizard_settings">Wizard-Einstellungen</string>
<string name="wear_wizard_settings_summary">Berechnungen, die im Assistenten berücksichtigt werden:</string> <string name="wear_wizard_settings_summary">Berechnungen, die im Assistenten berücksichtigt werden:</string>
<string name="wear_display_settings">Anzeigeeinstellungen</string> <string name="wear_display_settings">Anzeigeeinstellungen</string>
<string name="wear_general_settings">Allgemeine Einstellungen</string> <string name="wear_general_settings">Allgemeine Einstellungen</string>
@ -1005,7 +1006,7 @@ maxIOB = durchschnittlicher Essensbolus + 3 x maximale Basalrate</string>
<string name="close_navigation">Menü schließen</string> <string name="close_navigation">Menü schließen</string>
<string name="nav_plugin_preferences">Plugin-Einstellungen</string> <string name="nav_plugin_preferences">Plugin-Einstellungen</string>
<string name="completed_well_done">Abgeschlossen, gut gemacht!</string> <string name="completed_well_done">Abgeschlossen, gut gemacht!</string>
<string name="not_completed_yet">Noch nicht vollständig ausgefüllt</string> <string name="not_completed_yet">Noch nicht abgeschlossen</string>
<string name="time_elapsed">Verstrichene Zeit</string> <string name="time_elapsed">Verstrichene Zeit</string>
<string name="nth_objective">%1$d. Ziel</string> <string name="nth_objective">%1$d. Ziel</string>
<string name="poctech">Poctech</string> <string name="poctech">Poctech</string>
@ -1052,6 +1053,7 @@ Unerwartetes Verhalten.</string>
<string name="insulinlimitviolation">Insulin-Beschränkung verletzt</string> <string name="insulinlimitviolation">Insulin-Beschränkung verletzt</string>
<string name="loop_openmode_min_change">Minimaler Wert zur Anfrage einer Änderung [%]</string> <string name="loop_openmode_min_change">Minimaler Wert zur Anfrage einer Änderung [%]</string>
<string name="loop_openmode_min_change_summary">Der Loop fordert eine neue Änderung nur dann an, wenn die Änderung größer als dieser Wert ist. Der Standard-Wert ist 20%.</string> <string name="loop_openmode_min_change_summary">Der Loop fordert eine neue Änderung nur dann an, wenn die Änderung größer als dieser Wert ist. Der Standard-Wert ist 20%.</string>
<string name="pairfirst">Bitte kopple deine Pumpe mit deinem Telefon!</string>
<plurals name="objective_days"> <plurals name="objective_days">
<item quantity="one">%1$d Tag</item> <item quantity="one">%1$d Tag</item>
<item quantity="other">%1$d Tage</item> <item quantity="other">%1$d Tage</item>

View file

@ -532,6 +532,7 @@
<string name="disconnectpumpfor2h">Αποσύνδεση αντλίας για 2h</string> <string name="disconnectpumpfor2h">Αποσύνδεση αντλίας για 2h</string>
<string name="disconnectpumpfor3h">Αποσύνδεση αντλίας για 3h</string> <string name="disconnectpumpfor3h">Αποσύνδεση αντλίας για 3h</string>
<string name="resume">Επαναφορά</string> <string name="resume">Επαναφορά</string>
<string name="reconnect">Επανασύνδεση αντλίας</string>
<string name="smscommunicator_wrongduration">Λάθος διάρκεια</string> <string name="smscommunicator_wrongduration">Λάθος διάρκεια</string>
<string name="smscommunicator_loopsuspended">Κύκλωμα σε αναστολή</string> <string name="smscommunicator_loopsuspended">Κύκλωμα σε αναστολή</string>
<string name="smscommunicator_loopresumed">Επαναφορά κυκλώματος</string> <string name="smscommunicator_loopresumed">Επαναφορά κυκλώματος</string>

View file

@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com--> <!--Generated by crowdin.com-->
<resources> <resources>
<string name="treatmentssafety_title">Seguridad de tratamientos</string>
<string name="nav_exit">Salir</string> <string name="nav_exit">Salir</string>
<string name="danar_useextended_title">Usar bolos extendidos para &gt;200%</string> <string name="danar_useextended_title">Usar bolos extendidos para &gt;200%</string>
<string name="danar_bt_name_title">Dispositivo Bluetooth DanaR</string> <string name="danar_bt_name_title">Dispositivo Bluetooth DanaR</string>

View file

@ -533,6 +533,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="disconnectpumpfor2h">Déconnecter la pompe 2h</string> <string name="disconnectpumpfor2h">Déconnecter la pompe 2h</string>
<string name="disconnectpumpfor3h">Déconnecter la pompe 3h</string> <string name="disconnectpumpfor3h">Déconnecter la pompe 3h</string>
<string name="resume">Reprendre</string> <string name="resume">Reprendre</string>
<string name="reconnect">Rebrancher la pompe</string>
<string name="smscommunicator_wrongduration">Durée incorrecte</string> <string name="smscommunicator_wrongduration">Durée incorrecte</string>
<string name="smscommunicator_loopsuspended">Boucle suspendue</string> <string name="smscommunicator_loopsuspended">Boucle suspendue</string>
<string name="smscommunicator_loopresumed">Boucle relancée</string> <string name="smscommunicator_loopresumed">Boucle relancée</string>
@ -557,6 +558,7 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="danar_bluetooth_status">État Bluetooth</string> <string name="danar_bluetooth_status">État Bluetooth</string>
<string name="nav_about">À propos de</string> <string name="nav_about">À propos de</string>
<string name="smscommunicator_missingsmspermission">Autorisation SMS manquante</string> <string name="smscommunicator_missingsmspermission">Autorisation SMS manquante</string>
<string name="smscommunicator_missingphonestatepermission">Autorisation du téléphone manquante</string>
<string name="xdripstatus_settings">état Xdrip (montre)</string> <string name="xdripstatus_settings">état Xdrip (montre)</string>
<string name="xdripstatus">Barre d\'état pour xDrip (Montre)</string> <string name="xdripstatus">Barre d\'état pour xDrip (Montre)</string>
<string name="xdripstatus_shortname">xds</string> <string name="xdripstatus_shortname">xds</string>
@ -1054,6 +1056,10 @@ L\'ENSEMBLE DES RISQUES LIÉS À LA QUALITÉ ET À LA PERFORMANCE DU PROGRAMME S
<string name="loop_openmode_min_change">Changement minimum possible [%]</string> <string name="loop_openmode_min_change">Changement minimum possible [%]</string>
<string name="loop_openmode_min_change_summary">Le fonctionnement de la Boucle demandera une confirmation uniquement si le changement est supérieur à cette valeur. Par défaut, la valeur est 20%</string> <string name="loop_openmode_min_change_summary">Le fonctionnement de la Boucle demandera une confirmation uniquement si le changement est supérieur à cette valeur. Par défaut, la valeur est 20%</string>
<string name="pairfirst">Appairez SVP votre pompe avec votre téléphone !</string> <string name="pairfirst">Appairez SVP votre pompe avec votre téléphone !</string>
<string name="profile_total">== ∑ %1$s U</string>
<string name="profile_ins_units_per_hout">U/h</string>
<string name="profile_carbs_per_unit">g/U</string>
<string name="profile_per_unit">/U</string>
<plurals name="objective_days"> <plurals name="objective_days">
<item quantity="one">%1$d jour</item> <item quantity="one">%1$d jour</item>
<item quantity="other">%1$d jours</item> <item quantity="other">%1$d jours</item>

View file

@ -738,7 +738,7 @@
<string name="combo_pump_state_label">Stato</string> <string name="combo_pump_state_label">Stato</string>
<string name="combo_pump_activity_label">Attivita\'</string> <string name="combo_pump_activity_label">Attivita\'</string>
<string name="combo_no_pump_connection">Nessuna connessione per %1$d min</string> <string name="combo_no_pump_connection">Nessuna connessione per %1$d min</string>
<string name="combo_tbr_remaining"><div class="notranslate"> 0%</div> (%2$d min restanti)</string> <string name="combo_tbr_remaining">%1$d%% (%2$d min restanti)</string>
<string name="combo_pump_state_initializing">Inizializzazione in corso</string> <string name="combo_pump_state_initializing">Inizializzazione in corso</string>
<string name="combo_pump_state_suspended_due_to_error">Sospesa a causa di errore</string> <string name="combo_pump_state_suspended_due_to_error">Sospesa a causa di errore</string>
<string name="combo_pump_state_suspended_by_user">Sospeso dall\'utente</string> <string name="combo_pump_state_suspended_by_user">Sospeso dall\'utente</string>

View file

@ -532,6 +532,7 @@
<string name="disconnectpumpfor2h">Wyłącz pompę na 2 h</string> <string name="disconnectpumpfor2h">Wyłącz pompę na 2 h</string>
<string name="disconnectpumpfor3h">Wyłącz pompę na 3 h</string> <string name="disconnectpumpfor3h">Wyłącz pompę na 3 h</string>
<string name="resume">Wznów</string> <string name="resume">Wznów</string>
<string name="reconnect">Połącz ponownie pompę</string>
<string name="smscommunicator_wrongduration">Zły czas trwania</string> <string name="smscommunicator_wrongduration">Zły czas trwania</string>
<string name="smscommunicator_loopsuspended">Pętla wstrzymana</string> <string name="smscommunicator_loopsuspended">Pętla wstrzymana</string>
<string name="smscommunicator_loopresumed">Pętla wznowiona</string> <string name="smscommunicator_loopresumed">Pętla wznowiona</string>
@ -556,6 +557,7 @@
<string name="danar_bluetooth_status">Status Bluetooth</string> <string name="danar_bluetooth_status">Status Bluetooth</string>
<string name="nav_about">O programie</string> <string name="nav_about">O programie</string>
<string name="smscommunicator_missingsmspermission">Brak uprawnień SMS</string> <string name="smscommunicator_missingsmspermission">Brak uprawnień SMS</string>
<string name="smscommunicator_missingphonestatepermission">Brak uprawnień do wykrywania stanu telefonu</string>
<string name="xdripstatus_settings">xDrip Status (watch)</string> <string name="xdripstatus_settings">xDrip Status (watch)</string>
<string name="xdripstatus">Linia Statusu xDrip (watch)</string> <string name="xdripstatus">Linia Statusu xDrip (watch)</string>
<string name="xdripstatus_shortname">xds</string> <string name="xdripstatus_shortname">xds</string>
@ -771,8 +773,8 @@
<string name="combo_error_bolus_verification_failed">Dostarczanie bolusa i sprawdzenia historii pompy nie powiodło się, Sprawdź pompę. Jeśli dostarczono bolusa, dane zostaną uzupełnione podczas następnego połączenia z pompą.</string> <string name="combo_error_bolus_verification_failed">Dostarczanie bolusa i sprawdzenia historii pompy nie powiodło się, Sprawdź pompę. Jeśli dostarczono bolusa, dane zostaną uzupełnione podczas następnego połączenia z pompą.</string>
<string name="combo_reservoir_level_insufficient_for_bolus">Za mało insuliny na bolus pozostało w zbiorniku</string> <string name="combo_reservoir_level_insufficient_for_bolus">Za mało insuliny na bolus pozostało w zbiorniku</string>
<string name="extendedbolusdeliveryerror">Błąd dostarczania bolusa przedłużonego</string> <string name="extendedbolusdeliveryerror">Błąd dostarczania bolusa przedłużonego</string>
<string name="insightpump_shortname">Wgląd</string> <string name="insightpump_shortname">Insight</string>
<string name="insightpump">Wgląd w pompę</string> <string name="insightpump">Pompa Insight</string>
<string name="status_no_colon">Status</string> <string name="status_no_colon">Status</string>
<string name="changed">Zmieniono</string> <string name="changed">Zmieniono</string>
<string name="pump_stopped_uppercase">POMPA ZATRZYMANA</string> <string name="pump_stopped_uppercase">POMPA ZATRZYMANA</string>
@ -889,6 +891,8 @@
<string name="closedmodedisabledinpreferences">Tryb zamkniętej pętli wyłączony w ustawieniach</string> <string name="closedmodedisabledinpreferences">Tryb zamkniętej pętli wyłączony w ustawieniach</string>
<string name="autosensdisabledinpreferences">Autosens wyłączony w ustawieniach</string> <string name="autosensdisabledinpreferences">Autosens wyłączony w ustawieniach</string>
<string name="smbdisabledinpreferences">SMB wyłączone w ustawieniach</string> <string name="smbdisabledinpreferences">SMB wyłączone w ustawieniach</string>
<string name="uamdisabledinpreferences">UAM wyłączone w ustawieniach</string>
<string name="uamdisabledoref1notselected">UAM jest wyłączone ponieważ zależy od wtyczki wrażliwości Oref1</string>
<string name="limitingbasalratio">Ograniczam maks. dawkę bazową do %1$.2f U/h z uwagi na %2$s</string> <string name="limitingbasalratio">Ograniczam maks. dawkę bazową do %1$.2f U/h z uwagi na %2$s</string>
<string name="pumplimit">ograniczenie pompy</string> <string name="pumplimit">ograniczenie pompy</string>
<string name="itmustbepositivevalue">wartość musi być dodatnia</string> <string name="itmustbepositivevalue">wartość musi być dodatnia</string>
@ -1051,6 +1055,11 @@
<string name="insulinlimitviolation">Przekroczono limit insuliny</string> <string name="insulinlimitviolation">Przekroczono limit insuliny</string>
<string name="loop_openmode_min_change">Minimalna żądana zmiana [%]</string> <string name="loop_openmode_min_change">Minimalna żądana zmiana [%]</string>
<string name="loop_openmode_min_change_summary">Pętla wprowadzi żądanie zmiany tylko w przypadku, gdy będzie ona większa niż ta wartość. Wartość domyślna to 20%</string> <string name="loop_openmode_min_change_summary">Pętla wprowadzi żądanie zmiany tylko w przypadku, gdy będzie ona większa niż ta wartość. Wartość domyślna to 20%</string>
<string name="pairfirst">Proszę sparować swoją pompę z telefonem!</string>
<string name="profile_total">== ∑ %1$s U</string>
<string name="profile_ins_units_per_hout">U/h</string>
<string name="profile_carbs_per_unit">g/U</string>
<string name="profile_per_unit">/U</string>
<plurals name="objective_days"> <plurals name="objective_days">
<item quantity="one">%1$d dzień</item> <item quantity="one">%1$d dzień</item>
<item quantity="few">%1$d dni</item> <item quantity="few">%1$d dni</item>

View file

@ -556,6 +556,7 @@
<string name="danar_bluetooth_status">Status bluetooth</string> <string name="danar_bluetooth_status">Status bluetooth</string>
<string name="nav_about">Despre</string> <string name="nav_about">Despre</string>
<string name="smscommunicator_missingsmspermission">Lipsesc permisiunile de SMS</string> <string name="smscommunicator_missingsmspermission">Lipsesc permisiunile de SMS</string>
<string name="smscommunicator_missingphonestatepermission">Nu este acordată permisiunea de citire a stării telefonului</string>
<string name="xdripstatus_settings">Status xDrip (ceas)</string> <string name="xdripstatus_settings">Status xDrip (ceas)</string>
<string name="xdripstatus">Linie de status xDrip (ceas)</string> <string name="xdripstatus">Linie de status xDrip (ceas)</string>
<string name="xdripstatus_shortname">xds</string> <string name="xdripstatus_shortname">xds</string>
@ -888,6 +889,8 @@
<string name="closedmodedisabledinpreferences">Modul buclă închisă dezactivat în preferințe</string> <string name="closedmodedisabledinpreferences">Modul buclă închisă dezactivat în preferințe</string>
<string name="autosensdisabledinpreferences">Autosens dezactivat în preferințe</string> <string name="autosensdisabledinpreferences">Autosens dezactivat în preferințe</string>
<string name="smbdisabledinpreferences">SMB dezactivat în preferințe</string> <string name="smbdisabledinpreferences">SMB dezactivat în preferințe</string>
<string name="uamdisabledinpreferences">UAM dezactivat din setări</string>
<string name="uamdisabledoref1notselected">UAM dezactivat deoarece este bazat pe plugin-ul Oref1 pentru sensibilitate</string>
<string name="limitingbasalratio">Se limitează maximul ratei bazale la %1$.2f U/o datorită %2$s</string> <string name="limitingbasalratio">Se limitează maximul ratei bazale la %1$.2f U/o datorită %2$s</string>
<string name="pumplimit">limită pompă</string> <string name="pumplimit">limită pompă</string>
<string name="itmustbepositivevalue">trebuie să fie o valoare pozitivă</string> <string name="itmustbepositivevalue">trebuie să fie o valoare pozitivă</string>
@ -1050,6 +1053,7 @@
<string name="insulinlimitviolation">Încălcare a limitării cantităţii de insulină</string> <string name="insulinlimitviolation">Încălcare a limitării cantităţii de insulină</string>
<string name="loop_openmode_min_change">Cerere de schimbare minimală [%]</string> <string name="loop_openmode_min_change">Cerere de schimbare minimală [%]</string>
<string name="loop_openmode_min_change_summary">Bucla va afişa o nouă cerere de schimbare doar dacă schimbarea are o valoare decât aceasta. Valoarea implicită este 20%</string> <string name="loop_openmode_min_change_summary">Bucla va afişa o nouă cerere de schimbare doar dacă schimbarea are o valoare decât aceasta. Valoarea implicită este 20%</string>
<string name="pairfirst">Vă rog să conectați pompa cu telefonul!</string>
<plurals name="objective_days"> <plurals name="objective_days">
<item quantity="one">%1$d zi</item> <item quantity="one">%1$d zi</item>
<item quantity="few">%1$d zi</item> <item quantity="few">%1$d zi</item>

View file

@ -532,6 +532,7 @@
<string name="disconnectpumpfor2h">отсоединить помпу на 2 часа</string> <string name="disconnectpumpfor2h">отсоединить помпу на 2 часа</string>
<string name="disconnectpumpfor3h">отсоединить помпу на 3 часа</string> <string name="disconnectpumpfor3h">отсоединить помпу на 3 часа</string>
<string name="resume">возобновить</string> <string name="resume">возобновить</string>
<string name="reconnect">Возобновить соединение с помпой</string>
<string name="smscommunicator_wrongduration">неверное значение длительности</string> <string name="smscommunicator_wrongduration">неверное значение длительности</string>
<string name="smscommunicator_loopsuspended">ЗЦ остановлен</string> <string name="smscommunicator_loopsuspended">ЗЦ остановлен</string>
<string name="smscommunicator_loopresumed">ЗЦикл возобновлен</string> <string name="smscommunicator_loopresumed">ЗЦикл возобновлен</string>

View file

@ -3,7 +3,7 @@
<resources> <resources>
<string name="treatmentssafety_title">Bezpečnosť zadania ošetrenia</string> <string name="treatmentssafety_title">Bezpečnosť zadania ošetrenia</string>
<string name="treatmentssafety_maxbolus_title">Maximálny povolený bolus [U]</string> <string name="treatmentssafety_maxbolus_title">Maximálny povolený bolus [U]</string>
<string name="treatmentssafety_maxcarbs_title">Maximálne povolené sacharidy [g]</string> <string name="treatmentssafety_maxcarbs_title">Maximálne povolené množstvo sacharidov [g]</string>
<string name="nav_preferences">Nastavenia</string> <string name="nav_preferences">Nastavenia</string>
<string name="nav_refreshtreatments">Obnoviť ošetrenia z NS</string> <string name="nav_refreshtreatments">Obnoviť ošetrenia z NS</string>
<string name="nav_resetdb">Vymaž databázu</string> <string name="nav_resetdb">Vymaž databázu</string>
@ -228,8 +228,7 @@
<string name="openapsma_maxbasal_title">Maximálny povolený dočasný bazál [U/h]</string> <string name="openapsma_maxbasal_title">Maximálny povolený dočasný bazál [U/h]</string>
<string name="openapsma_maxbasal_summary">Táto hodnota je nazývaná v OpenAPS ako \"max basal\"</string> <string name="openapsma_maxbasal_summary">Táto hodnota je nazývaná v OpenAPS ako \"max basal\"</string>
<string name="openapsma_maxiob_title">Maximálny bazálny IOB, ktorý OpenAPS môže podať [U]</string> <string name="openapsma_maxiob_title">Maximálny bazálny IOB, ktorý OpenAPS môže podať [U]</string>
<string name="openapsma_maxiob_summary">Táto hodnota je nazývaná v kontexte OpenAPS ako max IOB, je to maximálne množstvo inzulínu v [U], ktoré APS môže naraz podať. <string name="openapsma_maxiob_summary">Táto hodnota je nazývaná v kontexte OpenAPS ako max IOB, je to maximálne množstvo inzulínu v [U], ktoré APS môže naraz podať.</string>
</string>
<string name="dismiss">POTVRDIŤ</string> <string name="dismiss">POTVRDIŤ</string>
<string name="danarpump">DanaR</string> <string name="danarpump">DanaR</string>
<string name="connecting">Pripájanie</string> <string name="connecting">Pripájanie</string>
@ -889,6 +888,8 @@
<string name="closedmodedisabledinpreferences">Uzavretý okruh zakázaný v nastaveniach</string> <string name="closedmodedisabledinpreferences">Uzavretý okruh zakázaný v nastaveniach</string>
<string name="autosensdisabledinpreferences">Automatická detekcia citlivosti zakázaná v nastaveniach</string> <string name="autosensdisabledinpreferences">Automatická detekcia citlivosti zakázaná v nastaveniach</string>
<string name="smbdisabledinpreferences">SMB zakázané v nastaveniach</string> <string name="smbdisabledinpreferences">SMB zakázané v nastaveniach</string>
<string name="uamdisabledinpreferences">UAM zakázané v nastaveniach</string>
<string name="uamdisabledoref1notselected">UAM zakázané, pretože nie je povolený plug-in Oref1</string>
<string name="limitingbasalratio">Max bazál obmedzený na %1$.2f U/h: %2$s</string> <string name="limitingbasalratio">Max bazál obmedzený na %1$.2f U/h: %2$s</string>
<string name="pumplimit">limit pumpy</string> <string name="pumplimit">limit pumpy</string>
<string name="itmustbepositivevalue">požadovaná kladná hodnota</string> <string name="itmustbepositivevalue">požadovaná kladná hodnota</string>
@ -1051,6 +1052,7 @@
<string name="insulinlimitviolation">Prekročený limit inzulínu</string> <string name="insulinlimitviolation">Prekročený limit inzulínu</string>
<string name="loop_openmode_min_change">Minimálna požiadavka na zmenu [%]</string> <string name="loop_openmode_min_change">Minimálna požiadavka na zmenu [%]</string>
<string name="loop_openmode_min_change_summary">Uzavretý okruh si vyžiada iba vtedy, ak je zmena väčšia ako táto hodnota. Štandardná hodnota je 20%</string> <string name="loop_openmode_min_change_summary">Uzavretý okruh si vyžiada iba vtedy, ak je zmena väčšia ako táto hodnota. Štandardná hodnota je 20%</string>
<string name="pairfirst">Prosím spárujte pumpu s telefónom!</string>
<plurals name="objective_days"> <plurals name="objective_days">
<item quantity="one">%1$d deň</item> <item quantity="one">%1$d deň</item>
<item quantity="few">%1$d dní</item> <item quantity="few">%1$d dní</item>

View file

@ -532,6 +532,7 @@
<string name="disconnectpumpfor2h">Koppla loss pump i 2 timmar</string> <string name="disconnectpumpfor2h">Koppla loss pump i 2 timmar</string>
<string name="disconnectpumpfor3h">Koppla loss pump i 3 timmar</string> <string name="disconnectpumpfor3h">Koppla loss pump i 3 timmar</string>
<string name="resume">Återuppta</string> <string name="resume">Återuppta</string>
<string name="reconnect">Återanslut Pump</string>
<string name="smscommunicator_wrongduration">Fel duration</string> <string name="smscommunicator_wrongduration">Fel duration</string>
<string name="smscommunicator_loopsuspended">Loop pausad</string> <string name="smscommunicator_loopsuspended">Loop pausad</string>
<string name="smscommunicator_loopresumed">Loop återupptagen</string> <string name="smscommunicator_loopresumed">Loop återupptagen</string>
@ -556,6 +557,7 @@
<string name="danar_bluetooth_status">Bluetoothstatus</string> <string name="danar_bluetooth_status">Bluetoothstatus</string>
<string name="nav_about">Om</string> <string name="nav_about">Om</string>
<string name="smscommunicator_missingsmspermission">Saknar behörighet att skicka SMS</string> <string name="smscommunicator_missingsmspermission">Saknar behörighet att skicka SMS</string>
<string name="smscommunicator_missingphonestatepermission">Behörighet saknas</string>
<string name="xdripstatus_settings">xDrip Status (klocka)</string> <string name="xdripstatus_settings">xDrip Status (klocka)</string>
<string name="xdripstatus">xDrip Statusrad (klocka)</string> <string name="xdripstatus">xDrip Statusrad (klocka)</string>
<string name="xdripstatus_shortname">xds</string> <string name="xdripstatus_shortname">xds</string>

View file

@ -1,3 +1,26 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!--Generated by crowdin.com--> <!--Generated by crowdin.com-->
<resources></resources> <resources>
<string name="alert_w31">Uyarı W31: Kartuş düşük</string>
<string name="alert_w32">Uyarı W32: Pil bitmek üzere</string>
<string name="alert_w33">Uyarı W33: Geçersiz saat/tarih</string>
<string name="alert_w34">Garanti süresi doldu</string>
<string name="alert_w36">Uyarı W36: Geçici bazal iptal edildi</string>
<string name="alert_w38">Uyarı W38: Bolus iptal edildi</string>
<string name="alert_w39">Uyarı W39: Kiralama süresi uyarısı</string>
<string name="alert_m20">Bakım M20: Kartuş takılı değil</string>
<string name="alert_m21">Bakım M21: Kartuş boş</string>
<string name="alert_m22">Bakım M22: Pil boş</string>
<string name="alert_m23">Bakım M23: Otomatik kapalı</string>
<string name="alert_m24">Bakım M24: Tıkanıklık</string>
<string name="alert_m25">Bakım M25: Kiralama süresi doldu</string>
<string name="alert_m26">Bakım M26: Kartuş değişimi tamamlanamadı</string>
<string name="alert_m27">Bakım M27: Veri yükleme başarısız</string>
<string name="alert_m28">Bakım M28: Duraklat modunda zaman aşımı</string>
<string name="alert_m29">Bakım M29: Pil türü seçili değil</string>
<string name="alert_m30">Bakım M30: Kartuş türü ayarlı değil</string>
<string name="alert_e6">Hata E6: Mekanik hata</string>
<string name="alert_e7">Hata E7: Elektronik hata</string>
<string name="alert_e10">Hata E10: Geri sarma hata</string>
<string name="alert_e13">Hata E13: Dil ekranında hata</string>
</resources>

File diff suppressed because it is too large Load diff

View file

@ -29,6 +29,7 @@
<item>@string/sk_lang</item> <item>@string/sk_lang</item>
<item>@string/sv_lang</item> <item>@string/sv_lang</item>
<item>@string/pl_lang</item> <item>@string/pl_lang</item>
<item>@string/tr_lang</item>
<item>@string/zh_lang</item> <item>@string/zh_lang</item>
</string-array> </string-array>
<string-array name="languagesValues" translatable="false"> <string-array name="languagesValues" translatable="false">
@ -50,6 +51,7 @@
<item>sk</item> <item>sk</item>
<item>sv</item> <item>sv</item>
<item>pl</item> <item>pl</item>
<item>tr</item>
<item>zh</item> <item>zh</item>
</string-array> </string-array>

View file

@ -248,6 +248,7 @@
<string name="sv_lang" translatable="false">Swedish</string> <string name="sv_lang" translatable="false">Swedish</string>
<string name="fr_lang" translatable="false">French</string> <string name="fr_lang" translatable="false">French</string>
<string name="zh_lang" translatable="false">Chinese</string> <string name="zh_lang" translatable="false">Chinese</string>
<string name="tr_lang" translatable="false">Turkish</string>
<string name="pl_lang" translatable="false">Polish</string> <string name="pl_lang" translatable="false">Polish</string>
<string name="openapsma_maxbasal_title">Max U/hr a Temp Basal can be set to</string> <string name="openapsma_maxbasal_title">Max U/hr a Temp Basal can be set to</string>
<string name="openapsma_maxbasal_summary">This value is called max basal in OpenAPS context</string> <string name="openapsma_maxbasal_summary">This value is called max basal in OpenAPS context</string>
@ -584,6 +585,7 @@
<string name="disconnectpumpfor2h">Disconnect pump for 2 h</string> <string name="disconnectpumpfor2h">Disconnect pump for 2 h</string>
<string name="disconnectpumpfor3h">Disconnect pump for 3 h</string> <string name="disconnectpumpfor3h">Disconnect pump for 3 h</string>
<string name="resume">Resume</string> <string name="resume">Resume</string>
<string name="reconnect">Reconnect Pump</string>
<string name="smscommunicator_wrongduration">Wrong duration</string> <string name="smscommunicator_wrongduration">Wrong duration</string>
<string name="smscommunicator_loopsuspended">Loop suspended</string> <string name="smscommunicator_loopsuspended">Loop suspended</string>
<string name="smscommunicator_loopresumed">Loop resumed</string> <string name="smscommunicator_loopresumed">Loop resumed</string>
@ -610,6 +612,7 @@
<string name="danar_bluetooth_status">Bluetooth status</string> <string name="danar_bluetooth_status">Bluetooth status</string>
<string name="nav_about">About</string> <string name="nav_about">About</string>
<string name="smscommunicator_missingsmspermission">Missing SMS permission</string> <string name="smscommunicator_missingsmspermission">Missing SMS permission</string>
<string name="smscommunicator_missingphonestatepermission">Missing phone state permission</string>
<string name="xdripstatus_settings">xDrip Status (watch)</string> <string name="xdripstatus_settings">xDrip Status (watch)</string>
<string name="xdripstatus">xDrip Statusline (watch)</string> <string name="xdripstatus">xDrip Statusline (watch)</string>
<string name="xdripstatus_shortname">xds</string> <string name="xdripstatus_shortname">xds</string>
@ -1211,6 +1214,11 @@
<string name="key_short_tabtitles" translatable="false">short_tabtitles</string> <string name="key_short_tabtitles" translatable="false">short_tabtitles</string>
<string name="pairfirst">Please pair your pump with your phone!</string> <string name="pairfirst">Please pair your pump with your phone!</string>
<string name="profile_total">== ∑ %1$s U</string>
<string name="profile_ins_units_per_hout">U/h</string>
<string name="profile_carbs_per_unit">g/U</string>
<string name="profile_per_unit">/U</string>
<plurals name="objective_days"> <plurals name="objective_days">
<item quantity="one">%1$d day</item> <item quantity="one">%1$d day</item>
<item quantity="other">%1$d days</item> <item quantity="other">%1$d days</item>

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<automotiveApp>
<uses name="notification" />
</automotiveApp>

View file

@ -101,6 +101,9 @@ public class AAPSMocker {
when(MainApp.gs(R.string.careportal_profileswitch)).thenReturn("Profile Switch"); when(MainApp.gs(R.string.careportal_profileswitch)).thenReturn("Profile Switch");
when(MainApp.gs(R.string.configbuilder_insulin)).thenReturn("Insulin"); when(MainApp.gs(R.string.configbuilder_insulin)).thenReturn("Insulin");
when(MainApp.gs(R.string.bolusdelivering)).thenReturn("Delivering 0.0U"); when(MainApp.gs(R.string.bolusdelivering)).thenReturn("Delivering 0.0U");
when(MainApp.gs(R.string.profile_per_unit)).thenReturn("/U");
when(MainApp.gs(R.string.profile_carbs_per_unit)).thenReturn("g/U");
when(MainApp.gs(R.string.profile_ins_units_per_hout)).thenReturn("U/h");
} }
public static MainApp mockMainApp() { public static MainApp mockMainApp() {

View file

@ -117,6 +117,7 @@ public class MainAppTest {
@Test @Test
public void isEngineeringModeOrReleaseTest() { public void isEngineeringModeOrReleaseTest() {
mainApp.devBranch = true;
Assert.assertEquals(!Config.APS, mainApp.isEngineeringModeOrRelease()); Assert.assertEquals(!Config.APS, mainApp.isEngineeringModeOrRelease());
} }

View file

@ -19,7 +19,12 @@ public class PercentageSplitterTest {
} }
@Test @Test
public void pureNameTestPercentageAndShift() { public void pureNameTestPercentageAndPositiveTimeShift() {
assertEquals("Fiasp", PercentageSplitter.pureName("Fiasp (101%,2h)")); assertEquals("Fiasp", PercentageSplitter.pureName("Fiasp (101%,2h)"));
} }
@Test
public void pureNameTestPercentageAndNegtiveTimeShift() {
assertEquals("Fiasp", PercentageSplitter.pureName("Fiasp (50%,-2h)"));
}
} }