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 {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.1'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
dependencies {
compile 'com.android.support:support-v4:22.0.0'
compile project(':play-services-api')
}
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
compileSdkVersion 23
buildToolsVersion "23.0.1"
compileOptions {
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"?>
<!--
~ 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"
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;
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;
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;
import android.app.Activity;
@ -20,7 +36,6 @@ import org.microg.gms.common.PublicApi;
* TODO: methods :)
*/
public class GooglePlayServicesUtil {
@PublicApi(exclude = true)
private static final String TAG = "GooglePlayServicesUtil";
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;
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;
import android.app.Activity;
@ -222,10 +238,10 @@ public interface GoogleApiClient {
@PublicApi
public class Builder {
private final Context context;
private final Map<Api, Api.ApiOptions> apis = new HashMap<>();
private final Set<ConnectionCallbacks> connectionCallbacks = new HashSet<>();
private final Set<OnConnectionFailedListener> connectionFailedListeners = new HashSet<>();
private final Set<String> scopes = new HashSet<>();
private final Map<Api, Api.ApiOptions> apis = new HashMap<Api, Api.ApiOptions>();
private final Set<ConnectionCallbacks> connectionCallbacks = new HashSet<ConnectionCallbacks>();
private final Set<OnConnectionFailedListener> connectionFailedListeners = new HashSet<OnConnectionFailedListener>();
private final Set<String> scopes = new HashSet<String>();
private String accountName;
private int clientId = -1;
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;
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;
/**

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;
/**

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");
* 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");
* 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");
* 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");
* 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");
* 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");
* 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()");
apiClient.getApiConnection(api);
Looper looper = apiClient.getLooper();
final AbstractPendingResult<R> result = new AbstractPendingResult<>(looper);
final AbstractPendingResult<R> result = new AbstractPendingResult<R>(looper);
Message msg = new Message();
msg.obj = result;
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");
* you may not use this file except in compliance with the License.
@ -39,7 +39,7 @@ public class MultiConnectionKeeper {
private static MultiConnectionKeeper INSTANCE;
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) {
this.context = context;
@ -83,7 +83,7 @@ public class MultiConnectionKeeper {
public class Connection {
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 connected = false;
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");
* 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");
* 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");
* 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");
* 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");
* 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 Looper looper;
private final AccountInfo accountInfo;
private final Map<Api, Api.ApiOptions> apis = new HashMap<>();
private final Map<Api, ApiConnection> apiConnections = new HashMap<>();
private final Map<Api, Api.ApiOptions> apis = new HashMap<Api, Api.ApiOptions>();
private final Map<Api, ApiConnection> apiConnections = new HashMap<Api, ApiConnection>();
private final Handler handler;
private final Set<ConnectionCallbacks> connectionCallbacks = new HashSet<>();
private final Set<OnConnectionFailedListener> connectionFailedListeners = new HashSet<>();
private final Set<ConnectionCallbacks> connectionCallbacks = new HashSet<ConnectionCallbacks>();
private final Set<OnConnectionFailedListener> connectionFailedListeners = new HashSet<OnConnectionFailedListener>();
private final int clientId;
private final ConnectionCallbacks baseConnectionCallbacks = new ConnectionCallbacks() {
@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");
* 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"?>
<!--
~ Copyright 2014-2015 µg Project Team
~ 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.

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 {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.1'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
dependencies {
compile project(':play-services-base')
}
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
compileSdkVersion 23
buildToolsVersion "23.0.1"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
}
}
dependencies {
compile project(':play-services-base')
}

View File

@ -1,4 +1,20 @@
<?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"
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;
import android.app.PendingIntent;
@ -10,26 +26,26 @@ import com.google.android.gms.common.api.PendingResult;
import org.microg.gms.common.Constants;
public interface FusedLocationProviderApi {
public static final String KEY_LOCATION_CHANGED = "com.google.android.location.LOCATION";
public static final String KEY_MOCK_LOCATION = Constants.KEY_MOCK_LOCATION;
String KEY_LOCATION_CHANGED = "com.google.android.location.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,
LocationListener listener);
PendingResult requestLocationUpdates(GoogleApiClient client, LocationRequest request,
LocationListener listener);
public PendingResult requestLocationUpdates(GoogleApiClient client, LocationRequest request,
LocationListener listener, Looper looper);
PendingResult requestLocationUpdates(GoogleApiClient client, LocationRequest request,
LocationListener listener, Looper looper);
public PendingResult requestLocationUpdates(GoogleApiClient client, LocationRequest request,
PendingIntent callbackIntent);
PendingResult requestLocationUpdates(GoogleApiClient client, LocationRequest request,
PendingIntent callbackIntent);
public PendingResult removeLocationUpdates(GoogleApiClient client, LocationListener listener);
PendingResult removeLocationUpdates(GoogleApiClient client, LocationListener listener);
public PendingResult removeLocationUpdates(GoogleApiClient client,
PendingIntent callbackIntent);
PendingResult removeLocationUpdates(GoogleApiClient client,
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;
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;
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;
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;
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.
*/
public class LocationServices {
public static final Api<Api.ApiOptions.NoOptions> API = new Api<>(new
LocationServicesApiBuilder());
public static final FusedLocationProviderApi FusedLocationApi = new
FusedLocationProviderApiImpl();
public static final Api<Api.ApiOptions.NoOptions> API = new Api<Api.ApiOptions.NoOptions>(new LocationServicesApiBuilder());
public static final FusedLocationProviderApi FusedLocationApi = new FusedLocationProviderApiImpl();
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");
* 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.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.PendingResult;
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) {
return new GmsConnector<>(client, LocationServices.API,
return new GmsConnector<LocationClientImpl, Result, Api.ApiOptions.NoOptions>(client, LocationServices.API,
new GmsConnector.Callback<LocationClientImpl, Result>() {
@Override
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");
* 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");
* 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");
* 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 {
private static final String TAG = "GmsLocationClientImpl";
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,

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");
* 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");
* you may not use this file except in compliance with the License.
@ -35,15 +35,15 @@ import java.util.HashMap;
import java.util.Map;
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 Map<PendingIntent, Integer> pendingCount = new HashMap<>();
private final static Map<PendingIntent, PendingIntent> nativePendingMap = new HashMap<>();
private final static Map<PendingIntent, Integer> pendingCount = new HashMap<PendingIntent, Integer>();
private final static Map<PendingIntent, PendingIntent> nativePendingMap = new HashMap<PendingIntent, PendingIntent>();
private static final String EXTRA_PENDING_INTENT = "pending_intent";
private final Context context;
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) {
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 {
repositories {
mavenCentral()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.1'
classpath 'com.github.dcendents:android-maven-plugin:1.2'
classpath 'com.android.tools.build:gradle:1.3.0'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.3'
}
}
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
dependencies {
compile project(':play-services-base')
}
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
compileSdkVersion 23
buildToolsVersion "23.0.1"
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_6
}
}
dependencies {
compile project(':play-services-base')
}

View File

@ -1,4 +1,20 @@
<?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"
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");
* 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.Status;
import com.google.android.gms.common.data.Freezable;
import com.google.android.gms.wearable.internal.PutDataRequest;
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");
* 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");
* 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");
* 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");
* you may not use this file except in compliance with the License.
@ -34,8 +34,8 @@ import java.util.Set;
public class DataMap {
public static String TAG = "GmsDataMap";
private Map<String, Object> data = new HashMap<>();
private Map<String, StoredType> types = new HashMap<>();
private Map<String, Object> data = new HashMap<String, Object>();
private Map<String, StoredType> types = new HashMap<String, StoredType>();
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.
*/
public static ArrayList<DataMap> arrayListFromBundleArrayList(ArrayList<Bundle> bundleArrayList) {
ArrayList<DataMap> res = new ArrayList<>();
ArrayList<DataMap> res = new ArrayList<DataMap>();
for (Bundle bundle : bundleArrayList) {
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");
* 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");
* 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");
* 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");
* 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");
* 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 com.google.android.gms.wearable.internal.PutDataRequest;
import org.microg.gms.common.PublicApi;
/**
@ -38,7 +40,7 @@ public class PutDataMapRequest {
*/
public PutDataRequest asPutDataRequest() {
// 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");
* 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.
*/
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 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");
* 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");
* 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.DataItemAsset;
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 {
@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");
* 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");
* 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");
* you may not use this file except in compliance with the License.