Skip to content

Commit d9c36e5

Browse files
committed
Use BuildConfig application id for remote context
1 parent 7dafecf commit d9c36e5

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

play-services-base/build.gradle

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,14 @@ android {
1919

2020
buildFeatures {
2121
aidl = true
22+
buildConfig = true
2223
}
2324

2425
defaultConfig {
2526
versionName version
2627
minSdkVersion androidMinSdk
2728
targetSdkVersion androidTargetSdk
29+
buildConfigField "String", "APPLICATION_ID", "\"app.revanced.android.gms\""
2830
}
2931

3032
compileOptions {

play-services-base/src/main/java/com/google/android/gms/common/GooglePlayServicesUtil.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,8 @@ public static String getOpenSourceSoftwareLicenseInfo(Context context) {
136136
* @return The Context object of the Buddy APK or null if the Buddy APK is not installed on the device.
137137
*/
138138
public static Context getRemoteContext(Context context) {
139-
String packageName = Constants.GMS_PACKAGE_NAME;
140-
if (Constants.USER_MICROG_PACKAGE_NAME.equals(context.getPackageName())) {
141-
packageName = Constants.USER_MICROG_PACKAGE_NAME;
142-
}
143139
try {
144-
return context.createPackageContext(packageName, Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY);
140+
return context.createPackageContext(BuildConfig.APPLICATION_ID, Context.CONTEXT_INCLUDE_CODE | Context.CONTEXT_IGNORE_SECURITY);
145141
} catch (PackageManager.NameNotFoundException unused) {
146142
return null;
147143
}

0 commit comments

Comments
 (0)