Repo Created
This commit is contained in:
parent
eb305e2886
commit
a8c22c65db
4784 changed files with 329907 additions and 2 deletions
44
play-services-phenotype/build.gradle
Normal file
44
play-services-phenotype/build.gradle
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2023 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
apply plugin: 'com.android.library'
|
||||
apply plugin: 'maven-publish'
|
||||
apply plugin: 'signing'
|
||||
|
||||
dependencies {
|
||||
// Dependencies from play-services-phenotype:17.0.0
|
||||
api "androidx.core:core:1.0.0"
|
||||
api project(':play-services-base')
|
||||
api project(':play-services-basement')
|
||||
api project(':play-services-tasks')
|
||||
|
||||
annotationProcessor project(':safe-parcel-processor')
|
||||
}
|
||||
|
||||
android {
|
||||
namespace "com.google.android.gms.phenotype"
|
||||
|
||||
compileSdkVersion androidCompileSdk
|
||||
buildToolsVersion "$androidBuildVersionTools"
|
||||
|
||||
buildFeatures {
|
||||
aidl = true
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
versionName version
|
||||
minSdkVersion androidMinSdk
|
||||
targetSdkVersion androidTargetSdk
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility = 1.8
|
||||
targetCompatibility = 1.8
|
||||
}
|
||||
}
|
||||
|
||||
apply from: '../gradle/publish-android.gradle'
|
||||
|
||||
description = 'microG implementation of play-services-phenotype'
|
||||
8
play-services-phenotype/src/main/AndroidManifest.xml
Normal file
8
play-services-phenotype/src/main/AndroidManifest.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
~ SPDX-FileCopyrightText: 2023 microG Project Team
|
||||
~ SPDX-License-Identifier: Apache-2.0
|
||||
-->
|
||||
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application />
|
||||
</manifest>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2020 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.phenotype;
|
||||
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
public class Configuration extends AutoSafeParcelable {
|
||||
@Field(2)
|
||||
public int id;
|
||||
@Field(3)
|
||||
public Flag[] flags;
|
||||
@Field(4)
|
||||
public String[] removeNames;
|
||||
|
||||
public static final Creator<Configuration> CREATOR = findCreator(Configuration.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2020 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.phenotype;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
public class ExperimentTokens extends AutoSafeParcelable {
|
||||
@Field(2)
|
||||
public String field2;
|
||||
@Field(3)
|
||||
public byte[] direct;
|
||||
@Field(4)
|
||||
public byte[][] gaia;
|
||||
@Field(5)
|
||||
public byte[][] pseudo;
|
||||
@Field(6)
|
||||
public byte[][] always;
|
||||
@Field(7)
|
||||
public byte[][] other;
|
||||
@Field(8)
|
||||
public int[] weak;
|
||||
@Field(9)
|
||||
public byte[][] directs;
|
||||
@Field(10)
|
||||
public int[] genericDimensions;
|
||||
@Field(11)
|
||||
public byte[][] external;
|
||||
|
||||
public static final Creator<ExperimentTokens> CREATOR = findCreator(ExperimentTokens.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,105 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2020 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.phenotype;
|
||||
|
||||
import org.microg.gms.common.Hide;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
@Hide
|
||||
public class Flag extends AutoSafeParcelable {
|
||||
@Field(2)
|
||||
public String name;
|
||||
@Field(3)
|
||||
private long longValue;
|
||||
@Field(4)
|
||||
private boolean boolValue;
|
||||
@Field(5)
|
||||
private double doubleValue;
|
||||
@Field(6)
|
||||
private String stringValue;
|
||||
@Field(7)
|
||||
private byte[] bytesValue;
|
||||
@Field(8)
|
||||
public int dataType;
|
||||
@Field(9)
|
||||
public int flagType;
|
||||
|
||||
private Flag() {
|
||||
}
|
||||
|
||||
public Flag(String name, long longValue, int flagType) {
|
||||
this.name = name;
|
||||
this.longValue = longValue;
|
||||
this.dataType = DATA_TYPE_LONG;
|
||||
this.flagType = flagType;
|
||||
}
|
||||
|
||||
public Flag(String name, boolean boolValue, int flagType) {
|
||||
this.name = name;
|
||||
this.boolValue = boolValue;
|
||||
this.dataType = DATA_TYPE_BOOL;
|
||||
this.flagType = flagType;
|
||||
}
|
||||
|
||||
public Flag(String name, double doubleValue, int flagType) {
|
||||
this.name = name;
|
||||
this.doubleValue = doubleValue;
|
||||
this.dataType = DATA_TYPE_DOUBLE;
|
||||
this.flagType = flagType;
|
||||
}
|
||||
|
||||
public Flag(String name, String stringValue, int flagType) {
|
||||
this.name = name;
|
||||
this.stringValue = stringValue;
|
||||
this.dataType = DATA_TYPE_STRING;
|
||||
this.flagType = flagType;
|
||||
}
|
||||
|
||||
public Flag(String name, byte[] bytesValue, int flagType) {
|
||||
this.name = name;
|
||||
this.bytesValue = bytesValue;
|
||||
this.dataType = DATA_TYPE_BYTES;
|
||||
this.flagType = flagType;
|
||||
}
|
||||
|
||||
public long getLong() {
|
||||
if (dataType == DATA_TYPE_LONG)
|
||||
return longValue;
|
||||
throw new IllegalArgumentException("Not a long type");
|
||||
}
|
||||
|
||||
public boolean getBool() {
|
||||
if (dataType == DATA_TYPE_BOOL)
|
||||
return boolValue;
|
||||
throw new IllegalArgumentException("Not a boolean type");
|
||||
}
|
||||
|
||||
public double getDouble() {
|
||||
if (dataType == DATA_TYPE_DOUBLE)
|
||||
return doubleValue;
|
||||
throw new IllegalArgumentException("Not a double type");
|
||||
}
|
||||
|
||||
public String getString() {
|
||||
if (dataType == DATA_TYPE_STRING)
|
||||
return stringValue;
|
||||
throw new IllegalArgumentException("Not a String type");
|
||||
}
|
||||
|
||||
public byte[] getBytes() {
|
||||
if (dataType == DATA_TYPE_BYTES)
|
||||
return bytesValue;
|
||||
throw new IllegalArgumentException("Not a bytes type");
|
||||
}
|
||||
|
||||
public static final int DATA_TYPE_LONG = 1;
|
||||
public static final int DATA_TYPE_BOOL = 2;
|
||||
public static final int DATA_TYPE_DOUBLE = 3;
|
||||
public static final int DATA_TYPE_STRING = 4;
|
||||
public static final int DATA_TYPE_BYTES = 5;
|
||||
|
||||
public static final Creator<Flag> CREATOR = findCreator(Flag.class);
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2020 microG Project Team
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
package com.google.android.gms.phenotype;
|
||||
|
||||
import org.microg.gms.common.Hide;
|
||||
import org.microg.safeparcel.AutoSafeParcelable;
|
||||
|
||||
@Hide
|
||||
public class GenericDimension extends AutoSafeParcelable {
|
||||
@Field(1)
|
||||
public int a;
|
||||
@Field(2)
|
||||
public int b;
|
||||
|
||||
public static final Creator<GenericDimension> CREATOR = findCreator(GenericDimension.class);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue