Update formatting/copyright
This commit is contained in:
parent
7c4b1de391
commit
4d227c488c
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
<!--
|
~ Copyright 2013-2015 µg Project Team
|
||||||
~ Copyright 2014-2015 µg Project Team
|
|
||||||
~
|
~
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
~ you may not use this file except in compliance with the License.
|
~ you may not use this file except in compliance with the License.
|
||||||
|
@ -39,7 +38,6 @@
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:icon="@drawable/ic_nlp_app"
|
android:icon="@drawable/ic_nlp_app"
|
||||||
android:theme="@style/AppTheme"
|
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:label="@string/nlp_app_name">
|
android:label="@string/nlp_app_name">
|
||||||
<uses-library android:name="com.android.location.provider" />
|
<uses-library android:name="com.android.location.provider" />
|
||||||
|
@ -97,7 +95,8 @@
|
||||||
android:value="false" />
|
android:value="false" />
|
||||||
</service>
|
</service>
|
||||||
|
|
||||||
<activity android:name=".ui.SettingsActivity"
|
<activity
|
||||||
|
android:name=".ui.SettingsActivity"
|
||||||
android:icon="@drawable/ic_nlp_settings"
|
android:icon="@drawable/ic_nlp_settings"
|
||||||
android:label="@string/nlp_app_name">
|
android:label="@string/nlp_app_name">
|
||||||
<intent-filter>
|
<intent-filter>
|
||||||
|
|
26
build.gradle
26
build.gradle
|
@ -1,17 +1,17 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
Copyright 2013-2015 µg Project Team
|
||||||
*
|
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
* You may obtain a copy of the License at
|
You may obtain a copy of the License at
|
||||||
*
|
|
||||||
* http://www.apache.org/licenses/LICENSE-2.0
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||||
*
|
|
||||||
* Unless required by applicable law or agreed to in writing, software
|
Unless required by applicable law or agreed to in writing, software
|
||||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
|
|
|
@ -1,4 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<manifest package="org.microg.nlp.compat">
|
|
||||||
<!-- This is not needed, it's just here to stop build systems from complaining -->
|
|
||||||
</manifest>
|
|
|
@ -1,3 +1,19 @@
|
||||||
|
/*
|
||||||
|
Copyright 2013-2015 µg Project Team
|
||||||
|
|
||||||
|
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.
|
||||||
|
*/
|
||||||
|
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
|
|
||||||
Properties properties = new Properties()
|
Properties properties = new Properties()
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
~ Copyright 2014-2015 µg Project Team
|
~ Copyright 2013-2015 µg Project Team
|
||||||
~
|
~
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
~ you may not use this file except in compliance with the License.
|
~ you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
<!--
|
~ Copyright 2013-2015 µg Project Team
|
||||||
~ Copyright 2014-2015 µg Project Team
|
|
||||||
~
|
~
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
~ you may not use this file except in compliance with the License.
|
~ you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<!--
|
<!--
|
||||||
~ Copyright 2014-2015 µg Project Team
|
~ Copyright 2013-2015 µg Project Team
|
||||||
~
|
~
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
~ you may not use this file except in compliance with the License.
|
~ you may not use this file except in compliance with the License.
|
||||||
|
@ -14,8 +14,7 @@
|
||||||
~ limitations under the License.
|
~ limitations under the License.
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<android.support.v7.widget.Toolbar
|
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:id="@+id/toolbar"
|
android:id="@+id/toolbar"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
<!--
|
~ Copyright 2013-2015 µg Project Team
|
||||||
~ Copyright 2014-2015 µg Project Team
|
|
||||||
~
|
~
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
~ you may not use this file except in compliance with the License.
|
~ you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
<!--
|
~ Copyright 2013-2015 µg Project Team
|
||||||
~ Copyright 2014-2015 µg Project Team
|
|
||||||
~
|
~
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
~ you may not use this file except in compliance with the License.
|
~ you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
<!--
|
~ Copyright 2013-2015 µg Project Team
|
||||||
~ Copyright 2014-2015 µg Project Team
|
|
||||||
~
|
~
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
~ you may not use this file except in compliance with the License.
|
~ you may not use this file except in compliance with the License.
|
||||||
|
@ -16,11 +15,10 @@
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<resources>
|
<resources>
|
||||||
<style name="AppTheme"
|
|
||||||
parent="AppTheme.Base" />
|
|
||||||
|
|
||||||
<style name="AppTheme.Base"
|
<style name="NlpTheme" parent="NlpTheme.Base" />
|
||||||
parent="Theme.AppCompat">
|
|
||||||
|
<style name="NlpTheme.Base" parent="Theme.AppCompat">
|
||||||
<item name="colorPrimary">@color/theme_primary</item>
|
<item name="colorPrimary">@color/theme_primary</item>
|
||||||
<item name="colorPrimaryDark">@color/theme_primary_dark</item>
|
<item name="colorPrimaryDark">@color/theme_primary_dark</item>
|
||||||
<item name="android:windowNoTitle">true</item>
|
<item name="android:windowNoTitle">true</item>
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?><!--
|
||||||
<!--
|
~ Copyright 2013-2015 µg Project Team
|
||||||
~ Copyright 2014-2015 µg Project Team
|
|
||||||
~
|
~
|
||||||
~ Licensed under the Apache License, Version 2.0 (the "License");
|
~ Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
~ you may not use this file except in compliance with the License.
|
~ you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -150,7 +150,7 @@ public abstract class PreferenceFragment extends Fragment {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public View onCreateView(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup,
|
public View onCreateView(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup,
|
||||||
Bundle paramBundle) {
|
Bundle paramBundle) {
|
||||||
ListView listView = new ListView(paramLayoutInflater.getContext());
|
ListView listView = new ListView(paramLayoutInflater.getContext());
|
||||||
listView.setId(android.R.id.list);
|
listView.setId(android.R.id.list);
|
||||||
listView.setDrawSelectorOnTop(false);
|
listView.setDrawSelectorOnTop(false);
|
||||||
|
@ -265,7 +265,7 @@ public abstract class PreferenceFragment extends Fragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
public PreferenceScreen inflateFromResource(Context context, int resId,
|
public PreferenceScreen inflateFromResource(Context context, int resId,
|
||||||
PreferenceScreen rootPreferences) {
|
PreferenceScreen rootPreferences) {
|
||||||
PreferenceScreen preferenceScreen;
|
PreferenceScreen preferenceScreen;
|
||||||
try {
|
try {
|
||||||
Method m = PreferenceManager.class
|
Method m = PreferenceManager.class
|
||||||
|
@ -281,7 +281,7 @@ public abstract class PreferenceFragment extends Fragment {
|
||||||
}
|
}
|
||||||
|
|
||||||
public PreferenceScreen inflateFromIntent(Intent queryIntent,
|
public PreferenceScreen inflateFromIntent(Intent queryIntent,
|
||||||
PreferenceScreen rootPreferences) {
|
PreferenceScreen rootPreferences) {
|
||||||
PreferenceScreen preferenceScreen;
|
PreferenceScreen preferenceScreen;
|
||||||
try {
|
try {
|
||||||
Method m = PreferenceManager.class
|
Method m = PreferenceManager.class
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -53,7 +53,7 @@ public abstract class AbstractProviderService<T extends Provider> extends Intent
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Destroy the active {@link Provider}.
|
* Destroy the active {@link Provider}.
|
||||||
*
|
* <p/>
|
||||||
* After this has been called, the {@link Provider} instance, that was active before should no
|
* After this has been called, the {@link Provider} instance, that was active before should no
|
||||||
* longer be returned with {@link #getProvider()}.
|
* longer be returned with {@link #getProvider()}.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -49,7 +49,7 @@ class BackendFuser {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Address> getFromLocation(double latitude, double longitude, int maxResults,
|
public List<Address> getFromLocation(double latitude, double longitude, int maxResults,
|
||||||
String locale) {
|
String locale) {
|
||||||
if (backendHelpers.isEmpty())
|
if (backendHelpers.isEmpty())
|
||||||
return null;
|
return null;
|
||||||
ArrayList<Address> result = new ArrayList<>();
|
ArrayList<Address> result = new ArrayList<>();
|
||||||
|
@ -64,8 +64,9 @@ class BackendFuser {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Address> getFromLocationName(String locationName, int maxResults,
|
public List<Address> getFromLocationName(String locationName, int maxResults,
|
||||||
double lowerLeftLatitude, double lowerLeftLongitude, double upperRightLatitude,
|
double lowerLeftLatitude, double lowerLeftLongitude,
|
||||||
double upperRightLongitude, String locale) {
|
double upperRightLatitude, double upperRightLongitude,
|
||||||
|
String locale) {
|
||||||
if (backendHelpers.isEmpty())
|
if (backendHelpers.isEmpty())
|
||||||
return null;
|
return null;
|
||||||
ArrayList<Address> result = new ArrayList<>();
|
ArrayList<Address> result = new ArrayList<>();
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -38,7 +38,7 @@ class BackendHelper extends AbstractBackendHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Address> getFromLocation(double latitude, double longitude, int maxResults,
|
public List<Address> getFromLocation(double latitude, double longitude, int maxResults,
|
||||||
String locale) {
|
String locale) {
|
||||||
try {
|
try {
|
||||||
return backend.getFromLocation(latitude, longitude, maxResults, locale);
|
return backend.getFromLocation(latitude, longitude, maxResults, locale);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -49,8 +49,9 @@ class BackendHelper extends AbstractBackendHelper {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Address> getFromLocationName(String locationName, int maxResults,
|
public List<Address> getFromLocationName(String locationName, int maxResults,
|
||||||
double lowerLeftLatitude, double lowerLeftLongitude, double upperRightLatitude,
|
double lowerLeftLatitude, double lowerLeftLongitude,
|
||||||
double upperRightLongitude, String locale) {
|
double upperRightLatitude, double upperRightLongitude,
|
||||||
|
String locale) {
|
||||||
try {
|
try {
|
||||||
return backend.getFromLocationName(locationName, maxResults, lowerLeftLatitude,
|
return backend.getFromLocationName(locationName, maxResults, lowerLeftLatitude,
|
||||||
lowerLeftLongitude, upperRightLatitude, upperRightLongitude, locale);
|
lowerLeftLongitude, upperRightLatitude, upperRightLongitude, locale);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -34,7 +34,7 @@ class GeocodeProviderV1 extends GeocodeProvider implements org.microg.nlp.geocod
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onGetFromLocation(double latitude, double longitude, int maxResults,
|
public String onGetFromLocation(double latitude, double longitude, int maxResults,
|
||||||
GeocoderParams params, List<Address> addresses) {
|
GeocoderParams params, List<Address> addresses) {
|
||||||
List<Address> fuserResult = backendFuser
|
List<Address> fuserResult = backendFuser
|
||||||
.getFromLocation(latitude, longitude, maxResults, params.getLocale().toString());
|
.getFromLocation(latitude, longitude, maxResults, params.getLocale().toString());
|
||||||
return handleResult(addresses, fuserResult);
|
return handleResult(addresses, fuserResult);
|
||||||
|
@ -42,8 +42,9 @@ class GeocodeProviderV1 extends GeocodeProvider implements org.microg.nlp.geocod
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String onGetFromLocationName(String locationName, double lowerLeftLatitude,
|
public String onGetFromLocationName(String locationName, double lowerLeftLatitude,
|
||||||
double lowerLeftLongitude, double upperRightLatitude, double upperRightLongitude,
|
double lowerLeftLongitude, double upperRightLatitude,
|
||||||
int maxResults, GeocoderParams params, List<Address> addresses) {
|
double upperRightLongitude, int maxResults,
|
||||||
|
GeocoderParams params, List<Address> addresses) {
|
||||||
List<Address> fuserResult = backendFuser.getFromLocationName(locationName, maxResults,
|
List<Address> fuserResult = backendFuser.getFromLocationName(locationName, maxResults,
|
||||||
lowerLeftLatitude, lowerLeftLongitude, upperRightLatitude, upperRightLongitude,
|
lowerLeftLatitude, lowerLeftLongitude, upperRightLatitude, upperRightLongitude,
|
||||||
params.getLocale().toString());
|
params.getLocale().toString());
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -30,13 +30,16 @@ import android.widget.ArrayAdapter;
|
||||||
import android.widget.CheckBox;
|
import android.widget.CheckBox;
|
||||||
import android.widget.ListView;
|
import android.widget.ListView;
|
||||||
import android.widget.TextView;
|
import android.widget.TextView;
|
||||||
|
|
||||||
import org.microg.nlp.Preferences;
|
import org.microg.nlp.Preferences;
|
||||||
import org.microg.nlp.R;
|
import org.microg.nlp.R;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static org.microg.nlp.api.Constants.*;
|
import static org.microg.nlp.api.Constants.METADATA_BACKEND_ABOUT_ACTIVITY;
|
||||||
|
import static org.microg.nlp.api.Constants.METADATA_BACKEND_SETTINGS_ACTIVITY;
|
||||||
|
import static org.microg.nlp.api.Constants.METADATA_BACKEND_SUMMARY;
|
||||||
|
|
||||||
abstract class AbstractBackendPreference extends DialogPreference {
|
abstract class AbstractBackendPreference extends DialogPreference {
|
||||||
private ListView listView;
|
private ListView listView;
|
||||||
|
@ -173,7 +176,7 @@ abstract class AbstractBackendPreference extends DialogPreference {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void configureExternalButton(final BackendInfo backend, View button,
|
private void configureExternalButton(final BackendInfo backend, View button,
|
||||||
final String metaName) {
|
final String metaName) {
|
||||||
if (backend.getMeta(metaName) != null) {
|
if (backend.getMeta(metaName) != null) {
|
||||||
button.setVisibility(View.VISIBLE);
|
button.setVisibility(View.VISIBLE);
|
||||||
button.setOnClickListener(new View.OnClickListener() {
|
button.setOnClickListener(new View.OnClickListener() {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -19,6 +19,7 @@ package org.microg.nlp.ui;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
|
|
||||||
import org.microg.nlp.Preferences;
|
import org.microg.nlp.Preferences;
|
||||||
import org.microg.nlp.R;
|
import org.microg.nlp.R;
|
||||||
import org.microg.nlp.geocode.AbstractGeocodeService;
|
import org.microg.nlp.geocode.AbstractGeocodeService;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -19,6 +19,7 @@ package org.microg.nlp.ui;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.util.AttributeSet;
|
import android.util.AttributeSet;
|
||||||
|
|
||||||
import org.microg.nlp.Preferences;
|
import org.microg.nlp.Preferences;
|
||||||
import org.microg.nlp.R;
|
import org.microg.nlp.R;
|
||||||
import org.microg.nlp.location.AbstractLocationService;
|
import org.microg.nlp.location.AbstractLocationService;
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2014-2015 µg Project Team
|
* Copyright 2013-2015 µg Project Team
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
@ -20,6 +20,7 @@ import android.os.Bundle;
|
||||||
import android.support.v4.preference.PreferenceFragment;
|
import android.support.v4.preference.PreferenceFragment;
|
||||||
import android.support.v7.app.ActionBarActivity;
|
import android.support.v7.app.ActionBarActivity;
|
||||||
import android.support.v7.widget.Toolbar;
|
import android.support.v7.widget.Toolbar;
|
||||||
|
|
||||||
import org.microg.nlp.R;
|
import org.microg.nlp.R;
|
||||||
|
|
||||||
public class SettingsActivity extends ActionBarActivity {
|
public class SettingsActivity extends ActionBarActivity {
|
||||||
|
|
Loading…
Reference in a new issue