From 26e01fcff7fcd0152d63dfe4f559342124ed8742 Mon Sep 17 00:00:00 2001 From: X1nto Date: Mon, 27 Jul 2020 14:25:03 +0400 Subject: [PATCH] cleanup --- firebase-dynamic-links-api/build.gradle | 49 ---------------- firebase-dynamic-links-api/gradle.properties | 34 ----------- .../src/main/AndroidManifest.xml | 18 ------ .../internal/DynamicLinkData.aidl | 3 - .../internal/IDynamicLinksCallbacks.aidl | 12 ---- .../internal/IDynamicLinksService.aidl | 12 ---- .../internal/ShortDynamicLink.aidl | 3 - .../dynamiclinks/internal/Warning.aidl | 3 - .../internal/DynamicLinkData.java | 57 ------------------- .../internal/ShortDynamicLink.java | 50 ---------------- .../dynamiclinks/internal/Warning.java | 38 ------------- play-services-api/build.gradle | 1 - play-services-appinvite-api/build.gradle | 49 ---------------- play-services-appinvite-api/gradle.properties | 34 ----------- .../src/main/AndroidManifest.xml | 18 ------ .../internal/IAppInviteCallbacks.aidl | 11 ---- .../appinvite/internal/IAppInviteService.aidl | 14 ----- .../gms/location/ActivityRecognition.java | 40 ------------- .../location/FusedLocationProviderClient.java | 42 -------------- .../ActivityRecognitionApiClientBuilder.java | 35 ------------ .../ActivityRecognitionClientImpl.java | 38 ------------- .../google/android/gms/wearable/Wearable.java | 55 ------------------ settings.gradle | 1 + 23 files changed, 1 insertion(+), 616 deletions(-) delete mode 100644 firebase-dynamic-links-api/build.gradle delete mode 100644 firebase-dynamic-links-api/gradle.properties delete mode 100644 firebase-dynamic-links-api/src/main/AndroidManifest.xml delete mode 100644 firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/DynamicLinkData.aidl delete mode 100644 firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/IDynamicLinksCallbacks.aidl delete mode 100644 firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/IDynamicLinksService.aidl delete mode 100644 firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/ShortDynamicLink.aidl delete mode 100644 firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/Warning.aidl delete mode 100644 firebase-dynamic-links-api/src/main/java/com/google/firebase/dynamiclinks/internal/DynamicLinkData.java delete mode 100644 firebase-dynamic-links-api/src/main/java/com/google/firebase/dynamiclinks/internal/ShortDynamicLink.java delete mode 100644 firebase-dynamic-links-api/src/main/java/com/google/firebase/dynamiclinks/internal/Warning.java delete mode 100644 play-services-appinvite-api/build.gradle delete mode 100644 play-services-appinvite-api/gradle.properties delete mode 100644 play-services-appinvite-api/src/main/AndroidManifest.xml delete mode 100644 play-services-appinvite-api/src/main/aidl/com/google/android/gms/appinvite/internal/IAppInviteCallbacks.aidl delete mode 100644 play-services-appinvite-api/src/main/aidl/com/google/android/gms/appinvite/internal/IAppInviteService.aidl delete mode 100644 play-services-location/src/main/java/com/google/android/gms/location/ActivityRecognition.java delete mode 100644 play-services-location/src/main/java/com/google/android/gms/location/FusedLocationProviderClient.java delete mode 100644 play-services-location/src/main/java/org/microg/gms/location/ActivityRecognitionApiClientBuilder.java delete mode 100644 play-services-location/src/main/java/org/microg/gms/location/ActivityRecognitionClientImpl.java delete mode 100644 play-services-wearable/src/main/java/com/google/android/gms/wearable/Wearable.java diff --git a/firebase-dynamic-links-api/build.gradle b/firebase-dynamic-links-api/build.gradle deleted file mode 100644 index 32edbc9b..00000000 --- a/firebase-dynamic-links-api/build.gradle +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2019 e Foundation - * - * 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: 'com.android.library' - -String getMyVersionName() { - def stdout = new ByteArrayOutputStream() - if (rootProject.file("gradlew").exists()) - exec { commandLine 'git', 'describe', '--tags', '--always', '--dirty'; standardOutput = stdout } - else // automatic build system, don't tag dirty - exec { commandLine 'git', 'describe', '--tags', '--always'; standardOutput = stdout } - return stdout.toString().trim().substring(1) -} - -group = 'org.microg' -version = getMyVersionName() - -android { - compileSdkVersion androidCompileSdk() - buildToolsVersion "$androidBuildVersionTools" - - defaultConfig { - versionName getMyVersionName() - minSdkVersion androidMinSdk() - targetSdkVersion androidTargetSdk() - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } -} - -dependencies { - api project(':play-services-basement') -} diff --git a/firebase-dynamic-links-api/gradle.properties b/firebase-dynamic-links-api/gradle.properties deleted file mode 100644 index c601b6d6..00000000 --- a/firebase-dynamic-links-api/gradle.properties +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright 2019 e Foundation -# -# 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. -# - -POM_NAME=Firebase Dynamic Links API -POM_DESCRIPTION=Interfaces and objects for IPC between Firebase Library and microG - -POM_PACKAGING=aar - -POM_URL=https://github.com/microg/android_external_GmsApi - -POM_SCM_URL=https://github.com/microg/android_external_GmsApi -POM_SCM_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git -POM_SCM_DEV_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git - -POM_LICENCE_NAME=The Apache Software License, Version 2.0 -POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt -POM_LICENCE_DIST=repo - -POM_DEVELOPER_ID=alexandruchircu -POM_DEVELOPER_NAME=Alexandru Chircu - diff --git a/firebase-dynamic-links-api/src/main/AndroidManifest.xml b/firebase-dynamic-links-api/src/main/AndroidManifest.xml deleted file mode 100644 index ae17555c..00000000 --- a/firebase-dynamic-links-api/src/main/AndroidManifest.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - diff --git a/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/DynamicLinkData.aidl b/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/DynamicLinkData.aidl deleted file mode 100644 index 5862178a..00000000 --- a/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/DynamicLinkData.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.firebase.dynamiclinks.internal; - -parcelable DynamicLinkData; \ No newline at end of file diff --git a/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/IDynamicLinksCallbacks.aidl b/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/IDynamicLinksCallbacks.aidl deleted file mode 100644 index 9f9915ff..00000000 --- a/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/IDynamicLinksCallbacks.aidl +++ /dev/null @@ -1,12 +0,0 @@ -package com.google.firebase.dynamiclinks.internal; - - -import com.google.firebase.dynamiclinks.internal.DynamicLinkData; -import com.google.firebase.dynamiclinks.internal.ShortDynamicLink; - -import com.google.android.gms.common.api.Status; - -interface IDynamicLinksCallbacks { - void onStatusDynamicLinkData(in Status status, in DynamicLinkData dldata) = 0; - void onStatusShortDynamicLink(in Status status, in ShortDynamicLink sdlink) = 1; -} diff --git a/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/IDynamicLinksService.aidl b/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/IDynamicLinksService.aidl deleted file mode 100644 index 57f083f5..00000000 --- a/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/IDynamicLinksService.aidl +++ /dev/null @@ -1,12 +0,0 @@ -package com.google.firebase.dynamiclinks.internal; - - -import com.google.firebase.dynamiclinks.internal.IDynamicLinksCallbacks; - -import android.os.Bundle; - - -interface IDynamicLinksService { - void getInitialLink(IDynamicLinksCallbacks callback, String var2) = 0; - void func2(IDynamicLinksCallbacks callback, in Bundle var2) = 1; -} diff --git a/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/ShortDynamicLink.aidl b/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/ShortDynamicLink.aidl deleted file mode 100644 index f4852a03..00000000 --- a/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/ShortDynamicLink.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.firebase.dynamiclinks.internal; - -parcelable ShortDynamicLink; \ No newline at end of file diff --git a/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/Warning.aidl b/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/Warning.aidl deleted file mode 100644 index 4331c92a..00000000 --- a/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/Warning.aidl +++ /dev/null @@ -1,3 +0,0 @@ -package com.google.firebase.dynamiclinks.internal; - -parcelable Warning; \ No newline at end of file diff --git a/firebase-dynamic-links-api/src/main/java/com/google/firebase/dynamiclinks/internal/DynamicLinkData.java b/firebase-dynamic-links-api/src/main/java/com/google/firebase/dynamiclinks/internal/DynamicLinkData.java deleted file mode 100644 index 02270cd1..00000000 --- a/firebase-dynamic-links-api/src/main/java/com/google/firebase/dynamiclinks/internal/DynamicLinkData.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright (C) 2019 e Foundation - * - * 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.firebase.dynamiclinks.internal; - - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -import android.os.Bundle; -import android.net.Uri; - - -public class DynamicLinkData extends AutoSafeParcelable { - @SafeParceled(1) - public final String dynamicLink; - - @SafeParceled(2) - public final String deepLink; - - @SafeParceled(3) - public final int minVersion; - - @SafeParceled(4) - public final long clickTimestamp; - - @SafeParceled(5) - public final Bundle extensionBundle; - - @SafeParceled(6) - public final Uri redirectUrl; - - public DynamicLinkData() { - dynamicLink = new String(); - deepLink = new String(); - minVersion = 0; - clickTimestamp = 0; - extensionBundle = new Bundle(); - redirectUrl = Uri.EMPTY; - } - - - public static final Creator CREATOR = new AutoCreator(DynamicLinkData.class); -} \ No newline at end of file diff --git a/firebase-dynamic-links-api/src/main/java/com/google/firebase/dynamiclinks/internal/ShortDynamicLink.java b/firebase-dynamic-links-api/src/main/java/com/google/firebase/dynamiclinks/internal/ShortDynamicLink.java deleted file mode 100644 index 893e4098..00000000 --- a/firebase-dynamic-links-api/src/main/java/com/google/firebase/dynamiclinks/internal/ShortDynamicLink.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright (C) 2019 e Foundation - * - * 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.firebase.dynamiclinks.internal; - - -import com.google.firebase.dynamiclinks.internal.Warning; - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - -import android.net.Uri; -import java.util.List; -import java.util.ArrayList; - - -public class ShortDynamicLink extends AutoSafeParcelable { - @SafeParceled(1) - public final Uri shortLink; - - @SafeParceled(2) - public final Uri previewLink; - - @SafeParceled(3) - public final List warnings; - - - public ShortDynamicLink() { - shortLink = Uri.EMPTY; - previewLink = Uri.EMPTY; - - warnings = new ArrayList<>(); - } - - - public static final Creator CREATOR = new AutoCreator(ShortDynamicLink.class); -} \ No newline at end of file diff --git a/firebase-dynamic-links-api/src/main/java/com/google/firebase/dynamiclinks/internal/Warning.java b/firebase-dynamic-links-api/src/main/java/com/google/firebase/dynamiclinks/internal/Warning.java deleted file mode 100644 index 950f3de7..00000000 --- a/firebase-dynamic-links-api/src/main/java/com/google/firebase/dynamiclinks/internal/Warning.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2019 e Foundation - * - * 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.firebase.dynamiclinks.internal; - - -import org.microg.safeparcel.AutoSafeParcelable; -import org.microg.safeparcel.SafeParceled; - - -public class Warning extends AutoSafeParcelable { - @SafeParceled(1) - private int versionCode = 1; - - @SafeParceled(2) - public final String message; - - - public Warning() { - message = null; - } - - - public static final Creator CREATOR = new AutoCreator(Warning.class); -} \ No newline at end of file diff --git a/play-services-api/build.gradle b/play-services-api/build.gradle index d3064fa5..5e627850 100644 --- a/play-services-api/build.gradle +++ b/play-services-api/build.gradle @@ -34,7 +34,6 @@ android { dependencies { api project(':play-services-basement') - api project(':play-services-appinvite-api') api project(':play-services-cast-api') api project(':play-services-cast-framework-api') api project(':play-services-iid-api') diff --git a/play-services-appinvite-api/build.gradle b/play-services-appinvite-api/build.gradle deleted file mode 100644 index 32edbc9b..00000000 --- a/play-services-appinvite-api/build.gradle +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2019 e Foundation - * - * 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: 'com.android.library' - -String getMyVersionName() { - def stdout = new ByteArrayOutputStream() - if (rootProject.file("gradlew").exists()) - exec { commandLine 'git', 'describe', '--tags', '--always', '--dirty'; standardOutput = stdout } - else // automatic build system, don't tag dirty - exec { commandLine 'git', 'describe', '--tags', '--always'; standardOutput = stdout } - return stdout.toString().trim().substring(1) -} - -group = 'org.microg' -version = getMyVersionName() - -android { - compileSdkVersion androidCompileSdk() - buildToolsVersion "$androidBuildVersionTools" - - defaultConfig { - versionName getMyVersionName() - minSdkVersion androidMinSdk() - targetSdkVersion androidTargetSdk() - } - - compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 - } -} - -dependencies { - api project(':play-services-basement') -} diff --git a/play-services-appinvite-api/gradle.properties b/play-services-appinvite-api/gradle.properties deleted file mode 100644 index 7215aee4..00000000 --- a/play-services-appinvite-api/gradle.properties +++ /dev/null @@ -1,34 +0,0 @@ -# -# Copyright 2019 e Foundation -# -# 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. -# - -POM_NAME=Play Services Internal AppInvite API -POM_DESCRIPTION=Interfaces and objects for IPC between Play Services Library and Play Services Core - -POM_PACKAGING=aar - -POM_URL=https://github.com/microg/android_external_GmsApi - -POM_SCM_URL=https://github.com/microg/android_external_GmsApi -POM_SCM_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git -POM_SCM_DEV_CONNECTION=scm:git@github.com:microg/android_external_GmsApi.git - -POM_LICENCE_NAME=The Apache Software License, Version 2.0 -POM_LICENCE_URL=http://www.apache.org/licenses/LICENSE-2.0.txt -POM_LICENCE_DIST=repo - -POM_DEVELOPER_ID=alexandruchircu -POM_DEVELOPER_NAME=Alexandru Chircu - diff --git a/play-services-appinvite-api/src/main/AndroidManifest.xml b/play-services-appinvite-api/src/main/AndroidManifest.xml deleted file mode 100644 index da7741f9..00000000 --- a/play-services-appinvite-api/src/main/AndroidManifest.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - diff --git a/play-services-appinvite-api/src/main/aidl/com/google/android/gms/appinvite/internal/IAppInviteCallbacks.aidl b/play-services-appinvite-api/src/main/aidl/com/google/android/gms/appinvite/internal/IAppInviteCallbacks.aidl deleted file mode 100644 index 66c64d7e..00000000 --- a/play-services-appinvite-api/src/main/aidl/com/google/android/gms/appinvite/internal/IAppInviteCallbacks.aidl +++ /dev/null @@ -1,11 +0,0 @@ -package com.google.android.gms.appinvite.internal; - - -import com.google.android.gms.common.api.Status; -import android.content.Intent; - - -interface IAppInviteCallbacks { - void onStatus(in Status status) = 0; - void onStatusIntent(in Status status, in Intent intent) = 1; -} diff --git a/play-services-appinvite-api/src/main/aidl/com/google/android/gms/appinvite/internal/IAppInviteService.aidl b/play-services-appinvite-api/src/main/aidl/com/google/android/gms/appinvite/internal/IAppInviteService.aidl deleted file mode 100644 index 630edd43..00000000 --- a/play-services-appinvite-api/src/main/aidl/com/google/android/gms/appinvite/internal/IAppInviteService.aidl +++ /dev/null @@ -1,14 +0,0 @@ -package com.google.android.gms.appinvite.internal; - - -import com.google.android.gms.appinvite.internal.IAppInviteCallbacks; - -import com.google.android.gms.dynamic.IObjectWrapper; -import com.google.android.gms.common.api.Status; - - -interface IAppInviteService { - void updateInvitationOnInstall(IAppInviteCallbacks callback, String invitationId) = 0; - void convertInvitation(IAppInviteCallbacks callback, String invitationId) = 1; - void getInvitation(IAppInviteCallbacks callback) = 2; -} diff --git a/play-services-location/src/main/java/com/google/android/gms/location/ActivityRecognition.java b/play-services-location/src/main/java/com/google/android/gms/location/ActivityRecognition.java deleted file mode 100644 index f8f11656..00000000 --- a/play-services-location/src/main/java/com/google/android/gms/location/ActivityRecognition.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (C) 2017 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; -import com.google.android.gms.common.api.GoogleApiClient.Builder; - -import org.microg.gms.location.ActivityRecognitionApiClientBuilder; -import org.microg.gms.location.ActivityRecognitionApiImpl; - -/** - * The main entry point for activity recognition integration. - */ -public class ActivityRecognition { - public static final String CLIENT_NAME = "activity_recognition"; - - /** - * Token to pass to {@link Builder#addApi(Api)} to enable ContextServices. - */ - public static final Api API = new Api(new ActivityRecognitionApiClientBuilder()); - - /** - * Entry point to the activity recognition APIs. - */ - public static final ActivityRecognitionApi ActivityRecognitionApi = new ActivityRecognitionApiImpl(); -} diff --git a/play-services-location/src/main/java/com/google/android/gms/location/FusedLocationProviderClient.java b/play-services-location/src/main/java/com/google/android/gms/location/FusedLocationProviderClient.java deleted file mode 100644 index a391c720..00000000 --- a/play-services-location/src/main/java/com/google/android/gms/location/FusedLocationProviderClient.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2020, microG Project Team - * SPDX-License-Identifier: Apache-2.0 - */ - -package com.google.android.gms.location; - -import android.content.Context; -import android.location.Location; - -import com.google.android.gms.common.api.Api; -import com.google.android.gms.common.api.GoogleApi; -import com.google.android.gms.tasks.Task; -import com.google.android.gms.tasks.TaskCompletionSource; - -import org.microg.gms.common.PublicApi; -import org.microg.gms.common.api.InstantGoogleApiCall; -import org.microg.gms.common.api.PendingGoogleApiCall; -import org.microg.gms.location.LocationClientImpl; - -@PublicApi -public class FusedLocationProviderClient extends GoogleApi { - @PublicApi(exclude = true) - public FusedLocationProviderClient(Context context) { - super(context, LocationServices.API); - } - - public Task flushLocations() { - return scheduleTask(new PendingGoogleApiCall() { - @Override - public void execute(LocationClientImpl client, TaskCompletionSource completionSource) { - completionSource.setResult(null); - } - }); - } - - public Task getLastLocation() { - return scheduleTask((InstantGoogleApiCall) LocationClientImpl::getLastLocation); - } - - -} diff --git a/play-services-location/src/main/java/org/microg/gms/location/ActivityRecognitionApiClientBuilder.java b/play-services-location/src/main/java/org/microg/gms/location/ActivityRecognitionApiClientBuilder.java deleted file mode 100644 index 1d22bd14..00000000 --- a/play-services-location/src/main/java/org/microg/gms/location/ActivityRecognitionApiClientBuilder.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (C) 2017 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 org.microg.gms.location; - -import android.content.Context; -import android.os.Looper; - -import com.google.android.gms.common.api.Api.ApiOptions.NoOptions; - -import org.microg.gms.common.api.ApiClientBuilder; -import org.microg.gms.common.api.ApiClientSettings; -import org.microg.gms.common.api.ApiClient; -import org.microg.gms.common.api.ConnectionCallbacks; -import org.microg.gms.common.api.OnConnectionFailedListener; - -public class ActivityRecognitionApiClientBuilder implements ApiClientBuilder { - @Override - public ApiClient build(NoOptions options, Context context, Looper looper, ApiClientSettings clientSettings, ConnectionCallbacks callbacks, OnConnectionFailedListener connectionFailedListener) { - return new ActivityRecognitionClientImpl(context, callbacks, connectionFailedListener); - } -} diff --git a/play-services-location/src/main/java/org/microg/gms/location/ActivityRecognitionClientImpl.java b/play-services-location/src/main/java/org/microg/gms/location/ActivityRecognitionClientImpl.java deleted file mode 100644 index f48aa489..00000000 --- a/play-services-location/src/main/java/org/microg/gms/location/ActivityRecognitionClientImpl.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (C) 2017 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 org.microg.gms.location; - -import android.app.PendingIntent; -import android.content.Context; -import android.os.RemoteException; - -import org.microg.gms.common.api.ConnectionCallbacks; -import org.microg.gms.common.api.OnConnectionFailedListener; - -public class ActivityRecognitionClientImpl extends GoogleLocationManagerClient { - public ActivityRecognitionClientImpl(Context context, ConnectionCallbacks callbacks, OnConnectionFailedListener connectionFailedListener) { - super(context, callbacks, connectionFailedListener); - } - - public void requestActivityUpdates(long detectionIntervalMillis, PendingIntent callbackIntent) throws RemoteException { - getServiceInterface().requestActivityUpdates(detectionIntervalMillis, true, callbackIntent); - } - - public void removeActivityUpdates(PendingIntent callbackIntent) throws RemoteException { - getServiceInterface().removeActivityUpdates(callbackIntent); - } -} diff --git a/play-services-wearable/src/main/java/com/google/android/gms/wearable/Wearable.java b/play-services-wearable/src/main/java/com/google/android/gms/wearable/Wearable.java deleted file mode 100644 index e1fcd8ec..00000000 --- a/play-services-wearable/src/main/java/com/google/android/gms/wearable/Wearable.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (C) 2013-2017 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.wearable; - -import com.google.android.gms.common.api.Api; -import com.google.android.gms.common.api.GoogleApiClient; - -import org.microg.gms.common.PublicApi; -import org.microg.gms.wearable.DataApiImpl; -import org.microg.gms.wearable.MessageApiImpl; -import org.microg.gms.wearable.NodeApiImpl; -import org.microg.gms.wearable.WearableApiClientBuilder; - -/** - * An API for the Android Wear platform. - */ -@PublicApi -public class Wearable { - /** - * Token to pass to {@link GoogleApiClient.Builder#addApi(Api)} to enable the Wearable features. - */ - public static final Api API = new Api(new WearableApiClientBuilder()); - - public static final DataApi DataApi = new DataApiImpl(); - public static final MessageApi MessageApi = new MessageApiImpl(); - public static final NodeApi NodeApi = new NodeApiImpl(); - - public static class WearableOptions implements Api.ApiOptions.Optional { - /** - * Special option for microG to allow implementation of a FOSS first party Android Wear app - */ - @PublicApi(exclude = true) - public boolean firstPartyMode = false; - - public static class Builder { - public WearableOptions build() { - return new WearableOptions(); - } - } - } -} diff --git a/settings.gradle b/settings.gradle index 1d4a1b0d..83dc6675 100644 --- a/settings.gradle +++ b/settings.gradle @@ -6,6 +6,7 @@ include ':play-services-cast-framework-api' include ':play-services-iid-api' include ':play-services-base' +include ':play-services-base-api' include ':play-services-tasks' include ':play-services-base-core'