-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move things and add more details to appset
- Loading branch information
Showing
13 changed files
with
238 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2024 microG Project Team | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
apply plugin: 'com.android.library' | ||
apply plugin: 'kotlin-android' | ||
apply plugin: 'maven-publish' | ||
apply plugin: 'signing' | ||
|
||
dependencies { | ||
api project(':play-services-appset') | ||
|
||
implementation project(':play-services-base-core') | ||
|
||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" | ||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutineVersion" | ||
implementation "org.jetbrains.kotlinx:kotlinx-coroutines-android:$coroutineVersion" | ||
} | ||
|
||
android { | ||
namespace "org.microg.gms.appset.core" | ||
|
||
compileSdkVersion androidCompileSdk | ||
buildToolsVersion "$androidBuildVersionTools" | ||
|
||
defaultConfig { | ||
versionName version | ||
minSdkVersion androidMinSdk | ||
targetSdkVersion androidTargetSdk | ||
} | ||
|
||
sourceSets { | ||
main { | ||
java.srcDirs = ['src/main/kotlin'] | ||
} | ||
} | ||
|
||
lintOptions { | ||
disable 'MissingTranslation' | ||
} | ||
|
||
compileOptions { | ||
sourceCompatibility = 1.8 | ||
targetCompatibility = 1.8 | ||
} | ||
|
||
kotlinOptions { | ||
jvmTarget = 1.8 | ||
} | ||
} | ||
|
||
// Nothing to publish yet | ||
//apply from: '../gradle/publish-android.gradle' | ||
|
||
description = 'microG service implementation for play-services-appset' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
~ SPDX-FileCopyrightText: 2024 microG Project Team | ||
~ SPDX-License-Identifier: Apache-2.0 | ||
--> | ||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"> | ||
|
||
<application> | ||
|
||
<service android:name="org.microg.gms.appset.AppSetService"> | ||
<intent-filter> | ||
<action android:name="com.google.android.gms.appset.service.START" /> | ||
</intent-filter> | ||
</service> | ||
</application> | ||
</manifest> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
play-services-appset/src/main/java/com/google/android/gms/appset/AppSet.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2024 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.android.gms.appset; | ||
|
||
import android.content.Context; | ||
import androidx.annotation.NonNull; | ||
|
||
/** | ||
* Entry point of the app set APIs. | ||
*/ | ||
public class AppSet { | ||
/** | ||
* Creates a new instance of {@link AppSetIdClient}. | ||
*/ | ||
@NonNull | ||
public static AppSetIdClient getClient (Context context) { | ||
throw new UnsupportedOperationException(); | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdClient.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2024 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.android.gms.appset; | ||
|
||
import androidx.annotation.NonNull; | ||
import com.google.android.gms.tasks.Task; | ||
|
||
/** | ||
* A client for interacting with the {@link AppSetIdInfo} API. | ||
*/ | ||
public interface AppSetIdClient { | ||
/** | ||
* Gets the AppSetIdInfo asynchronously. | ||
* @return a {@link Task} of the returned {@link AppSetIdInfo}. | ||
*/ | ||
@NonNull | ||
Task<AppSetIdInfo> getAppSetIdInfo(); | ||
} |
75 changes: 75 additions & 0 deletions
75
play-services-appset/src/main/java/com/google/android/gms/appset/AppSetIdInfo.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2024 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.android.gms.appset; | ||
|
||
import androidx.annotation.IntDef; | ||
import org.microg.gms.common.Hide; | ||
|
||
import java.lang.annotation.ElementType; | ||
import java.lang.annotation.Retention; | ||
import java.lang.annotation.RetentionPolicy; | ||
import java.lang.annotation.Target; | ||
|
||
/** | ||
* Contains information about app set ID. | ||
*/ | ||
public class AppSetIdInfo { | ||
/** | ||
* The app set ID is scoped to the app. | ||
*/ | ||
public static final int SCOPE_APP = 1; | ||
/** | ||
* The app set ID is scoped to a developer account on an app store. All apps from the same developer on a device will have | ||
* the same developer scoped app set ID. | ||
*/ | ||
public static final int SCOPE_DEVELOPER = 2; | ||
|
||
private final String id; | ||
private final @Scope int scope; | ||
|
||
@Hide | ||
public AppSetIdInfo(String id, @Scope int scope) { | ||
this.id = id; | ||
this.scope = scope; | ||
} | ||
|
||
/** | ||
* Gets the app set ID. | ||
* | ||
* @return the app set ID. | ||
*/ | ||
public String getId() { | ||
return id; | ||
} | ||
|
||
/** | ||
* Returns the {@link AppSetIdInfo.Scope} of the app set ID. Possible values include {@link #SCOPE_APP} and {@link #SCOPE_DEVELOPER}. | ||
* | ||
* @return the app set ID's {@link AppSetIdInfo.Scope}. | ||
*/ | ||
public @Scope int getScope() { | ||
return scope; | ||
} | ||
|
||
/** | ||
* Allowed constants for {@link AppSetIdInfo#getScope()}. | ||
* <p> | ||
* Supported constants: | ||
* <ul> | ||
* <li>{@link #SCOPE_APP}</li> | ||
* <li>{@link #SCOPE_DEVELOPER}</li> | ||
* </ul> | ||
*/ | ||
@Target({ElementType.TYPE_USE}) | ||
@Retention(RetentionPolicy.SOURCE) | ||
@IntDef({SCOPE_APP, SCOPE_DEVELOPER}) | ||
public @interface Scope { | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
play-services-appset/src/main/java/com/google/android/gms/appset/package-info.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* SPDX-FileCopyrightText: 2022 microG Project Team | ||
* SPDX-License-Identifier: CC-BY-4.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. | ||
*/ | ||
/** | ||
* For analytics or fraud prevention use cases, on a given device you may | ||
need to correlate usage or actions across a set of apps owned by your organization. | ||
*/ | ||
package com.google.android.gms.appset; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
.../android/gms/gass/internal/GassService.kt → ...kotlin/org/microg/gms/gass/GassService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters