forked from upstream-mirrors/OpenTracks
Removed usage of Broadcast (were used by Widget).
This commit is contained in:
@@ -602,7 +602,6 @@ public class TrackRecordingService extends Service {
|
||||
isIdle = false;
|
||||
|
||||
startGps();
|
||||
sendTrackBroadcast(trackStarted ? R.string.track_started_broadcast_action : R.string.track_resumed_broadcast_action, recordingTrackId);
|
||||
|
||||
// Restore periodic tasks
|
||||
voiceExecutor.restore();
|
||||
@@ -700,7 +699,6 @@ public class TrackRecordingService extends Service {
|
||||
}
|
||||
lastLocation = null;
|
||||
|
||||
sendTrackBroadcast(trackStopped ? R.string.track_stopped_broadcast_action : R.string.track_paused_broadcast_action, trackId);
|
||||
stopGps(trackStopped);
|
||||
}
|
||||
|
||||
@@ -881,7 +879,6 @@ public class TrackRecordingService extends Service {
|
||||
}
|
||||
voiceExecutor.update();
|
||||
splitExecutor.update();
|
||||
sendTrackBroadcast(R.string.track_update_broadcast_action, track.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -983,17 +980,6 @@ public class TrackRecordingService extends Service {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sends track broadcast.
|
||||
*
|
||||
* @param actionId the intent action id
|
||||
* @param trackId the track id
|
||||
*/
|
||||
private void sendTrackBroadcast(int actionId, long trackId) {
|
||||
Intent intent = new Intent().setAction(getString(actionId)).putExtra(getString(R.string.track_id_broadcast_extra), trackId);
|
||||
sendBroadcast(intent, getString(R.string.permission_notification_value));
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO: There is a bug in Android that leaks Binder instances. This bug is
|
||||
* especially visible if we have a non-static class, as there is no way to
|
||||
|
||||
@@ -1,25 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Copyright 2010 Google Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
-->
|
||||
<resources>
|
||||
<!-- Do not translate -->
|
||||
<!-- Broadcast -->
|
||||
<string name="track_id_broadcast_extra" translatable="false">TRACK_ID</string>
|
||||
<string name="track_paused_broadcast_action" translatable="false">TRACK_PAUSED</string>
|
||||
<string name="track_resumed_broadcast_action" translatable="false">TRACK_RESUMED</string>
|
||||
<string name="track_started_broadcast_action" translatable="false">TRACK_STARTED</string>
|
||||
<string name="track_stopped_broadcast_action" translatable="false">TRACK_STOPPED</string>
|
||||
<string name="track_update_broadcast_action" translatable="false">TRACK_UPDATE</string>
|
||||
</resources>
|
||||
@@ -21,7 +21,6 @@ limitations under the License.
|
||||
<string name="third_party_libraries" translatable="false"><a href="https://developer.android.com/topic/libraries/support-library/">Google\'s androidX support</a> (Apache License, Version 2.0)</string>
|
||||
<string name="marker_statistics_icon_url" translatable="false">http://maps.google.com/mapfiles/ms/micons/ylw-pushpin.png</string>
|
||||
<string name="marker_waypoint_icon_url" translatable="false">http://maps.google.com/mapfiles/ms/micons/blue-pushpin.png</string>
|
||||
<string name="permission_notification_value" translatable="false">de.dennisguse.opentracks.MYTRACKS_NOTIFICATIONS</string>
|
||||
<string name="sensor_type_value_none" translatable="false">NONE</string>
|
||||
<string name="sensor_unit_beats_per_minute" translatable="false">BPM</string>
|
||||
<string name="settings_recording_track_name_date_iso_8601_value" translatable="false">DATE_ISO_8601</string>
|
||||
@@ -31,9 +30,5 @@ limitations under the License.
|
||||
<string name="stats_rate_speed" translatable="false">SPEED</string>
|
||||
<string name="stats_units_imperial" translatable="false">IMPERIAL</string>
|
||||
<string name="stats_units_metric" translatable="false">METRIC</string>
|
||||
<string name="track_action_end" translatable="false">de.dennisguse.opentracks.END_CURRENT_TRACK</string>
|
||||
<string name="track_action_pause" translatable="false">de.dennisguse.opentracks.PAUSE_CURRENT_TRACK</string>
|
||||
<string name="track_action_resume" translatable="false">de.dennisguse.opentracks.RESUME_CURRENT_TRACK</string>
|
||||
<string name="track_action_start" translatable="false">de.dennisguse.opentracks.START_NEW_TRACK</string>
|
||||
<string name="value_unknown" translatable="false">-</string>
|
||||
</resources>
|
||||
Reference in New Issue
Block a user