diff --git a/firebase-dynamic-links-api/build.gradle b/firebase-dynamic-links-api/build.gradle new file mode 100644 index 00000000..32edbc9b --- /dev/null +++ b/firebase-dynamic-links-api/build.gradle @@ -0,0 +1,49 @@ +/* + * 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 new file mode 100644 index 00000000..c601b6d6 --- /dev/null +++ b/firebase-dynamic-links-api/gradle.properties @@ -0,0 +1,34 @@ +# +# 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 new file mode 100644 index 00000000..ae17555c --- /dev/null +++ b/firebase-dynamic-links-api/src/main/AndroidManifest.xml @@ -0,0 +1,18 @@ + + + + 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 new file mode 100644 index 00000000..5862178a --- /dev/null +++ b/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/DynamicLinkData.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 00000000..9f9915ff --- /dev/null +++ b/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/IDynamicLinksCallbacks.aidl @@ -0,0 +1,12 @@ +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 new file mode 100644 index 00000000..57f083f5 --- /dev/null +++ b/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/IDynamicLinksService.aidl @@ -0,0 +1,12 @@ +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 new file mode 100644 index 00000000..f4852a03 --- /dev/null +++ b/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/ShortDynamicLink.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 00000000..4331c92a --- /dev/null +++ b/firebase-dynamic-links-api/src/main/aidl/com/google/firebase/dynamiclinks/internal/Warning.aidl @@ -0,0 +1,3 @@ +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 new file mode 100644 index 00000000..02270cd1 --- /dev/null +++ b/firebase-dynamic-links-api/src/main/java/com/google/firebase/dynamiclinks/internal/DynamicLinkData.java @@ -0,0 +1,57 @@ +/* + * 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 new file mode 100644 index 00000000..893e4098 --- /dev/null +++ b/firebase-dynamic-links-api/src/main/java/com/google/firebase/dynamiclinks/internal/ShortDynamicLink.java @@ -0,0 +1,50 @@ +/* + * 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 new file mode 100644 index 00000000..950f3de7 --- /dev/null +++ b/firebase-dynamic-links-api/src/main/java/com/google/firebase/dynamiclinks/internal/Warning.java @@ -0,0 +1,38 @@ +/* + * 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-appinvite-api/build.gradle b/play-services-appinvite-api/build.gradle new file mode 100644 index 00000000..32edbc9b --- /dev/null +++ b/play-services-appinvite-api/build.gradle @@ -0,0 +1,49 @@ +/* + * 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 new file mode 100644 index 00000000..7215aee4 --- /dev/null +++ b/play-services-appinvite-api/gradle.properties @@ -0,0 +1,34 @@ +# +# 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 new file mode 100644 index 00000000..da7741f9 --- /dev/null +++ b/play-services-appinvite-api/src/main/AndroidManifest.xml @@ -0,0 +1,18 @@ + + + + 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 new file mode 100644 index 00000000..66c64d7e --- /dev/null +++ b/play-services-appinvite-api/src/main/aidl/com/google/android/gms/appinvite/internal/IAppInviteCallbacks.aidl @@ -0,0 +1,11 @@ +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 new file mode 100644 index 00000000..630edd43 --- /dev/null +++ b/play-services-appinvite-api/src/main/aidl/com/google/android/gms/appinvite/internal/IAppInviteService.aidl @@ -0,0 +1,14 @@ +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-basement/src/main/java/org/microg/gms/common/GmsService.java b/play-services-basement/src/main/java/org/microg/gms/common/GmsService.java index 73f32940..fd6141ce 100644 --- a/play-services-basement/src/main/java/org/microg/gms/common/GmsService.java +++ b/play-services-basement/src/main/java/org/microg/gms/common/GmsService.java @@ -88,6 +88,7 @@ public enum GmsService { PLUS_INTERNAL(70), SOURCE_DEVICE(75, "com.google.android.gms.smartdevice.d2d.SourceDeviceService.START"), TARGET_DEVICE(76, "com.google.android.gms.smartdevice.d2d.TargetDeviceService.START"), + APP_INVITE(77, "com.google.android.gms.appinvite.service.START"), TAP_AND_PAY(79, "com.google.android.gms.tapandpay.service.BIND"), ACCOUNTS(81, "com.google.android.gms.smartdevice.setup.accounts.AccountsService.START"), TRUST_AGENT(85, "com.google.android.gms.trustagent.StateApi.START"), @@ -98,7 +99,8 @@ public enum GmsService { GASS(116, "com.google.android.gms.gass.START"), WORK_ACCOUNT(120), AD_CACHE(123, "com.google.android.gms.ads.service.CACHE"), - NEARBY_EXPOSURE(236, "com.google.android.gms.nearby.exposurenotification.START") + DYNAMIC_LINKS(131, "com.google.firebase.dynamiclinks.service.START"), + NEARBY_EXPOSURE(236, "com.google.android.gms.nearby.exposurenotification.START"), ; public int SERVICE_ID; diff --git a/settings.gradle b/settings.gradle index 09762221..95774e5a 100644 --- a/settings.gradle +++ b/settings.gradle @@ -4,6 +4,7 @@ include ':play-services-basement' include ':play-services-tasks' +include ':play-services-appinvite-api' include ':play-services-base-api' include ':play-services-cast-api' include ':play-services-cast-framework-api' @@ -14,6 +15,8 @@ include ':play-services-wearable-api' include ':play-services-api' +include ':firebase-dynamic-links-api' + include ':play-services-base-core' include ':play-services-location-core' include ':play-services-maps-core-mapbox'