Backends should require ACCESS_COARSE_LOCATION permission

Added this to example, as well as various fixes
This commit is contained in:
mar-v-in 2014-03-11 19:51:23 +01:00
parent 27fabadaaa
commit 1f06a663cc
2 changed files with 10 additions and 2 deletions

View file

@ -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" />
@ -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" />
@ -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" />

View file

@ -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() {