0
0
Fork 0
mirror of https://github.com/YTVanced/VancedMicroG synced 2024-10-31 16:32:39 +00:00

Cleanup for Java 1.6 compatibility, Update copyright

This commit is contained in:
mar-v-in 2015-10-01 21:37:50 +02:00
parent d8a5f3351f
commit 41a6ee844f
55 changed files with 411 additions and 106 deletions

View file

@ -1,25 +1,41 @@
/*
* Copyright 2013-2015 microG 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 { buildscript {
repositories { repositories {
mavenCentral() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:1.0.1' classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.github.dcendents:android-maven-plugin:1.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
} }
} }
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'com.github.dcendents.android-maven'
dependencies {
compile 'com.android.support:support-v4:22.0.0'
compile project(':play-services-api')
}
android { android {
compileSdkVersion 22 compileSdkVersion 23
buildToolsVersion "22.0.1" buildToolsVersion "23.0.1"
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6 sourceCompatibility JavaVersion.VERSION_1_6
} }
} }
dependencies {
compile 'com.android.support:support-v4:23.0.1'
compile project(':play-services-api')
}

View file

@ -1,4 +1,20 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2013-2015 microG 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.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.google.android.gms"> package="com.google.android.gms">

View file

@ -1,3 +1,19 @@
/*
* Copyright 2013-2015 microG 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.
*/
package com.google.android.gms.common; package com.google.android.gms.common;
import android.app.Activity; import android.app.Activity;

View file

@ -1,3 +1,19 @@
/*
* Copyright 2013-2015 microG 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.
*/
package com.google.android.gms.common; package com.google.android.gms.common;
import android.os.Bundle; import android.os.Bundle;

View file

@ -1,3 +1,19 @@
/*
* Copyright 2013-2015 microG 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.
*/
package com.google.android.gms.common; package com.google.android.gms.common;
import android.app.Activity; import android.app.Activity;
@ -20,7 +36,6 @@ import org.microg.gms.common.PublicApi;
* TODO: methods :) * TODO: methods :)
*/ */
public class GooglePlayServicesUtil { public class GooglePlayServicesUtil {
@PublicApi(exclude = true)
private static final String TAG = "GooglePlayServicesUtil"; private static final String TAG = "GooglePlayServicesUtil";
public static final String GMS_ERROR_DIALOG = "GooglePlayServicesErrorDialog"; public static final String GMS_ERROR_DIALOG = "GooglePlayServicesErrorDialog";

View file

@ -1,3 +1,19 @@
/*
* Copyright 2013-2015 microG 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.
*/
package com.google.android.gms.common.api; package com.google.android.gms.common.api;
import org.microg.gms.common.PublicApi; import org.microg.gms.common.PublicApi;

View file

@ -1,3 +1,19 @@
/*
* Copyright 2013-2015 microG 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.
*/
package com.google.android.gms.common.api; package com.google.android.gms.common.api;
import android.app.Activity; import android.app.Activity;
@ -222,10 +238,10 @@ public interface GoogleApiClient {
@PublicApi @PublicApi
public class Builder { public class Builder {
private final Context context; private final Context context;
private final Map<Api, Api.ApiOptions> apis = new HashMap<>(); private final Map<Api, Api.ApiOptions> apis = new HashMap<Api, Api.ApiOptions>();
private final Set<ConnectionCallbacks> connectionCallbacks = new HashSet<>(); private final Set<ConnectionCallbacks> connectionCallbacks = new HashSet<ConnectionCallbacks>();
private final Set<OnConnectionFailedListener> connectionFailedListeners = new HashSet<>(); private final Set<OnConnectionFailedListener> connectionFailedListeners = new HashSet<OnConnectionFailedListener>();
private final Set<String> scopes = new HashSet<>(); private final Set<String> scopes = new HashSet<String>();
private String accountName; private String accountName;
private int clientId = -1; private int clientId = -1;
private FragmentActivity fragmentActivity; private FragmentActivity fragmentActivity;

View file

@ -1,3 +1,19 @@
/*
* Copyright 2013-2015 microG 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.
*/
package com.google.android.gms.common.api; package com.google.android.gms.common.api;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;

View file

@ -1,3 +1,19 @@
/*
* Copyright 2013-2015 microG 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.
*/
package com.google.android.gms.common.api; package com.google.android.gms.common.api;
/** /**

View file

@ -1,3 +1,19 @@
/*
* Copyright 2013-2015 microG 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.
*/
package com.google.android.gms.common.api; package com.google.android.gms.common.api;
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.
@ -47,7 +47,7 @@ public class GmsConnector<C extends ApiConnection, R extends Result, O extends A
Log.d(TAG, "connect()"); Log.d(TAG, "connect()");
apiClient.getApiConnection(api); apiClient.getApiConnection(api);
Looper looper = apiClient.getLooper(); Looper looper = apiClient.getLooper();
final AbstractPendingResult<R> result = new AbstractPendingResult<>(looper); final AbstractPendingResult<R> result = new AbstractPendingResult<R>(looper);
Message msg = new Message(); Message msg = new Message();
msg.obj = result; msg.obj = result;
new Handler(looper).sendMessage(msg); new Handler(looper).sendMessage(msg);

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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 +39,7 @@ public class MultiConnectionKeeper {
private static MultiConnectionKeeper INSTANCE; private static MultiConnectionKeeper INSTANCE;
private final Context context; private final Context context;
private final Map<String, Connection> connections = new HashMap<>(); private final Map<String, Connection> connections = new HashMap<String, Connection>();
public MultiConnectionKeeper(Context context) { public MultiConnectionKeeper(Context context) {
this.context = context; this.context = context;
@ -83,7 +83,7 @@ public class MultiConnectionKeeper {
public class Connection { public class Connection {
private final String actionString; private final String actionString;
private final Set<ServiceConnection> connectionForwards = new HashSet<>(); private final Set<ServiceConnection> connectionForwards = new HashSet<ServiceConnection>();
private boolean bound = false; private boolean bound = false;
private boolean connected = false; private boolean connected = false;
private IBinder binder; private IBinder binder;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.
@ -42,11 +42,11 @@ public class GoogleApiClientImpl implements GoogleApiClient {
private final Context context; private final Context context;
private final Looper looper; private final Looper looper;
private final AccountInfo accountInfo; private final AccountInfo accountInfo;
private final Map<Api, Api.ApiOptions> apis = new HashMap<>(); private final Map<Api, Api.ApiOptions> apis = new HashMap<Api, Api.ApiOptions>();
private final Map<Api, ApiConnection> apiConnections = new HashMap<>(); private final Map<Api, ApiConnection> apiConnections = new HashMap<Api, ApiConnection>();
private final Handler handler; private final Handler handler;
private final Set<ConnectionCallbacks> connectionCallbacks = new HashSet<>(); private final Set<ConnectionCallbacks> connectionCallbacks = new HashSet<ConnectionCallbacks>();
private final Set<OnConnectionFailedListener> connectionFailedListeners = new HashSet<>(); private final Set<OnConnectionFailedListener> connectionFailedListeners = new HashSet<OnConnectionFailedListener>();
private final int clientId; private final int clientId;
private final ConnectionCallbacks baseConnectionCallbacks = new ConnectionCallbacks() { private final ConnectionCallbacks baseConnectionCallbacks = new ConnectionCallbacks() {
@Override @Override

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

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

View file

@ -1,24 +1,40 @@
/*
* Copyright 2013-2015 microG 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 { buildscript {
repositories { repositories {
mavenCentral() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:1.0.1' classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.github.dcendents:android-maven-plugin:1.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
} }
} }
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'com.github.dcendents.android-maven'
dependencies {
compile project(':play-services-base')
}
android { android {
compileSdkVersion 22 compileSdkVersion 23
buildToolsVersion "22.0.1" buildToolsVersion "23.0.1"
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6 sourceCompatibility JavaVersion.VERSION_1_6
} }
} }
dependencies {
compile project(':play-services-base')
}

View file

@ -1,4 +1,20 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2013-2015 microG 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.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.microg.gms.location"> package="org.microg.gms.location">

View file

@ -1,3 +1,19 @@
/*
* Copyright 2013-2015 microG 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.
*/
package com.google.android.gms.location; package com.google.android.gms.location;
import android.app.PendingIntent; import android.app.PendingIntent;
@ -10,26 +26,26 @@ import com.google.android.gms.common.api.PendingResult;
import org.microg.gms.common.Constants; import org.microg.gms.common.Constants;
public interface FusedLocationProviderApi { public interface FusedLocationProviderApi {
public static final String KEY_LOCATION_CHANGED = "com.google.android.location.LOCATION"; String KEY_LOCATION_CHANGED = "com.google.android.location.LOCATION";
public static final String KEY_MOCK_LOCATION = Constants.KEY_MOCK_LOCATION; String KEY_MOCK_LOCATION = Constants.KEY_MOCK_LOCATION;
public Location getLastLocation(GoogleApiClient client); Location getLastLocation(GoogleApiClient client);
public PendingResult requestLocationUpdates(GoogleApiClient client, LocationRequest request, PendingResult requestLocationUpdates(GoogleApiClient client, LocationRequest request,
LocationListener listener); LocationListener listener);
public PendingResult requestLocationUpdates(GoogleApiClient client, LocationRequest request, PendingResult requestLocationUpdates(GoogleApiClient client, LocationRequest request,
LocationListener listener, Looper looper); LocationListener listener, Looper looper);
public PendingResult requestLocationUpdates(GoogleApiClient client, LocationRequest request, PendingResult requestLocationUpdates(GoogleApiClient client, LocationRequest request,
PendingIntent callbackIntent); PendingIntent callbackIntent);
public PendingResult removeLocationUpdates(GoogleApiClient client, LocationListener listener); PendingResult removeLocationUpdates(GoogleApiClient client, LocationListener listener);
public PendingResult removeLocationUpdates(GoogleApiClient client, PendingResult removeLocationUpdates(GoogleApiClient client,
PendingIntent callbackIntent); PendingIntent callbackIntent);
public PendingResult setMockMode(GoogleApiClient client, boolean isMockMode); PendingResult setMockMode(GoogleApiClient client, boolean isMockMode);
public PendingResult setMockLocation(GoogleApiClient client, Location mockLocation); PendingResult setMockLocation(GoogleApiClient client, Location mockLocation);
} }

View file

@ -1,3 +1,19 @@
/*
* Copyright 2013-2015 microG 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.
*/
package com.google.android.gms.location; package com.google.android.gms.location;
public interface GeofencingApi { public interface GeofencingApi {

View file

@ -1,3 +1,19 @@
/*
* Copyright 2013-2015 microG 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.
*/
package com.google.android.gms.location; package com.google.android.gms.location;
import android.app.PendingIntent; import android.app.PendingIntent;

View file

@ -1,3 +1,19 @@
/*
* Copyright 2013-2015 microG 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.
*/
package com.google.android.gms.location; package com.google.android.gms.location;
import android.location.Location; import android.location.Location;

View file

@ -1,3 +1,19 @@
/*
* Copyright 2013-2015 microG 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.
*/
package com.google.android.gms.location; package com.google.android.gms.location;
import com.google.android.gms.common.api.Api; import com.google.android.gms.common.api.Api;
@ -10,9 +26,7 @@ import org.microg.gms.location.LocationServicesApiBuilder;
* The main entry point for location services integration. * The main entry point for location services integration.
*/ */
public class LocationServices { public class LocationServices {
public static final Api<Api.ApiOptions.NoOptions> API = new Api<>(new public static final Api<Api.ApiOptions.NoOptions> API = new Api<Api.ApiOptions.NoOptions>(new LocationServicesApiBuilder());
LocationServicesApiBuilder()); public static final FusedLocationProviderApi FusedLocationApi = new FusedLocationProviderApiImpl();
public static final FusedLocationProviderApi FusedLocationApi = new
FusedLocationProviderApiImpl();
public static final GeofencingApi GeofencingApi = new GeofencingApiImpl(); public static final GeofencingApi GeofencingApi = new GeofencingApiImpl();
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.
@ -22,6 +22,7 @@ import android.os.Looper;
import android.os.RemoteException; import android.os.RemoteException;
import android.util.Log; import android.util.Log;
import com.google.android.gms.common.api.Api;
import com.google.android.gms.common.api.GoogleApiClient; import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.PendingResult; import com.google.android.gms.common.api.PendingResult;
import com.google.android.gms.common.api.Result; import com.google.android.gms.common.api.Result;
@ -124,7 +125,7 @@ public class FusedLocationProviderApiImpl implements FusedLocationProviderApi {
} }
private PendingResult callVoid(GoogleApiClient client, final Runnable runnable) { private PendingResult callVoid(GoogleApiClient client, final Runnable runnable) {
return new GmsConnector<>(client, LocationServices.API, return new GmsConnector<LocationClientImpl, Result, Api.ApiOptions.NoOptions>(client, LocationServices.API,
new GmsConnector.Callback<LocationClientImpl, Result>() { new GmsConnector.Callback<LocationClientImpl, Result>() {
@Override @Override
public Result onClientAvailable(LocationClientImpl client) throws public Result onClientAvailable(LocationClientImpl client) throws

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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 @@ import java.util.Map;
public class LocationClientImpl extends GoogleLocationManagerClient { public class LocationClientImpl extends GoogleLocationManagerClient {
private static final String TAG = "GmsLocationClientImpl"; private static final String TAG = "GmsLocationClientImpl";
private NativeLocationClientImpl nativeLocation = null; private NativeLocationClientImpl nativeLocation = null;
private Map<LocationListener, ILocationListener> listenerMap = new HashMap<>(); private Map<LocationListener, ILocationListener> listenerMap = new HashMap<LocationListener, ILocationListener>();
public LocationClientImpl(Context context, GoogleApiClient.ConnectionCallbacks callbacks, public LocationClientImpl(Context context, GoogleApiClient.ConnectionCallbacks callbacks,

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.
@ -35,15 +35,15 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
public class NativeLocationClientImpl { public class NativeLocationClientImpl {
private final static String TAG = "GmsToNativeLocationClient"; private final static String TAG = "GmsToNativeLocClient";
private final static Criteria DEFAULT_CRITERIA = new Criteria(); private final static Criteria DEFAULT_CRITERIA = new Criteria();
private final static Map<PendingIntent, Integer> pendingCount = new HashMap<>(); private final static Map<PendingIntent, Integer> pendingCount = new HashMap<PendingIntent, Integer>();
private final static Map<PendingIntent, PendingIntent> nativePendingMap = new HashMap<>(); private final static Map<PendingIntent, PendingIntent> nativePendingMap = new HashMap<PendingIntent, PendingIntent>();
private static final String EXTRA_PENDING_INTENT = "pending_intent"; private static final String EXTRA_PENDING_INTENT = "pending_intent";
private final Context context; private final Context context;
private final LocationManager locationManager; private final LocationManager locationManager;
private final Map<LocationListener, NativeListener> nativeListenerMap = new HashMap<>(); private final Map<LocationListener, NativeListener> nativeListenerMap = new HashMap<LocationListener, NativeListener>();
public NativeLocationClientImpl(LocationClientImpl client) { public NativeLocationClientImpl(LocationClientImpl client) {
context = client.getContext(); context = client.getContext();

View file

@ -1,24 +1,40 @@
/*
* Copyright 2013-2015 microG 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 { buildscript {
repositories { repositories {
mavenCentral() jcenter()
} }
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:1.0.1' classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.github.dcendents:android-maven-plugin:1.2' classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
} }
} }
apply plugin: 'com.android.library' apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven' apply plugin: 'com.github.dcendents.android-maven'
dependencies {
compile project(':play-services-base')
}
android { android {
compileSdkVersion 22 compileSdkVersion 23
buildToolsVersion "22.0.1" buildToolsVersion "23.0.1"
compileOptions { compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6 sourceCompatibility JavaVersion.VERSION_1_6
} }
} }
dependencies {
compile project(':play-services-base')
}

View file

@ -1,4 +1,20 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2013-2015 microG 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.
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.microg.gms.wearable"> package="org.microg.gms.wearable">

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.
@ -24,6 +24,7 @@ import com.google.android.gms.common.api.PendingResult;
import com.google.android.gms.common.api.Result; import com.google.android.gms.common.api.Result;
import com.google.android.gms.common.api.Status; import com.google.android.gms.common.api.Status;
import com.google.android.gms.common.data.Freezable; import com.google.android.gms.common.data.Freezable;
import com.google.android.gms.wearable.internal.PutDataRequest;
import org.microg.gms.common.PublicApi; import org.microg.gms.common.PublicApi;

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2015 µg Project Team * Copyright 2013-2015 microG 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,8 +34,8 @@ import java.util.Set;
public class DataMap { public class DataMap {
public static String TAG = "GmsDataMap"; public static String TAG = "GmsDataMap";
private Map<String, Object> data = new HashMap<>(); private Map<String, Object> data = new HashMap<String, Object>();
private Map<String, StoredType> types = new HashMap<>(); private Map<String, StoredType> types = new HashMap<String, StoredType>();
public DataMap() { public DataMap() {
@ -45,7 +45,7 @@ public class DataMap {
* @return an ArrayList of DataMaps from an ArrayList of Bundles. Any elements in the Bundles not supported by DataMap will be dropped. * @return an ArrayList of DataMaps from an ArrayList of Bundles. Any elements in the Bundles not supported by DataMap will be dropped.
*/ */
public static ArrayList<DataMap> arrayListFromBundleArrayList(ArrayList<Bundle> bundleArrayList) { public static ArrayList<DataMap> arrayListFromBundleArrayList(ArrayList<Bundle> bundleArrayList) {
ArrayList<DataMap> res = new ArrayList<>(); ArrayList<DataMap> res = new ArrayList<DataMap>();
for (Bundle bundle : bundleArrayList) { for (Bundle bundle : bundleArrayList) {
res.add(fromBundle(bundle)); res.add(fromBundle(bundle));
} }

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2015 µg Project Team * Copyright 2013-2015 microG 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.
@ -18,6 +18,8 @@ package com.google.android.gms.wearable;
import android.net.Uri; import android.net.Uri;
import com.google.android.gms.wearable.internal.PutDataRequest;
import org.microg.gms.common.PublicApi; import org.microg.gms.common.PublicApi;
/** /**
@ -38,7 +40,7 @@ public class PutDataMapRequest {
*/ */
public PutDataRequest asPutDataRequest() { public PutDataRequest asPutDataRequest() {
// TODO // TODO
return PutDataRequest.create(null); return PutDataRequest.create((Uri) null);
} }
/** /**

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.
@ -31,7 +31,7 @@ public class Wearable {
/** /**
* Token to pass to {@link GoogleApiClient.Builder#addApi(Api)} to enable the Wearable features. * Token to pass to {@link GoogleApiClient.Builder#addApi(Api)} to enable the Wearable features.
*/ */
public static final Api<WearableOptions> API = new Api<>(new WearableApiBuilder()); public static final Api<WearableOptions> API = new Api<WearableOptions>(new WearableApiBuilder());
public static final DataApi DataApi = new DataApiImpl(); public static final DataApi DataApi = new DataApiImpl();
public static final MessageApi MessageApi = new MessageApiImpl(); public static final MessageApi MessageApi = new MessageApiImpl();

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2013-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.
@ -25,7 +25,7 @@ import com.google.android.gms.wearable.Asset;
import com.google.android.gms.wearable.DataApi; import com.google.android.gms.wearable.DataApi;
import com.google.android.gms.wearable.DataItemAsset; import com.google.android.gms.wearable.DataItemAsset;
import com.google.android.gms.wearable.DataItemBuffer; import com.google.android.gms.wearable.DataItemBuffer;
import com.google.android.gms.wearable.PutDataRequest; import com.google.android.gms.wearable.internal.PutDataRequest;
public class DataApiImpl implements DataApi { public class DataApiImpl implements DataApi {
@Override @Override

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.

View file

@ -1,5 +1,5 @@
/* /*
* Copyright 2014-2015 µg Project Team * Copyright 2013-2015 microG 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.