Update formatting/copyright

This commit is contained in:
mar-v-in 2015-01-31 21:58:20 +01:00
parent 7c4b1de391
commit 4d227c488c
36 changed files with 98 additions and 85 deletions

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2014-2015 µg Project Team
<?xml version="1.0" encoding="utf-8"?><!--
~ 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.
@ -39,7 +38,6 @@
<application
android:icon="@drawable/ic_nlp_app"
android:theme="@style/AppTheme"
android:allowBackup="true"
android:label="@string/nlp_app_name">
<uses-library android:name="com.android.location.provider" />
@ -97,7 +95,8 @@
android:value="false" />
</service>
<activity android:name=".ui.SettingsActivity"
<activity
android:name=".ui.SettingsActivity"
android:icon="@drawable/ic_nlp_settings"
android:label="@string/nlp_app_name">
<intent-filter>

View File

@ -1,17 +1,17 @@
/*
* Copyright 2014-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.
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.
*/
buildscript {

View File

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

View File

@ -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'
Properties properties = new Properties()

View File

@ -1,7 +1,7 @@
<?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");
~ you may not use this file except in compliance with the License.

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2014-2015 µg Project Team
<?xml version="1.0" encoding="utf-8"?><!--
~ 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.

View File

@ -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");
~ you may not use this file except in compliance with the License.
@ -14,8 +14,7 @@
~ limitations under the License.
-->
<android.support.v7.widget.Toolbar
xmlns:android="http://schemas.android.com/apk/res/android"
<android.support.v7.widget.Toolbar xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2014-2015 µg Project Team
<?xml version="1.0" encoding="utf-8"?><!--
~ 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.

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2014-2015 µg Project Team
<?xml version="1.0" encoding="utf-8"?><!--
~ 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.

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2014-2015 µg Project Team
<?xml version="1.0" encoding="utf-8"?><!--
~ 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.
@ -16,11 +15,10 @@
-->
<resources>
<style name="AppTheme"
parent="AppTheme.Base" />
<style name="AppTheme.Base"
parent="Theme.AppCompat">
<style name="NlpTheme" parent="NlpTheme.Base" />
<style name="NlpTheme.Base" parent="Theme.AppCompat">
<item name="colorPrimary">@color/theme_primary</item>
<item name="colorPrimaryDark">@color/theme_primary_dark</item>
<item name="android:windowNoTitle">true</item>

View File

@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2014-2015 µg Project Team
<?xml version="1.0" encoding="utf-8"?><!--
~ 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.

View File

@ -150,7 +150,7 @@ public abstract class PreferenceFragment extends Fragment {
@Override
public View onCreateView(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup,
Bundle paramBundle) {
Bundle paramBundle) {
ListView listView = new ListView(paramLayoutInflater.getContext());
listView.setId(android.R.id.list);
listView.setDrawSelectorOnTop(false);
@ -265,7 +265,7 @@ public abstract class PreferenceFragment extends Fragment {
}
public PreferenceScreen inflateFromResource(Context context, int resId,
PreferenceScreen rootPreferences) {
PreferenceScreen rootPreferences) {
PreferenceScreen preferenceScreen;
try {
Method m = PreferenceManager.class
@ -281,7 +281,7 @@ public abstract class PreferenceFragment extends Fragment {
}
public PreferenceScreen inflateFromIntent(Intent queryIntent,
PreferenceScreen rootPreferences) {
PreferenceScreen rootPreferences) {
PreferenceScreen preferenceScreen;
try {
Method m = PreferenceManager.class

View File

@ -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");
* you may not use this file except in compliance with the License.

View File

@ -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");
* 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}.
*
* <p/>
* After this has been called, the {@link Provider} instance, that was active before should no
* longer be returned with {@link #getProvider()}.
*/

View File

@ -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");
* you may not use this file except in compliance with the License.

View File

@ -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");
* you may not use this file except in compliance with the License.

View File

@ -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");
* you may not use this file except in compliance with the License.
@ -22,6 +22,6 @@ public interface Provider {
IBinder getBinder();
void reload();
void destroy();
}

View File

@ -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");
* you may not use this file except in compliance with the License.

View File

@ -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");
* 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,
String locale) {
String locale) {
if (backendHelpers.isEmpty())
return null;
ArrayList<Address> result = new ArrayList<>();
@ -64,8 +64,9 @@ class BackendFuser {
}
public List<Address> getFromLocationName(String locationName, int maxResults,
double lowerLeftLatitude, double lowerLeftLongitude, double upperRightLatitude,
double upperRightLongitude, String locale) {
double lowerLeftLatitude, double lowerLeftLongitude,
double upperRightLatitude, double upperRightLongitude,
String locale) {
if (backendHelpers.isEmpty())
return null;
ArrayList<Address> result = new ArrayList<>();

View File

@ -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");
* 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,
String locale) {
String locale) {
try {
return backend.getFromLocation(latitude, longitude, maxResults, locale);
} catch (Exception e) {
@ -49,8 +49,9 @@ class BackendHelper extends AbstractBackendHelper {
}
public List<Address> getFromLocationName(String locationName, int maxResults,
double lowerLeftLatitude, double lowerLeftLongitude, double upperRightLatitude,
double upperRightLongitude, String locale) {
double lowerLeftLatitude, double lowerLeftLongitude,
double upperRightLatitude, double upperRightLongitude,
String locale) {
try {
return backend.getFromLocationName(locationName, maxResults, lowerLeftLatitude,
lowerLeftLongitude, upperRightLatitude, upperRightLongitude, locale);

View File

@ -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");
* you may not use this file except in compliance with the License.

View File

@ -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");
* 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
public String onGetFromLocation(double latitude, double longitude, int maxResults,
GeocoderParams params, List<Address> addresses) {
GeocoderParams params, List<Address> addresses) {
List<Address> fuserResult = backendFuser
.getFromLocation(latitude, longitude, maxResults, params.getLocale().toString());
return handleResult(addresses, fuserResult);
@ -42,8 +42,9 @@ class GeocodeProviderV1 extends GeocodeProvider implements org.microg.nlp.geocod
@Override
public String onGetFromLocationName(String locationName, double lowerLeftLatitude,
double lowerLeftLongitude, double upperRightLatitude, double upperRightLongitude,
int maxResults, GeocoderParams params, List<Address> addresses) {
double lowerLeftLongitude, double upperRightLatitude,
double upperRightLongitude, int maxResults,
GeocoderParams params, List<Address> addresses) {
List<Address> fuserResult = backendFuser.getFromLocationName(locationName, maxResults,
lowerLeftLatitude, lowerLeftLongitude, upperRightLatitude, upperRightLongitude,
params.getLocale().toString());

View File

@ -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");
* you may not use this file except in compliance with the License.

View File

@ -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");
* you may not use this file except in compliance with the License.

View File

@ -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");
* you may not use this file except in compliance with the License.

View File

@ -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");
* you may not use this file except in compliance with the License.

View File

@ -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");
* you may not use this file except in compliance with the License.

View File

@ -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");
* you may not use this file except in compliance with the License.

View File

@ -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");
* you may not use this file except in compliance with the License.

View File

@ -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");
* you may not use this file except in compliance with the License.

View File

@ -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");
* you may not use this file except in compliance with the License.

View File

@ -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");
* you may not use this file except in compliance with the License.

View File

@ -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");
* 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.ListView;
import android.widget.TextView;
import org.microg.nlp.Preferences;
import org.microg.nlp.R;
import java.util.ArrayList;
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 {
private ListView listView;
@ -173,7 +176,7 @@ abstract class AbstractBackendPreference extends DialogPreference {
}
private void configureExternalButton(final BackendInfo backend, View button,
final String metaName) {
final String metaName) {
if (backend.getMeta(metaName) != null) {
button.setVisibility(View.VISIBLE);
button.setOnClickListener(new View.OnClickListener() {

View File

@ -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");
* 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.Intent;
import android.util.AttributeSet;
import org.microg.nlp.Preferences;
import org.microg.nlp.R;
import org.microg.nlp.geocode.AbstractGeocodeService;

View File

@ -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");
* 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.Intent;
import android.util.AttributeSet;
import org.microg.nlp.Preferences;
import org.microg.nlp.R;
import org.microg.nlp.location.AbstractLocationService;

View File

@ -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");
* 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.v7.app.ActionBarActivity;
import android.support.v7.widget.Toolbar;
import org.microg.nlp.R;
public class SettingsActivity extends ActionBarActivity {