Repo Created

This commit is contained in:
Fr4nz D13trich 2025-11-15 17:44:12 +01:00
parent eb305e2886
commit a8c22c65db
4784 changed files with 329907 additions and 2 deletions

View file

@ -0,0 +1,51 @@
/*
* SPDX-FileCopyrightText: 2019 e Foundation
* SPDX-FileCopyrightText: 2020 microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
apply plugin: 'com.android.library'
apply plugin: 'maven-publish'
apply plugin: 'signing'
android {
namespace "com.google.firebase.dynamiclinks"
compileSdkVersion androidCompileSdk
buildToolsVersion "$androidBuildVersionTools"
buildFeatures {
aidl = true
}
defaultConfig {
versionName version
minSdkVersion androidMinSdk
targetSdkVersion androidTargetSdk
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}
}
dependencies {
// Dependencies from firebase-dynamic-links:21.2.0
api 'androidx.annotation:annotation:1.2.0'
api project(':play-services-base')
api project(':play-services-basement')
api project(':play-services-tasks')
// api project(':firebase-auth-interop')
// api project(':firebase-measurement-connector')
// api project(':firebase-common')
// api project(':firebase-common-ktx')
// api project(':firebase-components')
api 'org.jetbrains.kotlin:kotlin-stdlib:1.7.10'
annotationProcessor project(':safe-parcel-processor')
}
apply from: '../gradle/publish-android.gradle'
description = 'microG API for firebase-dynamic-links'

View file

@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ 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.
-->
<manifest />

View file

@ -0,0 +1,10 @@
/*
* SPDX-FileCopyrightText: 2019, e Foundation
* SPDX-FileCopyrightText: 2021, Google LLC
* SPDX-FileCopyrightText: 2021, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.dynamiclinks.internal;
parcelable DynamicLinkData;

View file

@ -0,0 +1,17 @@
/*
* SPDX-FileCopyrightText: 2019, e Foundation
* SPDX-FileCopyrightText: 2021, Google LLC
* SPDX-FileCopyrightText: 2021, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.dynamiclinks.internal;
import com.google.android.gms.common.api.Status;
import com.google.firebase.dynamiclinks.internal.DynamicLinkData;
import com.google.firebase.dynamiclinks.internal.ShortDynamicLinkImpl;
interface IDynamicLinksCallbacks {
void onStatusDynamicLinkData(in Status status, in DynamicLinkData dldata) = 0;
void onStatusShortDynamicLink(in Status status, in ShortDynamicLinkImpl sdlink) = 1;
}

View file

@ -0,0 +1,16 @@
/*
* SPDX-FileCopyrightText: 2019, e Foundation
* SPDX-FileCopyrightText: 2021, Google LLC
* SPDX-FileCopyrightText: 2021, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.dynamiclinks.internal;
import com.google.firebase.dynamiclinks.internal.IDynamicLinksCallbacks;
import android.os.Bundle;
interface IDynamicLinksService {
void getDynamicLink(IDynamicLinksCallbacks callback, String link) = 0;
void createShortDynamicLink(IDynamicLinksCallbacks callback, in Bundle extras) = 1;
}

View file

@ -0,0 +1,10 @@
/*
* SPDX-FileCopyrightText: 2019, e Foundation
* SPDX-FileCopyrightText: 2021, Google LLC
* SPDX-FileCopyrightText: 2021, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.dynamiclinks.internal;
parcelable ShortDynamicLinkImpl;

View file

@ -0,0 +1,10 @@
/*
* SPDX-FileCopyrightText: 2019, e Foundation
* SPDX-FileCopyrightText: 2021, Google LLC
* SPDX-FileCopyrightText: 2021, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.dynamiclinks.internal;
parcelable WarningImpl;

View file

@ -0,0 +1,72 @@
/*
* SPDX-FileCopyrightText: 2021, microG Project Team
* SPDX-License-Identifier: Apache-2.0
* Notice: Portions of this file are reproduced from work created and shared by Google and used
* according to terms described in the Creative Commons 4.0 Attribution License.
* See https://developers.google.com/readme/policies for details.
*/
package com.google.firebase.dynamiclinks;
import android.net.Uri;
import org.microg.gms.common.PublicApi;
import java.util.List;
/**
* Response from {@link DynamicLink.Builder#buildShortDynamicLink()} that returns the shortened Dynamic Link, link flow chart, and warnings from the requested Dynamic Link.
*/
@PublicApi
public interface ShortDynamicLink {
/**
* Gets the preview link to show the link flow chart.
*/
Uri getPreviewLink();
/**
* Gets the short Dynamic Link value.
*/
Uri getShortLink();
/**
* Gets information about potential warnings on link creation.
*/
List<? extends Warning> getWarnings();
/**
* Path generation option for short Dynamic Link length
*/
@interface Suffix {
/**
* Shorten the path to an unguessable string. Such strings are created by base62-encoding randomly generated
* 96-bit numbers, and consist of 17 alphanumeric characters. Use unguessable strings to prevent your Dynamic
* Links from being crawled, which can potentially expose sensitive information.
*/
int UNGUESSABLE = 1;
/**
* Shorten the path to a string that is only as long as needed to be unique, with a minimum length of 4
* characters. Use this method if sensitive information would not be exposed if a short Dynamic Link URL were
* guessed.
*/
int SHORT = 2;
}
/**
* Information about potential warnings on short Dynamic Link creation.
*/
interface Warning {
/**
* Gets the warning code.
*
* @deprecated See {@link #getMessage()} for more information on this warning and how to correct it.
*/
@Deprecated
String getCode();
/**
* Gets the warning message to help developers improve their requests.
*/
String getMessage();
}
}

View file

@ -0,0 +1,69 @@
/*
* SPDX-FileCopyrightText: 2019, e Foundation
* SPDX-FileCopyrightText: 2021, Google LLC
* SPDX-FileCopyrightText: 2021, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.dynamiclinks.internal;
import android.os.Parcel;
import androidx.annotation.NonNull;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelable;
import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter;
import android.os.Bundle;
import android.net.Uri;
import org.microg.gms.utils.ToStringHelper;
@SafeParcelable.Class
public class DynamicLinkData extends AbstractSafeParcelable {
@Field(1)
public final String dynamicLink;
@Field(2)
public final String deepLink;
@Field(3)
public final int minVersion;
@Field(4)
public final long clickTimestamp;
@Field(5)
public final Bundle extensionBundle;
@Field(6)
public final Uri redirectUrl;
@Constructor
public DynamicLinkData(@Param(1) String dynamicLink, @Param(2) String deepLink, @Param(3) int minVersion, @Param(4) long clickTimestamp, @Param(5) Bundle extensionBundle, @Param(6) Uri redirectUrl) {
this.dynamicLink = dynamicLink;
this.deepLink = deepLink;
this.minVersion = minVersion;
this.clickTimestamp = clickTimestamp;
this.extensionBundle = extensionBundle;
this.redirectUrl = redirectUrl;
}
@NonNull
@Override
public String toString() {
return ToStringHelper.name("DynamicLinkData")
.field("dynamicLink", dynamicLink)
.field("deepLink", deepLink)
.field("minVersion", minVersion)
.field("clickTimestamp", clickTimestamp)
.field("extensionBundle", extensionBundle)
.field("redirectUrl", redirectUrl)
.end();
}
@Override
public void writeToParcel(@NonNull Parcel dest, int flags) {
CREATOR.writeToParcel(this, dest, flags);
}
public static final SafeParcelableCreatorAndWriter<DynamicLinkData> CREATOR = findCreator(DynamicLinkData.class);
}

View file

@ -0,0 +1,43 @@
/*
* SPDX-FileCopyrightText: 2019, e Foundation
* SPDX-FileCopyrightText: 2021, Google LLC
* SPDX-FileCopyrightText: 2021, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.dynamiclinks.internal;
import android.net.Uri;
import org.microg.safeparcel.AutoSafeParcelable;
import java.util.ArrayList;
import java.util.List;
public class ShortDynamicLinkImpl extends AutoSafeParcelable {
@Field(1)
public final Uri shortLink;
@Field(2)
public final Uri previewLink;
@Field(3)
public final List<WarningImpl> warnings;
public ShortDynamicLinkImpl() {
shortLink = Uri.EMPTY;
previewLink = Uri.EMPTY;
warnings = new ArrayList<>();
}
public ShortDynamicLinkImpl(Uri shortLink, Uri previewLink, List<WarningImpl> warnings) {
this.shortLink = shortLink;
this.previewLink = previewLink;
this.warnings = warnings;
}
public static final Creator<ShortDynamicLinkImpl> CREATOR = new AutoCreator<ShortDynamicLinkImpl>(ShortDynamicLinkImpl.class);
}

View file

@ -0,0 +1,40 @@
/*
* SPDX-FileCopyrightText: 2021, microG Project Team
* SPDX-License-Identifier: Apache-2.0
*/
package com.google.firebase.dynamiclinks.internal;
import com.google.firebase.dynamiclinks.ShortDynamicLink;
import org.microg.safeparcel.AutoSafeParcelable;
import org.microg.safeparcel.SafeParceled;
public class WarningImpl extends AutoSafeParcelable implements ShortDynamicLink.Warning {
@Field(1)
@Deprecated
private int code = 1;
@Field(2)
private final String message;
private WarningImpl() {
this.message = null;
}
public WarningImpl(String message) {
this.message = message;
}
@Override
public String getCode() {
return null;
}
@Override
public String getMessage() {
return message;
}
public static final Creator<WarningImpl> CREATOR = new AutoCreator<WarningImpl>(WarningImpl.class);
}