Skip to content

Commit

Permalink
Backends should require ACCESS_COARSE_LOCATION permission
Browse files Browse the repository at this point in the history
Added this to example, as well as various fixes
  • Loading branch information
mar-v-in committed Mar 11, 2014
1 parent 27fabad commit 1f06a66
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion sample/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
package="org.microg.nlp.api.sample"
android:versionCode="1"
android:versionName="0.0.1"
xmlns:android="http://schemas.android.com/apk/res/android">

<uses-sdk android:minSdkVersion="19" />
<uses-sdk
android:targetSdkVersion="19"
android:minSdkVersion="10" />
<application
android:allowBackup="false"
android:icon="@drawable/icon"
android:label="@string/app_name">

<service
android:name=".SampleBackendService"
android:exported="true"
android:permission="android.permission.ACCESS_COARSE_LOCATION"
android:label="NLPV2-Sample">
<intent-filter>
<action android:name="org.microg.nlp.LOCATION_BACKEND" />
Expand All @@ -20,6 +26,7 @@
<service
android:name=".SecondSampleService"
android:exported="true"
android:permission="android.permission.ACCESS_COARSE_LOCATION"
android:label="NLPV2-Second">
<intent-filter>
<action android:name="org.microg.nlp.LOCATION_BACKEND" />
Expand All @@ -37,6 +44,7 @@
<service
android:name=".ThirdSampleService"
android:exported="true"
android:permission="android.permission.ACCESS_COARSE_LOCATION"
android:label="NLPV2-Random">
<intent-filter>
<action android:name="org.microg.nlp.LOCATION_BACKEND" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ public class ThirdSampleService extends LocationBackendService {
private static final String TAG = ThirdSampleService.class.getName();

private Thread regular;
private Random random = new Random();
private final Random random = new Random();

@Override
protected void onOpen() {
Expand Down

0 comments on commit 1f06a66

Please sign in to comment.