mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-10-06 03:23:07 +02:00
Protects MyTracks notifications based on the settings bit.
Only sends broadcast notifications if allowed by the settings bit. Introduces a permission for internal MyTracks communication. Thus the MyTracks app widget can use this permission to always receive broadcast notifications when a track starts and stops.
This commit is contained in:
@@ -198,7 +198,6 @@ limitations under the License.
|
||||
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
|
||||
<action android:name="com.google.android.apps.mytracks.TRACK_STARTED" />
|
||||
<action android:name="com.google.android.apps.mytracks.TRACK_STOPPED" />
|
||||
<action android:name="com.google.android.apps.mytracks.TRACK_UPDATED" />
|
||||
</intent-filter>
|
||||
<meta-data android:name="android.appwidget.provider"
|
||||
android:resource="@xml/track_widget_info" />
|
||||
@@ -254,10 +253,17 @@ limitations under the License.
|
||||
android:description="@string/write_tracks_permission_description"
|
||||
android:protectionLevel="dangerous" />
|
||||
|
||||
<!-- Permission to get MyTracks broadcasts. For internal MyTracks communication. -->
|
||||
<permission android:name="com.google.android.apps.mytracks.MYTRACKS_NOTIFICATIONS"
|
||||
android:permissionGroup="android.permission-group.LOCATION"
|
||||
android:label="@string/mytracks_notifications_permission_label"
|
||||
android:description="@string/mytracks_notifications_permission_description"
|
||||
android:protectionLevel="signature" />
|
||||
|
||||
<!-- We read and write raw track data, obviously. -->
|
||||
<uses-permission android:name="com.google.android.apps.mytracks.READ_TRACK_DATA" />
|
||||
<uses-permission android:name="com.google.android.apps.mytracks.WRITE_TRACK_DATA" />
|
||||
<uses-permission android:name="com.google.android.apps.mytracks.TRACK_NOTIFICATIONS" />
|
||||
<uses-permission android:name="com.google.android.apps.mytracks.MYTRACKS_NOTIFICATIONS" />
|
||||
|
||||
<!-- Features required -->
|
||||
<uses-feature android:name="android.hardware.location" android:required="true"/>
|
||||
|
||||
Reference in New Issue
Block a user