diff --git a/.github/matchers/gradle-build-kotlin-error-matcher.json b/.github/matchers/gradle-build-kotlin-error-matcher.json deleted file mode 100644 index bd9e876..0000000 --- a/.github/matchers/gradle-build-kotlin-error-matcher.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "problemMatcher": [ - { - "owner": "gradle-build-kotlin-error-matcher", - "severity": "error", - "pattern": [ - { - "regexp": "^e:\\sfile:\/\/([^:]+):(\\d+):(\\d+)\\s(.+)$", - "file": 1, - "line": 2, - "column": 3, - "message": 4 - } - ] - } - ] -} diff --git a/.github/matchers/gradle-build-kotlin-error-matcher.json.license b/.github/matchers/gradle-build-kotlin-error-matcher.json.license deleted file mode 100644 index f24ebfe..0000000 --- a/.github/matchers/gradle-build-kotlin-error-matcher.json.license +++ /dev/null @@ -1,2 +0,0 @@ -SPDX-FileCopyrightText: none -SPDX-License-Identifier: CC0-1.0 diff --git a/.github/matchers/gradle-build-matcher.json b/.github/matchers/gradle-build-matcher.json deleted file mode 100644 index df09e4f..0000000 --- a/.github/matchers/gradle-build-matcher.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "problemMatcher": [ - { - "owner": "gradle-build-matcher", - "pattern": [ - { - "regexp": "^\\s*([^:]+):(\\d+):\\s(error|Error):\\s(.+)$", - "file": 1, - "line": 2, - "severity": 3, - "message": 4 - } - ] - } - ] -} diff --git a/.github/matchers/gradle-build-matcher.json.license b/.github/matchers/gradle-build-matcher.json.license deleted file mode 100644 index f24ebfe..0000000 --- a/.github/matchers/gradle-build-matcher.json.license +++ /dev/null @@ -1,2 +0,0 @@ -SPDX-FileCopyrightText: none -SPDX-License-Identifier: CC0-1.0 diff --git a/README.md b/README.md index 000250b..593e4b7 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,26 @@ -# MicroG (MicroG Services Redesign) +# MicroG RE (MicroG Services Redesign) [GmsCore](https://github.com/microg/GmsCore) fork designed for ReVanced with Material You design, along with some improvements and features -[![Release](https://img.shields.io/github/v/release/AykhanUV/MicroG?display_name=tag&style=for-the-badge&logo=github&labelColor=21262d&color=1f6feb)](https://github.com/AykhanUV/MicroG/releases/latest) +[![Platform](https://img.shields.io/badge/android-platform?style=for-the-badge&label=platform&labelColor=21262d&color=6e7681)](https://www.android.com) [![API](https://img.shields.io/badge/24%2B-level?style=for-the-badge&logo=android&logoColor=3cd382&label=API&labelColor=21262d&color=ff663b)](https://developer.android.com/studio/releases/platforms) [![Release](https://img.shields.io/github/v/release/WSTxda/MicroG-RE?display_name=tag&style=for-the-badge&logo=github&labelColor=21262d&color=1f6feb)](https://github.com/WSTxda/MicroG-RE/releases/latest) [![Downloads](https://img.shields.io/github/downloads/WSTxda/MicroG-RE/total?style=for-the-badge&labelColor=21262d&color=238636)](https://github.com/WSTxda/MicroG-RE/releases) + +![Banner](https://raw.githubusercontent.com/WSTxda/MicroG-RE/master/Images/Banner.svg) + +**Screenshots** + +
+ Light + +![Banner](https://raw.githubusercontent.com/WSTxda/MicroG-RE/master/Images/Light.png) + +
+ +
+ Dark + +![Banner](https://raw.githubusercontent.com/WSTxda/MicroG-RE/master/Images/Dark.png) + +
**Recommended Patches** @@ -12,12 +30,30 @@ [ReVanced Extended (anddea)](https://github.com/anddea/revanced-patches) -[ReVanced Extended (AykhanUV)](https://github.com/AykhanUV/revanced-patches) +[ReVanced Extended (rufusin)](https://github.com/rufusin/revanced-patches) [YT Advanced (REX)](https://github.com/YT-Advanced/ReX-patches) +**Download** + +[](https://github.com/WSTxda/MicroG-RE/releases) [](https://t.me/WSTprojects) + +**Donate** + +[](https://bit.ly/2lV0E6u) [](https://www.buymeacoffee.com/wstxda) + **Credits** [microG Project](https://github.com/microg) for GmsCore, alternative of Play Services. [wiki](https://github.com/microg/GmsCore/wiki) [Shadow578](https://github.com/shadow578) for the implementation of GmsCore for ReVanced + +[AyushTNM](https://github.com/ayushTNM) for some useful implementations and ideas diff --git a/build.gradle b/build.gradle index afaafe0..624b672 100644 --- a/build.gradle +++ b/build.gradle @@ -82,7 +82,7 @@ allprojects { apply plugin: 'idea' group = 'org.microg.gms' - ext.appVersionName = 2.0 + ext.appVersionName = 5.9 ext.appVersionCode = 243864000 ext.baseVersion = ext.appVersionCode.toString()[0..1] + '.' + ext.appVersionCode.toString()[2..3] + '.' + ext.appVersionCode.toString()[4..5] version = ext.appVersionName+" GMS-"+ext.baseVersion.replaceAll("\\.", "") diff --git a/play-services-base/core/src/main/kotlin/org/microg/gms/ui/Utils.kt b/play-services-base/core/src/main/kotlin/org/microg/gms/ui/Utils.kt index 2994a03..d97e233 100644 --- a/play-services-base/core/src/main/kotlin/org/microg/gms/ui/Utils.kt +++ b/play-services-base/core/src/main/kotlin/org/microg/gms/ui/Utils.kt @@ -17,11 +17,13 @@ import android.view.View import androidx.annotation.AttrRes import androidx.annotation.ColorInt import androidx.annotation.IdRes +import androidx.appcompat.app.AlertDialog import androidx.core.content.ContextCompat import androidx.databinding.BindingAdapter import androidx.navigation.NavController import androidx.navigation.navOptions import androidx.navigation.ui.R +import com.google.android.material.dialog.MaterialAlertDialogBuilder fun PackageManager.getApplicationInfoIfExists(packageName: String?, flags: Int = 0): ApplicationInfo? = packageName?.let { try { @@ -57,6 +59,12 @@ val Context.systemAnimationsEnabled: Boolean return duration != 0f && transition != 0f } +fun Context.buildAlertDialog() = try { + // Try material design first + MaterialAlertDialogBuilder(this) +} catch (e: Exception) { + AlertDialog.Builder(this) +} @ColorInt fun Context.resolveColor(@AttrRes resid: Int): Int? { diff --git a/play-services-base/core/src/main/res/values-in/strings.xml b/play-services-base/core/src/main/res/values-in/strings.xml new file mode 100644 index 0000000..8d8f738 --- /dev/null +++ b/play-services-base/core/src/main/res/values-in/strings.xml @@ -0,0 +1,25 @@ + + + + + Aktif di latar belakang + %1$s sedang berjalan di latar belakang + Kecualikan %1$s dari optimisasi baterai atau ubah pengaturan notifikasi untuk menyembunyikan notifikasi ini + + Pengaturan + + Tidak ada + Lihat semua + + Buka + + Dinonaktifkan + Diaktifkan + Otomatis + Manual + Aktif + Nonaktif + diff --git a/play-services-base/core/src/main/res/values-it/strings.xml b/play-services-base/core/src/main/res/values-it/strings.xml new file mode 100644 index 0000000..6a497e7 --- /dev/null +++ b/play-services-base/core/src/main/res/values-it/strings.xml @@ -0,0 +1,25 @@ + + + + + Attivo in secondo piano + %1$s รจ in fase di esecuzione in secondo piano + Escludi %1$s dalla lista delle app con ottimizzazione della batteria attiva o nascondi questa notifica dalle impostazioni dell\'app + + Impostazioni + + Nessuno + Vedi tutti + + Apri + + Disattivato + Attivo + Automatico + Manuale + Attivo + Disattivato + diff --git a/play-services-basement/src/main/java/com/google/android/gms/common/internal/GetServiceRequest.java b/play-services-basement/src/main/java/com/google/android/gms/common/internal/GetServiceRequest.java index 6ff0d84..2bf5bf3 100644 --- a/play-services-basement/src/main/java/com/google/android/gms/common/internal/GetServiceRequest.java +++ b/play-services-basement/src/main/java/com/google/android/gms/common/internal/GetServiceRequest.java @@ -28,6 +28,7 @@ import com.google.android.gms.common.internal.safeparcel.SafeParcelableCreatorAndWriter; import org.microg.gms.common.Constants; import org.microg.gms.common.GmsService; +import org.microg.gms.utils.ToStringHelper; import java.util.Arrays; @@ -57,13 +58,13 @@ public class GetServiceRequest extends AbstractSafeParcelable { @Field(11) public Feature[] apiFeatures; @Field(12) - boolean supportsConnectionInfo; + public boolean supportsConnectionInfo; @Field(13) int field13; @Field(14) boolean field14; @Field(15) - String attributionTag; + public String attributionTag; private GetServiceRequest() { serviceId = -1; @@ -79,14 +80,18 @@ public GetServiceRequest(@Param(2) int serviceId) { @Override public String toString() { - return "GetServiceRequest{" + - "serviceId=" + GmsService.nameFromServiceId(serviceId) + - ", gmsVersion=" + gmsVersion + - ", packageName='" + packageName + '\'' + - (scopes == null || scopes.length == 0 ? "" : (", scopes=" + Arrays.toString(scopes))) + - (extras == null ? "" : (", extras=" + extras)) + - (account == null ? "" : (", account=" + account)) + - '}'; + return ToStringHelper.name("GetServiceRequest") + .value(GmsService.nameFromServiceId(serviceId)) + .field("packageName", packageName) + .field("gmsVersion", gmsVersion) + .field("scopes", scopes) + .field("extras", extras) + .field("account", account) + .field("defaultFeatures", defaultFeatures) + .field("apiFeatures", apiFeatures) + .field("supportsConnectionInfo", supportsConnectionInfo) + .field("attributionTag", attributionTag) + .end(); } @Override diff --git a/play-services-basement/src/main/java/org/microg/gms/utils/ToStringHelper.java b/play-services-basement/src/main/java/org/microg/gms/utils/ToStringHelper.java index deb4e0f..90b4643 100644 --- a/play-services-basement/src/main/java/org/microg/gms/utils/ToStringHelper.java +++ b/play-services-basement/src/main/java/org/microg/gms/utils/ToStringHelper.java @@ -7,6 +7,8 @@ import android.util.Base64; +import java.util.Arrays; + public class ToStringHelper { private StringBuilder sb; private boolean hasField; @@ -111,6 +113,15 @@ public ToStringHelper field(String name, byte[] val, boolean forceNull) { return fieldUnquoted(name, val == null ? "null" : Base64.encodeToString(val, Base64.NO_WRAP | Base64.NO_PADDING | Base64.URL_SAFE)); } + public ToStringHelper field(String name, Object[] val) { + return field(name, val, false); + } + + public ToStringHelper field(String name, Object[] val, boolean forceNull) { + if (val == null && !forceNull) return this; + return fieldUnquoted(name, val == null ? "null" : Arrays.toString(val)); + } + public String end() { if (!hasEnd) sb.append(']'); hasEnd = true; diff --git a/play-services-core/proguard-rules.pro b/play-services-core/proguard-rules.pro index 155f521..e69de29 100644 --- a/play-services-core/proguard-rules.pro +++ b/play-services-core/proguard-rules.pro @@ -1 +0,0 @@ -../proguard.flags \ No newline at end of file diff --git a/safe-parcel-processor/src/main/kotlin/org/microg/safeparcel/SafeParcelProcessor.kt b/safe-parcel-processor/src/main/kotlin/org/microg/safeparcel/SafeParcelProcessor.kt index 51aa786..72ff7c0 100644 --- a/safe-parcel-processor/src/main/kotlin/org/microg/safeparcel/SafeParcelProcessor.kt +++ b/safe-parcel-processor/src/main/kotlin/org/microg/safeparcel/SafeParcelProcessor.kt @@ -333,7 +333,7 @@ class FieldInfo(val clazz: ClassInfo, val fieldElement: VariableElement) { "int[]" -> "$variableName = $SafeParcelReader.readIntArray(parcel, header)" "java.util.List", "java.util.ArrayList" -> when { !useValueParcel -> "$variableName = $SafeParcelReader.readStringList(parcel, header)" - else -> "$variableName = $SafeParcelReader.readList(parcel, header, String.class.getClassloader())" + else -> "$variableName = $SafeParcelReader.readList(parcel, header, String.class.getClassLoader())" } // "java.util.List", "java.util.ArrayList" -> "$variableName = $SafeParcelReader.readIntegerList(parcel, header)" // "java.util.List", "java.util.ArrayList" -> "$variableName = $SafeParcelReader.readBooleanList(parcel, header)" @@ -343,7 +343,7 @@ class FieldInfo(val clazz: ClassInfo, val fieldElement: VariableElement) { else -> when { isList && isParcelable && !useValueParcel -> "$variableName = $SafeParcelReader.readParcelableList(parcel, header, $listItemType.CREATOR)" isArray && isParcelable -> "$variableName = $SafeParcelReader.readParcelableArray(parcel, header, $listItemType.CREATOR)" - isList -> "$variableName = $SafeParcelReader.readList(parcel, header, $listItemType.class.getClassloader())" + isList -> "$variableName = $SafeParcelReader.readList(parcel, header, $listItemType.class.getClassLoader())" isParcelable -> "$variableName = $SafeParcelReader.readParcelable(parcel, header, $type.CREATOR)" !isList && isIInterface -> "$variableName = $type.Stub.asInterface($SafeParcelReader.readBinder(parcel, header))" else -> throw UnsupportedOperationException("Field $name in ${clazz.fullName} has unsupported type $type.") diff --git a/safe-parcel-processor/src/main/resources/META-INF/gradle/incremental.annotation.processors b/safe-parcel-processor/src/main/resources/META-INF/gradle/incremental.annotation.processors new file mode 100644 index 0000000..19c8197 --- /dev/null +++ b/safe-parcel-processor/src/main/resources/META-INF/gradle/incremental.annotation.processors @@ -0,0 +1,6 @@ +# +# SPDX-FileCopyrightText: 2024 microG Project Team +# SPDX-License-Identifier: Apache-2.0 +# + +org.microg.safeparcel.SafeParcelProcessor, isolating \ No newline at end of file