Преглед на файлове

Add permissions for accessing places content provider

master
Chris Smith преди 14 години
родител
ревизия
7c82be24ae

+ 11
- 1
code/ContextAnalyser/AndroidManifest.xml Целия файл

@@ -12,13 +12,23 @@
12 12
         <service android:name=".ContextAnalyserService" android:label="Context Analyser Service"/>
13 13
 
14 14
         <provider android:name="uk.co.md87.android.contextanalyser.PlacesContentProvider"
15
-            android:authorities="uk.co.md87.android.contextanalyser.placescontentprovider" />
15
+            android:authorities="uk.co.md87.android.contextanalyser.placescontentprovider"
16
+            android:readPermission="uk.co.md87.android.contextanalyser.READ_PLACES"
17
+            android:writePermission="uk.co.md87.android.contextanalyser.WRITE_PLACES"/>
16 18
     </application>
17 19
 
18 20
     <permission android:name="uk.co.md87.android.contextanalyser.RECEIVE_UPDATES"
19 21
         android:label="@string/permlab_receiveUpdates"
20 22
         android:description="@string/permdesc_receiveUpdates"
21 23
         android:protectionLevel="dangerous" />
24
+    <permission android:name="uk.co.md87.android.contextanalyser.READ_PLACES"
25
+        android:label="@string/permlab_readPlaces"
26
+        android:description="@string/permdesc_readPlaces"
27
+        android:protectionLevel="dangerous" />
28
+    <permission android:name="uk.co.md87.android.contextanalyser.WRITE_PLACES"
29
+        android:label="@string/permlab_writePlaces"
30
+        android:description="@string/permdesc_writePlaces"
31
+        android:protectionLevel="dangerous" />
22 32
 
23 33
     <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
24 34
     <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>

Двоични данни
code/ContextAnalyser/dist/ContextAnalyser.apk Целия файл


+ 11
- 2
code/ContextAnalyser/res/values/strings.xml Целия файл

@@ -3,8 +3,17 @@
3 3
     <string name="app_name">ContextAnalyser</string>
4 4
 
5 5
     <string name="permlab_receiveUpdates">receive context updates</string>
6
-    <string name="permdesc_receiveUpdates">Allows the application to query and
6
+    <string name="permdesc_receiveUpdates">Allows the application to
7 7
         receive updates about your current context, which includes your
8
-        location and activity.</string>
8
+        (symbolic) location and activity.</string>
9
+
10
+    <string name="permlab_readPlaces">retrieve your places</string>
11
+    <string name="permdesc_readPlaces">Allows the application to
12
+        retrieve a list of places you have been, and to convert symbolic
13
+        locations into physical co-ordinates</string>
14
+
15
+    <string name="permlab_writePlaces">modify your places</string>
16
+    <string name="permdesc_writePlaces">Allows the application to
17
+        modify the list of places that the context analyser knows about.</string>
9 18
 
10 19
 </resources>

+ 2
- 0
code/ContextAnalyser/src/uk/co/md87/android/contextanalyser/Manifest.java Целия файл

@@ -9,6 +9,8 @@ package uk.co.md87.android.contextanalyser;
9 9
 
10 10
 public final class Manifest {
11 11
     public static final class permission {
12
+        public static final String READ_PLACES="uk.co.md87.android.contextanalyser.READ_PLACES";
12 13
         public static final String RECEIVE_UPDATES="uk.co.md87.android.contextanalyser.RECEIVE_UPDATES";
14
+        public static final String WRITE_PLACES="uk.co.md87.android.contextanalyser.WRITE_PLACES";
13 15
     }
14 16
 }

+ 4
- 0
code/ContextAnalyser/src/uk/co/md87/android/contextanalyser/R.java Целия файл

@@ -21,7 +21,11 @@ public final class R {
21 21
     }
22 22
     public static final class string {
23 23
         public static final int app_name=0x7f050000;
24
+        public static final int permdesc_readPlaces=0x7f050004;
24 25
         public static final int permdesc_receiveUpdates=0x7f050002;
26
+        public static final int permdesc_writePlaces=0x7f050006;
27
+        public static final int permlab_readPlaces=0x7f050003;
25 28
         public static final int permlab_receiveUpdates=0x7f050001;
29
+        public static final int permlab_writePlaces=0x7f050005;
26 30
     }
27 31
 }

Loading…
Отказ
Запис