Skip to content

Commit

Permalink
Merge branch 'rilling:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Vaibhav2399 authored Apr 6, 2024
2 parents fd6faa1 + 11fd433 commit 8d95710
Show file tree
Hide file tree
Showing 84 changed files with 2,228 additions and 373 deletions.
Binary file added .DS_Store
Binary file not shown.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name: Bug report
about: Report issues of OpenTracks features
title: ''
labels: potential bug
labels: ''
assignees: ''

---
Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE/data_not_recorded.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
name: Data not recorded
about: Somehow OpenTracks did not record GPS data
name: Data not recorded
about: Somehow OpenTracks did not record GPS data
title: ''
labels: potential bug
labels: ''
assignees: ''

---
Expand All @@ -21,4 +21,4 @@ assignees: ''
- Device: [e.g. Nexus 7 (2013)]
- OS: [e.g. LineageOS 15.1]
- OpenTracks version: [e.g. v3.2.4]
- OpenTracks commit id (only for nightly builds): [e.g. 4b333bb]
- OpenTracks commit id (only for nightly builds): [e.g. 4b333bb]
6 changes: 3 additions & 3 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe briefly your feature.**
A clear and concise description of what is the general purpose of the feature is. E.g., adding new ski related statistics services that calculate... [...]. Also if you believe that it relates to other features. Create a link to these features

**Describe the solution you'd like**
A clear and concise description of what you want to happen.
Expand All @@ -17,4 +17,4 @@ A clear and concise description of what you want to happen.
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
Add any other context or screenshots about the feature request here. .
43 changes: 43 additions & 0 deletions .idea/navEditor.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 9 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ buildscript {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:8.2.1'
classpath 'com.android.tools.build:gradle:8.2.2'
}
}

Expand Down Expand Up @@ -56,6 +56,7 @@ android {
buildFeatures {
viewBinding true
buildConfig true
dataBinding true
}

androidResources {
Expand Down Expand Up @@ -111,6 +112,10 @@ android {
}
}

viewBinding{
enabled = true
}

applicationVariants.configureEach { variant ->
variant.resValue "string", "applicationId", variant.applicationId

Expand All @@ -125,6 +130,9 @@ android {
}

dependencies {
implementation 'androidx.activity:activity:1.8.0'
implementation 'androidx.navigation:navigation-fragment:2.7.7'
implementation 'androidx.navigation:navigation-ui:2.7.7'
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:2.0.4'

implementation 'androidx.appcompat:appcompat:1.6.1'
Expand Down
15 changes: 13 additions & 2 deletions src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,19 +49,30 @@

<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />

<queries>
<intent>
<action android:name="android.intent.action.TTS_SERVICE" />
</intent>
</queries>

<application
android:name=".Startup"
android:allowBackup="true"
android:fullBackupContent="@xml/backup_rules_30_lower"
android:dataExtractionRules="@xml/backup_rules_31_higher"
android:enableOnBackInvokedCallback="true"
android:fullBackupContent="@xml/backup_rules_30_lower"
android:hardwareAccelerated="true"
android:hasFragileUserData="false"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/OpenTracksTheme">

<activity
android:name=".ui.aggregatedStatistics.SeasonStats.RunAndChairStatActivity"
android:exported="false" />
<activity
android:name=".ui.aggregatedStatistics.SeasonStats.SeasonStatActivity"
android:exported="false" />
<activity
android:name=".publicapi.StartRecording"
android:exported="true"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ private void storeTrackMetaData(ContentProviderUtils contentProviderUtils, Track
viewBinding.trackEditActivityType.getText().toString(), viewBinding.trackEditDescription.getText().toString(),
contentProviderUtils);
}

@Override
//Deprecated this method beacause its deprecated
@Deprecated
public void onBackPressed() {
if (isDiscarding) {
return;
Expand Down
14 changes: 6 additions & 8 deletions src/main/java/de/dennisguse/opentracks/chart/ChartFragment.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, Strin
}
if (PreferencesUtils.isKey(R.string.stats_rate_key, key)) {
boolean reportSpeed = PreferencesUtils.isReportSpeed(activityTypeLocalized);
if (reportSpeed != viewBinding.chartView.getReportSpeed()) {
if (reportSpeed != viewBinding.chartView.isReportSpeed()) {
viewBinding.chartView.setReportSpeed(reportSpeed);
viewBinding.chartView.applyReportSpeed();

Expand All @@ -105,17 +105,14 @@ public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, Strin
/**
* A runnable that will setFrequency the orange pointer as appropriate and redraw.
*/
private final Runnable updateChart = new Runnable() {
@Override
public void run() {
private final Runnable updateChart = ()->{
if (!isResumed()) {
return;
}

viewBinding.chartView.setShowPointer(isSelectedTrackRecording());
viewBinding.chartView.invalidate();
}
};
};


@Override
Expand Down Expand Up @@ -166,7 +163,7 @@ public void onTrackUpdated(Track track) {

activityTypeLocalized = track.getActivityTypeLocalized();
boolean reportSpeed = PreferencesUtils.isReportSpeed(activityTypeLocalized);
if (reportSpeed != viewBinding.chartView.getReportSpeed()) {
if (reportSpeed != viewBinding.chartView.isReportSpeed()) {
viewBinding.chartView.setReportSpeed(reportSpeed);
viewBinding.chartView.applyReportSpeed();
}
Expand All @@ -186,6 +183,7 @@ public void clearTrackPoints() {
}
}

@Override
public void onSampledInTrackPoint(@NonNull TrackPoint trackPoint, @NonNull TrackStatistics trackStatistics) {
if (isResumed()) {
ChartPoint point = ChartPoint.create(trackStatistics, trackPoint, trackPoint.getSpeed(), chartByDistance, viewBinding.chartView.getUnitSystem());
Expand Down Expand Up @@ -256,7 +254,7 @@ private synchronized void pauseTrackDataHub() {
* Returns true if the selected track is recording.
* Needs to be synchronized because trackDataHub can be accessed by multiple threads.
*/
@Deprecated
@Deprecated(since = "verision x.x",forRemoval = true)
//TODO Should not be dynamic but instead set while instantiating, i.e., newFragment().
private synchronized boolean isSelectedTrackRecording() {
return trackDataHub != null && trackDataHub.isSelectedTrackRecording();
Expand Down
Loading

0 comments on commit 8d95710

Please sign in to comment.