Merge remote-tracking branch 'origin/master' into tilt_gesture_opengl

This commit is contained in:
veliymolfar 2020-01-14 17:18:40 +02:00
commit 2a678e3103
968 changed files with 2129 additions and 1198 deletions

View file

@ -873,7 +873,7 @@ public class GPXUtilities {
WptPt point = segment.points.get(k); WptPt point = segment.points.get(k);
if (k > 0) { if (k > 0) {
double currentSegment = 0; double currentSegment = 0;
if (!(segment.generalSegment && joinSegments && point.firstPoint)) { if (!(segment.generalSegment && !joinSegments && point.firstPoint)) {
currentSegment = metric.metric(prev, point); currentSegment = metric.metric(prev, point);
secondaryMetricEnd += secondaryMetric.metric(prev, point); secondaryMetricEnd += secondaryMetric.metric(prev, point);
} }

View file

@ -676,7 +676,72 @@ public class RouteDataObject {
} }
return false; return false;
} }
public boolean isExitPoint() {
if (pointTypes != null) {
int ptSz = pointTypes.length;
for (int i = 0; i < ptSz; i++) {
int[] point = pointTypes[i];
if (point != null) {
int pSz = point.length;
for (int j = 0; j < pSz; j++) {
if (region.routeEncodingRules.get(point[j]).getValue().equals("motorway_junction")) {
return true;
}
}
}
}
}
return false;
}
// public boolean isMotorWayLink() {
// int sz = types.length;
// for (int i = 0; i < sz; i++) {
// RouteTypeRule r = region.quickGetEncodingRule(types[i]);
// if (r.getTag().equals("highway") && r.getValue().equals("motorway_link")) {
// return true;
// }
// }
// return false;
// }
public String getExitName() {
if (pointNames != null && pointNameTypes != null) {
int pnSz = pointNames.length;
for (int i = 0; i < pnSz; i++) {
String[] point = pointNames[i];
if (point != null) {
int pSz = point.length;
for (int j = 0; j < pSz; j++) {
if (pointNameTypes[i][j] == region.nameTypeRule) {
return point[j];
}
}
}
}
}
return null;
}
public String getExitRef() {
if (pointNames != null && pointNameTypes != null) {
int pnSz = pointNames.length;
for (int i = 0; i < pnSz; i++) {
String[] point = pointNames[i];
if (point != null) {
int pSz = point.length;
for (int j = 0; j < pSz; j++) {
if (pointNameTypes[i][j] == region.refTypeRule) {
return point[j];
}
}
}
}
}
return null;
}
public int getOneway() { public int getOneway() {
int sz = types.length; int sz = types.length;
for (int i = 0; i < sz; i++) { for (int i = 0; i < sz; i++) {

View file

@ -0,0 +1,25 @@
package net.osmand.router;
public class ExitInfo {
private String ref;
private String exitStreetName;
public String getRef() {
return ref;
}
public void setRef(String ref) {
this.ref = ref;
}
public String getExitStreetName() {
return exitStreetName;
}
public void setExitStreetName(String exitStreetName) {
this.exitStreetName = exitStreetName;
}
}

View file

@ -1087,14 +1087,15 @@ public class RouteResultPreparation {
t = attachKeepLeftInfoAndLanes(leftSide, prev, rr); t = attachKeepLeftInfoAndLanes(leftSide, prev, rr);
} }
if (t != null) { if (t != null) {
t.setTurnAngle((float) -mpi); t.setTurnAngle((float) - mpi);
} }
} }
return t; return t;
} }
private int[] getTurnLanesInfo(RouteSegmentResult prevSegm, int mainTurnType) { String turnLanes = getTurnLanesString(prevSegm); private int[] getTurnLanesInfo(RouteSegmentResult prevSegm, int mainTurnType) {
int[] lanesArray ; String turnLanes = getTurnLanesString(prevSegm);
int[] lanesArray;
if (turnLanes == null) { if (turnLanes == null) {
if(prevSegm.getTurnType() != null && prevSegm.getTurnType().getLanes() != null if(prevSegm.getTurnType() != null && prevSegm.getTurnType().getLanes() != null
&& prevSegm.getDistance() < 100) { && prevSegm.getDistance() < 100) {

View file

@ -17,6 +17,7 @@
"Parking fee: no (Charging station / Transportation)", "Parking fee: no (Charging station / Transportation)",
"Parking fee: yes (Charging station / Transportation)", "Parking fee: yes (Charging station / Transportation)",
"Parking lot (Fire hydrant / Emergency infrastructure)", "Parking lot (Fire hydrant / Emergency infrastructure)",
"Parking space (Personal transport)",
"Parking tickets (Vending machine / Store)", "Parking tickets (Vending machine / Store)",
"Parking tickets (Vending machine / Store)", "Parking tickets (Vending machine / Store)",
"Parking time limit (Parking / Personal transport)", "Parking time limit (Parking / Personal transport)",

View file

@ -50,7 +50,7 @@
android:id="@+id/text_container" android:id="@+id/text_container"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/content_padding_standard" android:layout_marginBottom="@dimen/content_padding_half"
android:animateLayoutChanges="true" android:animateLayoutChanges="true"
android:orientation="vertical" android:orientation="vertical"
android:paddingLeft="@dimen/my_location_text_sides_margin" android:paddingLeft="@dimen/my_location_text_sides_margin"
@ -58,7 +58,7 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="@dimen/action_bar_height"> android:layout_height="wrap_content">
<net.osmand.telegram.ui.views.TextViewEx <net.osmand.telegram.ui.views.TextViewEx
android:id="@+id/title" android:id="@+id/title"
@ -66,6 +66,8 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center_vertical" android:layout_gravity="center_vertical"
android:layout_weight="1" android:layout_weight="1"
android:paddingTop="@dimen/app_bar_title_padding_small"
android:paddingBottom="@dimen/app_bar_title_padding_small"
android:ellipsize="end" android:ellipsize="end"
android:gravity="center" android:gravity="center"
android:maxLines="1" android:maxLines="1"
@ -295,6 +297,30 @@
</FrameLayout> </FrameLayout>
<FrameLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/bg_list_item_dark">
<net.osmand.telegram.ui.views.TextViewEx
android:id="@+id/back_to_osmand"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="?attr/selectableItemBackground"
android:drawableStart="@drawable/ic_action_undo"
android:drawableLeft="@drawable/ic_action_undo"
android:drawablePadding="@dimen/my_location_text_sides_margin"
android:gravity="center_vertical"
android:minHeight="@dimen/list_item_height_min"
android:paddingStart="@dimen/content_padding_standard"
android:paddingLeft="@dimen/content_padding_standard"
android:text="@string/back_to_osmand"
android:textColor="?attr/colorPrimaryDark"
android:textSize="@dimen/list_item_title_text_size"
app:typeface="@string/font_roboto_regular" />
</FrameLayout>
</android.support.design.widget.AppBarLayout> </android.support.design.widget.AppBarLayout>
<FrameLayout <FrameLayout

View file

@ -259,4 +259,8 @@
<string name="unit_of_speed_system">Hastighed</string> <string name="unit_of_speed_system">Hastighed</string>
<string name="buffer_time_descr">Maksimal tid til lagring af punkter i bufferen</string> <string name="buffer_time_descr">Maksimal tid til lagring af punkter i bufferen</string>
<string name="buffer_time">Buffer udløbstid</string> <string name="buffer_time">Buffer udløbstid</string>
<string name="unit_of_length_descr">Ændr enhed for afstand.</string>
<string name="shared_string_suggested">Foreslået</string>
<string name="status_widget_title">OsmAnd Tracker-status</string>
<string name="back_to_osmand">Tilbage til OsmAnd</string>
</resources> </resources>

View file

@ -35,7 +35,7 @@
<string name="shared_string_close">Schließen</string> <string name="shared_string_close">Schließen</string>
<string name="connected_account">Verbundenes Konto</string> <string name="connected_account">Verbundenes Konto</string>
<string name="shared_string_account">Konto</string> <string name="shared_string_account">Konto</string>
<string name="in_time">"in %1$s "</string> <string name="in_time">in %1$s</string>
<string name="osmand_connect_desc">Wählen Sie die OsmAnd-Version, die OsmAnd Tracker verwendet, um Positionen anzuzeigen.</string> <string name="osmand_connect_desc">Wählen Sie die OsmAnd-Version, die OsmAnd Tracker verwendet, um Positionen anzuzeigen.</string>
<string name="osmand_connect">OsmAnd verbinden</string> <string name="osmand_connect">OsmAnd verbinden</string>
<string name="location_history_desc">Blendet Kontakte aus, die sich eine bestimmte Zeit lang nicht bewegt haben.</string> <string name="location_history_desc">Blendet Kontakte aus, die sich eine bestimmte Zeit lang nicht bewegt haben.</string>
@ -199,7 +199,7 @@
<string name="privacy_policy_use_telegram">Telegram (die Messaging-App) wird verwendet, um sich mit Menschen zu verbinden und mit ihnen zu kommunizieren.</string> <string name="privacy_policy_use_telegram">Telegram (die Messaging-App) wird verwendet, um sich mit Menschen zu verbinden und mit ihnen zu kommunizieren.</string>
<string name="shared_string_ok">OK</string> <string name="shared_string_ok">OK</string>
<string name="location_recording_enabled">Standortaufzeichnung aktiviert</string> <string name="location_recording_enabled">Standortaufzeichnung aktiviert</string>
<string name="app_name_short">OsmAnd-Tracker</string> <string name="app_name_short">OsmAnd Tracker</string>
<string name="shared_string_accept">Akzeptieren</string> <string name="shared_string_accept">Akzeptieren</string>
<string name="telegram_privacy_policy">Telegram-Datenschutzerklärung</string> <string name="telegram_privacy_policy">Telegram-Datenschutzerklärung</string>
<string name="osmand_privacy_policy">OsmAnd Datenschutzerklärung</string> <string name="osmand_privacy_policy">OsmAnd Datenschutzerklärung</string>
@ -260,4 +260,7 @@
<string name="unit_of_length_descr">Maß für Entfernungen ändern.</string> <string name="unit_of_length_descr">Maß für Entfernungen ändern.</string>
<string name="buffer_time_descr">Maximale Zeit zum Speichern von Punkten im Puffer</string> <string name="buffer_time_descr">Maximale Zeit zum Speichern von Punkten im Puffer</string>
<string name="buffer_time">Verfallszeit des Puffers</string> <string name="buffer_time">Verfallszeit des Puffers</string>
<string name="shared_string_suggested">Empfohlen</string>
<string name="status_widget_title">OsmAnd Tracker-Status</string>
<string name="back_to_osmand">Zurück zu OsmAnd</string>
</resources> </resources>

View file

@ -260,4 +260,7 @@
<string name="my_location">Minu asukoht</string> <string name="my_location">Minu asukoht</string>
<string name="live_now">Nüüd reaalajas nähtav</string> <string name="live_now">Nüüd reaalajas nähtav</string>
<string name="timeline">Ajajoon</string> <string name="timeline">Ajajoon</string>
<string name="shared_string_suggested">Soovitatud</string>
<string name="status_widget_title">OsmAnd Tracker olek</string>
<string name="back_to_osmand">Tagasi OsmAnd-i</string>
</resources> </resources>

View file

@ -259,4 +259,7 @@
<string name="unit_of_speed_system">יחידת מהירות</string> <string name="unit_of_speed_system">יחידת מהירות</string>
<string name="buffer_time_descr">הזמן המרבי לשמירת נקודות בזיכרון</string> <string name="buffer_time_descr">הזמן המרבי לשמירת נקודות בזיכרון</string>
<string name="buffer_time">זמן פקיעת הזיכרון</string> <string name="buffer_time">זמן פקיעת הזיכרון</string>
<string name="shared_string_suggested">מוצע</string>
<string name="status_widget_title">מצב עוקב OsmAnd</string>
<string name="back_to_osmand">חזרה ל־OsmAnd</string>
</resources> </resources>

View file

@ -2,7 +2,7 @@
<resources> <resources>
<string name="shared_string_telegram">Telegram</string> <string name="shared_string_telegram">Telegram</string>
<string name="privacy_policy_use_telegram">A Telegram (üzenetküldő alkalmazás) a másokkal való összekapcsolódásra és kommunikációra használható.</string> <string name="privacy_policy_use_telegram">A Telegram (üzenetküldő alkalmazás) a másokkal való összekapcsolódásra és kommunikációra használható.</string>
<string name="privacy_policy_telegram_client">A Telegram nyílt platformot használó kliensprogramok egyike az OsmAnd tracker. Partnerei bármelyik másik Telegram kliensprogramot is használhatják.</string> <string name="privacy_policy_telegram_client">A Telegram nyílt platformot használó kliensprogramok egyike az OsmAnd Tracker. Partnerei bármelyik másik Telegram kliensprogramot is használhatják.</string>
<string name="privacy_policy_agree">A „Tovább”-ra kattintva elfogadja a Telegram és az OsmAnd adatvédelmi irányelveinek feltételeit.</string> <string name="privacy_policy_agree">A „Tovább”-ra kattintva elfogadja a Telegram és az OsmAnd adatvédelmi irányelveinek feltételeit.</string>
<string name="shared_string_accept">Elfogadás</string> <string name="shared_string_accept">Elfogadás</string>
<string name="telegram_privacy_policy">Telegram adatvédelmi irányelvei</string> <string name="telegram_privacy_policy">Telegram adatvédelmi irányelvei</string>
@ -257,6 +257,8 @@
<string name="unit_of_length">Hosszmértékegységek</string> <string name="unit_of_length">Hosszmértékegységek</string>
<string name="unit_of_speed_system_descr">Sebesség mértékegységének meghatározása</string> <string name="unit_of_speed_system_descr">Sebesség mértékegységének meghatározása</string>
<string name="unit_of_speed_system">Sebesség mértékegysége</string> <string name="unit_of_speed_system">Sebesség mértékegysége</string>
<string name="buffer_time_descr">Az az idő, amely után a pufferelt helyzetjelentések törlődnek</string> <string name="buffer_time_descr">Az a leghosszabb idő, ameddig a pontok a pufferben tárolódnak</string>
<string name="buffer_time">Puffer lejárati ideje</string> <string name="buffer_time">Puffer lejárati ideje</string>
<string name="shared_string_suggested">Javasolt</string>
<string name="status_widget_title">Az OsmAnd Tracker állapota</string>
</resources> </resources>

View file

@ -2,7 +2,7 @@
<resources> <resources>
<string name="background_work_description">Endre batterioptimiseringsinnstillinger for mer stabil posisjonsdeling.</string> <string name="background_work_description">Endre batterioptimiseringsinnstillinger for mer stabil posisjonsdeling.</string>
<string name="background_work">Bakgrunnsarbeid</string> <string name="background_work">Bakgrunnsarbeid</string>
<string name="battery_optimization_description">Skru av batterioptimisering for OsmAnd Tracker slik at det ikke plutselig skrur seg av når det er i bakgrunnen.</string> <string name="battery_optimization_description">Skru av batterioptimisering for OsmAnd-sporeren slik at det ikke plutselig skrur seg av når det er i bakgrunnen.</string>
<string name="sharing_in_background">Deling i bakgrunnen</string> <string name="sharing_in_background">Deling i bakgrunnen</string>
<string name="go_to_settings">Gå til innstillinger</string> <string name="go_to_settings">Gå til innstillinger</string>
<string name="shared_string_later">Senere</string> <string name="shared_string_later">Senere</string>
@ -20,8 +20,8 @@
<string name="add_device">Legg til enhet</string> <string name="add_device">Legg til enhet</string>
<string name="share_location_as">Del posisjon som</string> <string name="share_location_as">Del posisjon som</string>
<string name="live_now_description">Kontakter og grupper som deler sin posisjon med deg.</string> <string name="live_now_description">Kontakter og grupper som deler sin posisjon med deg.</string>
<string name="logout_from_osmand_telegram_descr">Er du sikker på at du vil logge ut av OsmAnd Tracker slik at du ikke kan sende din posisjon, eller se andres\?</string> <string name="logout_from_osmand_telegram_descr">Er du sikker på at du vil logge ut av OsmAnd-sporeren slik at du ikke kan sende din posisjon, eller se andres\?</string>
<string name="logout_from_osmand_telegram">Logg ut av OsmAnd Tracker\?</string> <string name="logout_from_osmand_telegram">Logg ut av OsmAnd-sporeren\?</string>
<string name="shared_string_name">Navn</string> <string name="shared_string_name">Navn</string>
<string name="by_distance">Etter distanse</string> <string name="by_distance">Etter distanse</string>
<string name="by_name">Etter navn</string> <string name="by_name">Etter navn</string>
@ -39,13 +39,13 @@
<string name="shared_string_group">Gruppe</string> <string name="shared_string_group">Gruppe</string>
<string name="logout_no_internet_msg">Koble til Internett for å logge ut av Telegram ordentlig.</string> <string name="logout_no_internet_msg">Koble til Internett for å logge ut av Telegram ordentlig.</string>
<string name="shared_string_close">Lukk</string> <string name="shared_string_close">Lukk</string>
<string name="disconnect_from_telegram_desc">For å tilbakekalle posisjonsdelingstilgang. Åpne Telegram, gå til Innstillinger - Personvern og sikkerhet - Økter, og sluttfør OsmAnd Tracker-økta.</string> <string name="disconnect_from_telegram_desc">For å tilbakekalle posisjonsdelingstilgang. Åpne Telegram, gå til Innstillinger - Personvern og sikkerhet - Økter, og sluttfør OsmAnd-sporerøkta.</string>
<string name="disconnect_from_telegram">Hvordan koble fra OsmAnd-sporeren fra Telegram</string> <string name="disconnect_from_telegram">Hvordan koble fra OsmAnd-sporeren fra Telegram</string>
<string name="logout_help_desc">Hvordan koble fra OsmAnd-sporeren fra Telegram</string> <string name="logout_help_desc">Hvordan koble fra OsmAnd-sporeren fra Telegram</string>
<string name="connected_account">Tilkoblet konto</string> <string name="connected_account">Tilkoblet konto</string>
<string name="shared_string_account">Konto</string> <string name="shared_string_account">Konto</string>
<string name="in_time">i %1$s</string> <string name="in_time">i %1$s</string>
<string name="osmand_connect_desc">Velg OsmAnd-versjonen OsmAnd Tracker bruker for å vise posisjoner på kartet.</string> <string name="osmand_connect_desc">Velg OsmAnd-versjonen OsmAnd-sporeren bruker for å vise posisjoner på kartet.</string>
<string name="osmand_connect">OsmAnd connect</string> <string name="osmand_connect">OsmAnd connect</string>
<string name="location_history_desc">Skjul kontaktene som ikke har oppdatert sin plassering etter et gitt tidsintervall.</string> <string name="location_history_desc">Skjul kontaktene som ikke har oppdatert sin plassering etter et gitt tidsintervall.</string>
<string name="location_history">Posisjonshistorikk</string> <string name="location_history">Posisjonshistorikk</string>
@ -84,7 +84,7 @@
<string name="my_location_search_hint">Søk: Gruppe eller kontakt</string> <string name="my_location_search_hint">Søk: Gruppe eller kontakt</string>
<string name="start_location_sharing">Del posisjon</string> <string name="start_location_sharing">Del posisjon</string>
<string name="show_on_map">Vis på kartet</string> <string name="show_on_map">Vis på kartet</string>
<string name="app_name">OsmAnd Online GPS Tracker</string> <string name="app_name">OsmAnd nettbasert GPS-sporer</string>
<string name="phone_number_title">Telefonnummer</string> <string name="phone_number_title">Telefonnummer</string>
<string name="phone_number_descr">Telefonnummer i internasjonalt format</string> <string name="phone_number_descr">Telefonnummer i internasjonalt format</string>
<string name="shared_string_password">Passord</string> <string name="shared_string_password">Passord</string>
@ -103,11 +103,11 @@
<string name="gps_not_available">Skru på «Posisjon» i systeminnstillingene</string> <string name="gps_not_available">Skru på «Posisjon» i systeminnstillingene</string>
<string name="location_service_no_gps_available">Velg en av posisjonstilbyderne for å dele din posisjon.</string> <string name="location_service_no_gps_available">Velg en av posisjonstilbyderne for å dele din posisjon.</string>
<string name="osmand_service">Bakgrunnsmodus</string> <string name="osmand_service">Bakgrunnsmodus</string>
<string name="osmand_service_descr">OsmAnd Tracker kjører som nisse med skjermen av.</string> <string name="osmand_service_descr">OsmAnd-sporeren kjører som nisse med skjermen av.</string>
<string name="shared_string_distance">Distanse</string> <string name="shared_string_distance">Distanse</string>
<string name="share_location">Del posisjon</string> <string name="share_location">Del posisjon</string>
<string name="sharing_location">Deler posisjon</string> <string name="sharing_location">Deler posisjon</string>
<string name="process_service">OsmAnd Tracker-tjeneste</string> <string name="process_service">OsmAnd-sporertjeneste</string>
<string name="osmand_logo">OsmAnd-logo</string> <string name="osmand_logo">OsmAnd-logo</string>
<string name="install_osmand_dialog_message">Du må installere gratis- eller betalt versjon av OsmAnd først</string> <string name="install_osmand_dialog_message">Du må installere gratis- eller betalt versjon av OsmAnd først</string>
<string name="install_osmand">Installer OsmAnd</string> <string name="install_osmand">Installer OsmAnd</string>
@ -125,7 +125,9 @@
<string name="shared_string_hour_short">t</string> <string name="shared_string_hour_short">t</string>
<string name="shared_string_minute_short">min</string> <string name="shared_string_minute_short">min</string>
<string name="shared_string_second_short">sek</string> <string name="shared_string_second_short">sek</string>
<string name="welcome_descr"><b>OsmAnd-sporer</b> lar deg dele din posisjon og se andres i OsmAnd.<br/> <br/>Programmet belager seg på Telegram-API-et, så du må ha en Telegram-konto.</string> <string name="welcome_descr">
<b>OsmAnd-sporeren</b> lar deg dele din posisjon og se andres i OsmAnd.<br/>
<br/>Programmet belager seg på Telegram-API-et, så du må ha en Telegram-konto.</string>
<string name="my_location">Min posisjon</string> <string name="my_location">Min posisjon</string>
<string name="last_updated_location">Sist oppdaterte posisjon:</string> <string name="last_updated_location">Sist oppdaterte posisjon:</string>
<string name="successfully_sent_and_updated">Sendt og oppdatert</string> <string name="successfully_sent_and_updated">Sendt og oppdatert</string>
@ -249,4 +251,15 @@
<string name="set_time_timeline_descr">Velg tid å vise</string> <string name="set_time_timeline_descr">Velg tid å vise</string>
<string name="start_end_date">Startsluttdato</string> <string name="start_end_date">Startsluttdato</string>
<string name="saved_messages">Lagrede meldinger</string> <string name="saved_messages">Lagrede meldinger</string>
<string name="time_zone_descr">Velg tidssone å vise i dine plasseringsmeldinger.</string>
<string name="time_zone">Tidssone</string>
<string name="units_and_formats">Enheter og formater</string>
<string name="unit_of_length_descr">Endre hva lengde måles i.</string>
<string name="unit_of_length">Lengdeenhet</string>
<string name="unit_of_speed_system_descr">Definer en fartsenhet</string>
<string name="unit_of_speed_system">Fartsenhet</string>
<string name="buffer_time_descr">Maksimal tid å lagre punkter i mellomlageret</string>
<string name="buffer_time">Utløpstid for mellomlager</string>
<string name="shared_string_suggested">Foreslått</string>
<string name="status_widget_title">OsmAnd-sporerstatus</string>
</resources> </resources>

View file

@ -259,4 +259,5 @@
<string name="unit_of_speed_system">Jednostka prędkości</string> <string name="unit_of_speed_system">Jednostka prędkości</string>
<string name="buffer_time_descr">Maksymalny czas przechowywania punktów w buforze</string> <string name="buffer_time_descr">Maksymalny czas przechowywania punktów w buforze</string>
<string name="buffer_time">Czas ważności bufora</string> <string name="buffer_time">Czas ważności bufora</string>
<string name="time_zone_descr">Wybierz strefę czasową, która ma być wyświetlana w wiadomościach o Twojej lokalizacji.</string>
</resources> </resources>

View file

@ -260,4 +260,7 @@
<string name="unit_of_speed_system">Unidade de velocidade</string> <string name="unit_of_speed_system">Unidade de velocidade</string>
<string name="buffer_time_descr">Tempo máximo para armazenar pontos no buffer</string> <string name="buffer_time_descr">Tempo máximo para armazenar pontos no buffer</string>
<string name="buffer_time">Tempo de expiração do buffer</string> <string name="buffer_time">Tempo de expiração do buffer</string>
<string name="shared_string_suggested">Sugerido</string>
<string name="status_widget_title">Status do OsmAnd Tracker</string>
<string name="back_to_osmand">Voltar para OsmAnd</string>
</resources> </resources>

View file

@ -260,4 +260,7 @@
<string name="unit_of_speed_system">Единица измерения скорости</string> <string name="unit_of_speed_system">Единица измерения скорости</string>
<string name="buffer_time_descr">Максимальное время хранения точек в буфере</string> <string name="buffer_time_descr">Максимальное время хранения точек в буфере</string>
<string name="buffer_time">Срок действия буфера</string> <string name="buffer_time">Срок действия буфера</string>
<string name="shared_string_suggested">Предложено</string>
<string name="status_widget_title">Статус OsmAnd Tracker</string>
<string name="back_to_osmand">Вернуться к OsmAnd</string>
</resources> </resources>

View file

@ -257,6 +257,9 @@
<string name="unit_of_length">Unidades de longària</string> <string name="unit_of_length">Unidades de longària</string>
<string name="unit_of_speed_system_descr">Issèbera s\'unidade de letresa.</string> <string name="unit_of_speed_system_descr">Issèbera s\'unidade de letresa.</string>
<string name="unit_of_speed_system">Unidade de lestresa</string> <string name="unit_of_speed_system">Unidade de lestresa</string>
<string name="buffer_time_descr">Tempus màssimu de archiviatzione de sos puntos in sa memòria tampone (buffer).</string> <string name="buffer_time_descr">Tempus màssimu de archiviatzione de sos puntos in sa memòria tampone (buffer)</string>
<string name="buffer_time">Tempus de iscadidura de sa memòria tampone</string> <string name="buffer_time">Tempus de iscadidura de sa memòria tampone</string>
<string name="shared_string_suggested">Cunsigiadu</string>
<string name="status_widget_title">Istadu de s\'arrastadore de OsmAnd</string>
<string name="back_to_osmand">Torra a OsmAnd</string>
</resources> </resources>

View file

@ -260,4 +260,7 @@
<string name="unit_of_speed_system">Hız birimi</string> <string name="unit_of_speed_system">Hız birimi</string>
<string name="buffer_time_descr">Noktaların arabellekte saklanacağı maksimum süre</string> <string name="buffer_time_descr">Noktaların arabellekte saklanacağı maksimum süre</string>
<string name="buffer_time">Arabellek zaman aşım süresi</string> <string name="buffer_time">Arabellek zaman aşım süresi</string>
<string name="shared_string_suggested">Önerilen</string>
<string name="status_widget_title">OsmAnd Tracker durumu</string>
<string name="back_to_osmand">OsmAnd\'a geri dön</string>
</resources> </resources>

View file

@ -260,4 +260,7 @@
<string name="unit_of_speed_system">Одиниця вимірювання швидкості</string> <string name="unit_of_speed_system">Одиниця вимірювання швидкості</string>
<string name="buffer_time_descr">Найбільший час зберігання точок у буфері</string> <string name="buffer_time_descr">Найбільший час зберігання точок у буфері</string>
<string name="buffer_time">Термін дії буфера</string> <string name="buffer_time">Термін дії буфера</string>
<string name="shared_string_suggested">Запропоновано</string>
<string name="status_widget_title">Статус відстежувача OsmAnd</string>
<string name="back_to_osmand">Повернутися до OsmAnd</string>
</resources> </resources>

View file

@ -261,4 +261,7 @@
<string name="unit_of_speed_system">速度單位</string> <string name="unit_of_speed_system">速度單位</string>
<string name="buffer_time_descr">在緩衝中儲存點的最長時間</string> <string name="buffer_time_descr">在緩衝中儲存點的最長時間</string>
<string name="buffer_time">緩衝過期時間</string> <string name="buffer_time">緩衝過期時間</string>
<string name="shared_string_suggested">建議</string>
<string name="status_widget_title">OsmAnd Tracker 狀態</string>
<string name="back_to_osmand">回到 OsmAnd</string>
</resources> </resources>

View file

@ -12,6 +12,7 @@
<attr name="primary_btn_text_color" format="reference" /> <attr name="primary_btn_text_color" format="reference" />
<attr name="secondary_btn_bg" format="reference" /> <attr name="secondary_btn_bg" format="reference" />
<attr name="shared_chat_card_bg" format="reference" /> <attr name="shared_chat_card_bg" format="reference" />
<attr name="bg_list_item_dark" format="reference" />
</declare-styleable> </declare-styleable>
<declare-styleable name="TextViewEx"> <declare-styleable name="TextViewEx">

View file

@ -45,4 +45,6 @@
<color name="live_track_active_icon">#F54522</color> <color name="live_track_active_icon">#F54522</color>
<color name="bg_list_item_dark">#727272</color>
</resources> </resources>

View file

@ -1,5 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<dimen name="app_bar_title_padding_small">8dp</dimen>
<dimen name="app_bar_title_padding_big">14dp</dimen>
<dimen name="content_padding_tiny">2dp</dimen> <dimen name="content_padding_tiny">2dp</dimen>
<dimen name="content_padding_small">4dp</dimen> <dimen name="content_padding_small">4dp</dimen>
<dimen name="content_padding_half">8dp</dimen> <dimen name="content_padding_half">8dp</dimen>
@ -51,7 +53,7 @@
<dimen name="image_button_padding">12dp</dimen> <dimen name="image_button_padding">12dp</dimen>
<dimen name="my_location_image_height">168dp</dimen> <dimen name="my_location_image_height">148dp</dimen>
<dimen name="my_location_text_sides_margin">32dp</dimen> <dimen name="my_location_text_sides_margin">32dp</dimen>
<dimen name="my_location_user_icon_size">60dp</dimen> <dimen name="my_location_user_icon_size">60dp</dimen>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<resources> <resources>
<string name="back_to_osmand">Back to OsmAnd</string>
<string name="shared_string_suggested">Suggested</string> <string name="shared_string_suggested">Suggested</string>
<string name="status_widget_title">OsmAnd Tracker status</string> <string name="status_widget_title">OsmAnd Tracker status</string>
<string name="buffer_time_descr">Maximum time to store points in the buffer</string> <string name="buffer_time_descr">Maximum time to store points in the buffer</string>

View file

@ -29,6 +29,7 @@
<item name="windowNoTitle">true</item> <item name="windowNoTitle">true</item>
<item name="bottom_nav_shadow">@drawable/bg_bottom_bar_shadow_with_line_day</item> <item name="bottom_nav_shadow">@drawable/bg_bottom_bar_shadow_with_line_day</item>
<item name="shared_chat_card_bg">@drawable/chat_card_bg_light</item> <item name="shared_chat_card_bg">@drawable/chat_card_bg_light</item>
<item name="bg_list_item_dark">@color/bg_list_item_dark</item>
</style> </style>
<style name="AppTheme.NoActionbar"> <style name="AppTheme.NoActionbar">

View file

@ -225,10 +225,10 @@ class TelegramService : Service(), LocationListener, TelegramIncomingMessagesLis
updateWidgetHandler?.postDelayed({ updateWidgetHandler?.postDelayed({
if (isUsedByMyLocation(usedBy)) { if (isUsedByMyLocation(usedBy)) {
val sharingStatus = app().settings.sharingStatusChanges.last() val sharingStatus = app().settings.sharingStatusChanges.last()
val isSending = sharingStatus.statusType == TelegramSettings.SharingStatusType.SENDING var isSending = sharingStatus.statusType == TelegramSettings.SharingStatusType.SENDING
val sharingChats = app().settings.getShareLocationChats() val sharingChats = app().settings.getShareLocationChats()
var oldestTime = 0L var oldestTime = 0L
if (sharingChats.isNotEmpty()) { if (sharingChats.isNotEmpty() && app().shareLocationHelper.sharingLocation) {
sharingChats.forEach { id -> sharingChats.forEach { id ->
val bufferMessages = app().locationMessages.getBufferedMessagesForChat(id) val bufferMessages = app().locationMessages.getBufferedMessagesForChat(id)
if (bufferMessages.isNotEmpty()) { if (bufferMessages.isNotEmpty()) {
@ -240,9 +240,13 @@ class TelegramService : Service(), LocationListener, TelegramIncomingMessagesLis
oldestTime = 0L oldestTime = 0L
} }
} }
} else {
isSending = false
oldestTime = -1
} }
log.info("oldest buffered msg time: $oldestTime | isSending: $isSending")
app().showLocationHelper.addOrUpdateStatusWidget(oldestTime, isSending) app().showLocationHelper.addOrUpdateStatusWidget(oldestTime, isSending)
} else {
app().showLocationHelper.addOrUpdateStatusWidget(-1, false)
} }
startWidgetUpdates() startWidgetUpdates()
}, UPDATE_WIDGET_INTERVAL_MS) }, UPDATE_WIDGET_INTERVAL_MS)

View file

@ -89,7 +89,10 @@ class ShareLocationHelper(private val app: TelegramApplication) {
app.settings.getChatsShareInfo().forEach { (chatId, shareInfo) -> app.settings.getChatsShareInfo().forEach { (chatId, shareInfo) ->
val currentTime = System.currentTimeMillis() / 1000 val currentTime = System.currentTimeMillis() / 1000
when { when {
shareInfo.getChatLiveMessageExpireTime() <= 0 -> app.settings.shareLocationToChat(chatId, false) shareInfo.getChatLiveMessageExpireTime() <= 0 -> {
app.settings.shareLocationToChat(chatId, false)
app.settings.addTimePeriodToLastItem(shareInfo.chatId, shareInfo.livePeriod)
}
currentTime > shareInfo.currentMessageLimit -> { currentTime > shareInfo.currentMessageLimit -> {
shareInfo.apply { shareInfo.apply {
val newLivePeriod = val newLivePeriod =

View file

@ -14,6 +14,7 @@ import net.osmand.telegram.R
import net.osmand.telegram.TelegramApplication import net.osmand.telegram.TelegramApplication
import net.osmand.telegram.helpers.OsmandAidlHelper.ContextMenuButtonsListener import net.osmand.telegram.helpers.OsmandAidlHelper.ContextMenuButtonsListener
import net.osmand.telegram.helpers.TelegramUiHelper.ListItem import net.osmand.telegram.helpers.TelegramUiHelper.ListItem
import net.osmand.telegram.ui.OPEN_MY_LOCATION_TAB_KEY
import net.osmand.telegram.utils.AndroidUtils import net.osmand.telegram.utils.AndroidUtils
import net.osmand.telegram.utils.OsmandFormatter import net.osmand.telegram.utils.OsmandFormatter
import net.osmand.telegram.utils.OsmandLocationUtils import net.osmand.telegram.utils.OsmandLocationUtils
@ -255,6 +256,7 @@ class ShowLocationHelper(private val app: TelegramApplication) {
private fun getStatusWidgetIntent(): Intent { private fun getStatusWidgetIntent(): Intent {
val startIntent = app.packageManager.getLaunchIntentForPackage(app.packageName) val startIntent = app.packageManager.getLaunchIntentForPackage(app.packageName)
startIntent.addCategory(Intent.CATEGORY_LAUNCHER) startIntent.addCategory(Intent.CATEGORY_LAUNCHER)
startIntent.putExtra(OPEN_MY_LOCATION_TAB_KEY,true)
return startIntent return startIntent
} }

View file

@ -52,6 +52,8 @@ class MyLocationTabFragment : Fragment(), TelegramListener {
private var textMarginBig: Int = 0 private var textMarginBig: Int = 0
private var searchBoxHeight: Int = 0 private var searchBoxHeight: Int = 0
private var searchBoxSidesMargin: Int = 0 private var searchBoxSidesMargin: Int = 0
private var titlePaddingSmall: Int = 0
private var titlePaddingBig: Int = 0
private var appBarScrollRange: Int = -1 private var appBarScrollRange: Int = -1
@ -75,6 +77,7 @@ class MyLocationTabFragment : Fragment(), TelegramListener {
private lateinit var sharingStatusTitle: TextView private lateinit var sharingStatusTitle: TextView
private lateinit var sharingStatusIcon: ImageView private lateinit var sharingStatusIcon: ImageView
private lateinit var startSharingBtn: View private lateinit var startSharingBtn: View
private lateinit var backToOsmAndBtn: TextView
private lateinit var searchBoxBg: GradientDrawable private lateinit var searchBoxBg: GradientDrawable
@ -108,6 +111,8 @@ class MyLocationTabFragment : Fragment(), TelegramListener {
textMarginBig = resources.getDimensionPixelSize(R.dimen.my_location_text_sides_margin) textMarginBig = resources.getDimensionPixelSize(R.dimen.my_location_text_sides_margin)
searchBoxHeight = resources.getDimensionPixelSize(R.dimen.search_box_height) searchBoxHeight = resources.getDimensionPixelSize(R.dimen.search_box_height)
searchBoxSidesMargin = resources.getDimensionPixelSize(R.dimen.content_padding_half) searchBoxSidesMargin = resources.getDimensionPixelSize(R.dimen.content_padding_half)
titlePaddingSmall = resources.getDimensionPixelSize(R.dimen.app_bar_title_padding_small)
titlePaddingBig = resources.getDimensionPixelSize(R.dimen.app_bar_title_padding_big)
sharingMode = settings.hasAnyChatToShareLocation() sharingMode = settings.hasAnyChatToShareLocation()
@ -175,7 +180,6 @@ class MyLocationTabFragment : Fragment(), TelegramListener {
if (Build.VERSION.SDK_INT >= 16) { if (Build.VERSION.SDK_INT >= 16) {
layoutTransition.enableTransitionType(LayoutTransition.CHANGING) layoutTransition.enableTransitionType(LayoutTransition.CHANGING)
} }
AndroidUtils.addStatusBarPadding19v(app, this)
title = findViewById(R.id.title) title = findViewById(R.id.title)
description = findViewById(R.id.description) description = findViewById(R.id.description)
} }
@ -243,6 +247,7 @@ class MyLocationTabFragment : Fragment(), TelegramListener {
} }
} }
backToOsmAndBtn = mainView.findViewById<TextView>(R.id.back_to_osmand)
lastChatsInfo = settings.lastChatsInfo lastChatsInfo = settings.lastChatsInfo
return mainView return mainView
@ -400,10 +405,19 @@ class MyLocationTabFragment : Fragment(), TelegramListener {
private fun adjustText() { private fun adjustText() {
val gravity = if (appBarCollapsed) Gravity.START else Gravity.CENTER val gravity = if (appBarCollapsed) Gravity.START else Gravity.CENTER
val padding = if (appBarCollapsed) textMarginSmall else textMarginBig val padding = if (appBarCollapsed) textMarginSmall else textMarginBig
val titlePadding = if (appBarCollapsed) titlePaddingBig else titlePaddingSmall
textContainer.apply { textContainer.apply {
setPadding(padding, paddingTop, padding, paddingBottom) setPadding(padding, paddingTop, padding, paddingBottom)
if (appBarCollapsed) {
AndroidUtils.addStatusBarPadding19v(app, this)
} else {
AndroidUtils.removeStatusBarPadding19v(app, this)
}
}
title.apply {
this.gravity = gravity
setPadding(paddingLeft, titlePadding, paddingRight, titlePadding)
} }
title.gravity = gravity
description.gravity = gravity description.gravity = gravity
} }
@ -482,6 +496,25 @@ class MyLocationTabFragment : Fragment(), TelegramListener {
if (sharingMode) 0 else AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL if (sharingMode) 0 else AppBarLayout.LayoutParams.SCROLL_FLAG_SCROLL
stopSharingSwitcher.isChecked = true stopSharingSwitcher.isChecked = true
appBarScrollRange = -1 appBarScrollRange = -1
updateBackToOsmAndBtn()
}
private fun updateBackToOsmAndBtn() {
val pckg = app.settings.appToConnectPackage
backToOsmAndBtn.apply {
visibility = if (pckg.isNotEmpty() && sharingMode && AndroidUtils.isAppInstalled(app, pckg)) {
setOnClickListener {
val startIntent = app.packageManager.getLaunchIntentForPackage(pckg)
if (startIntent != null) {
startIntent.addCategory(Intent.CATEGORY_LAUNCHER)
startActivity(startIntent)
}
}
View.VISIBLE
} else {
View.GONE
}
}
} }
private fun updateSharingStatus() { private fun updateSharingStatus() {

View file

@ -106,6 +106,14 @@ object AndroidUtils {
} }
} }
fun removeStatusBarPadding19v(ctx: Context, view: View) {
if (Build.VERSION.SDK_INT >= 19) {
view.apply {
setPadding(paddingLeft, paddingTop - getStatusBarHeight(ctx), paddingRight, paddingBottom)
}
}
}
fun getNavBarHeight(ctx: Context): Int { fun getNavBarHeight(ctx: Context): Int {
if (!hasNavBar(ctx)) { if (!hasNavBar(ctx)) {
return 0 return 0

11
OsmAnd/.gitignore vendored
View file

@ -18,6 +18,15 @@ huaweidrmlib/
HwDRM_SDK_* HwDRM_SDK_*
drm_strings.xml drm_strings.xml
# copy_widget_icons.sh
res/drawable-large/map_*
res/drawable-large-hdpi/map_*
res/drawable-large-xhdpi/map_*
# copy_widget_icons.sh
res/drawable-large/widget_*
res/drawable-large-hdpi/widget_*
res/drawable-large-xhdpi/widget_*
valgrind/ valgrind/
bin/ bin/
dist/ dist/
@ -67,4 +76,4 @@ assets/OsmAndCore_ResourcesBundle/
/resourcesSrc /resourcesSrc
.project .project
.classpath .classpath

View file

@ -3,4 +3,4 @@ x86/
armeabi-v7a/ armeabi-v7a/
mips/ mips/
arm64-v8a/ arm64-v8a/
x86_64/ x86_64/

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 713 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 463 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 372 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 456 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 453 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 391 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 495 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 437 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 568 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 503 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 637 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 464 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 388 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 705 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 572 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 483 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 671 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 452 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 804 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 630 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Some files were not shown because too many files have changed in this diff Show more