Skip to content

Commit

Permalink
Rename limited services
Browse files Browse the repository at this point in the history
  • Loading branch information
p1gp1g authored and mar-v-in committed Sep 28, 2024
1 parent ae6a532 commit 3520b31
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import static android.os.Build.VERSION.SDK_INT;
import static android.os.Build.VERSION_CODES.ICE_CREAM_SANDWICH;
import static org.microg.gms.common.Constants.GMS_PACKAGE_NAME;
import static org.microg.gms.common.Constants.GMS_MINUS_PACKAGE_NAME;
import static org.microg.gms.common.Constants.MICROG_PACKAGE_NAME;
import static org.microg.gms.common.Constants.GMS_PACKAGE_SIGNATURE_SHA1;
import static org.microg.gms.common.Constants.GMS_SECONDARY_PACKAGE_SIGNATURE_SHA1;
import static org.microg.gms.common.Constants.MICROG_PACKAGE_SIGNATURE_SHA1;
Expand Down Expand Up @@ -121,14 +121,14 @@ private String getTargetPackageWithoutPref() {
Log.d(TAG, GMS_PACKAGE_NAME + " not found");
}
try {
if (isMicrogSig(pm, GMS_MINUS_PACKAGE_NAME)) {
Log.d(TAG, GMS_MINUS_PACKAGE_NAME + " found !");
return GMS_MINUS_PACKAGE_NAME;
if (isMicrogSig(pm, MICROG_PACKAGE_NAME)) {
Log.d(TAG, MICROG_PACKAGE_NAME + " found !");
return MICROG_PACKAGE_NAME;
} else {
Log.w(TAG, GMS_MINUS_PACKAGE_NAME + " found with another signature");
Log.w(TAG, MICROG_PACKAGE_NAME + " found with another signature");
}
} catch (PackageManager.NameNotFoundException e) {
Log.d(TAG, GMS_MINUS_PACKAGE_NAME + " not found");
Log.d(TAG, MICROG_PACKAGE_NAME + " not found");
}
return null;
}
Expand All @@ -140,7 +140,7 @@ private String getTargetPackage() {
if ((target = prefs.getString(PREF_TARGET, null)) != null) {
switch (target) {
case GMS_PACKAGE_NAME:
case GMS_MINUS_PACKAGE_NAME:
case MICROG_PACKAGE_NAME:
return target;
case SELF:
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
public class Constants {
public static final int GMS_VERSION_CODE = (BuildConfig.VERSION_CODE / 1000) * 1000;
public static final String GMS_PACKAGE_NAME = "com.google.android.gms";
public static final String GMS_MINUS_PACKAGE_NAME = "org.microg.gms";
public static final String MICROG_PACKAGE_NAME = "org.microg.gms";
public static final String GSF_PACKAGE_NAME = "com.google.android.gsf";
public static final String GMS_PACKAGE_SIGNATURE_SHA1 = "38918a453d07199354f8b19af05ec6562ced5788";
public static final String GMS_SECONDARY_PACKAGE_SIGNATURE_SHA1 = "bd32424203e0fb25f36b57e5aa356f9bdd1da998";
Expand Down
2 changes: 1 addition & 1 deletion play-services-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ android {
dimension 'target'
applicationId = "org.microg.gms"
versionNameSuffix "-user"
manifestPlaceholders = [appLabel:"@string/gms_minus_app_name"]
manifestPlaceholders = [appLabel:"@string/limited_services_app_name"]
matchingFallbacks = ['default']
resValue "string", "package_id", "org.microg.gms"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ private NavController getNavController() {

private void showDialogIfNeeded() {
SharedPreferences prefs = getSharedPreferences(FirstRunMaster, MODE_PRIVATE);
if (BuildConfig.APPLICATION_ID == Constants.GMS_MINUS_PACKAGE_NAME &&
if (BuildConfig.APPLICATION_ID == Constants.MICROG_PACKAGE_NAME &&
prefs.getBoolean(FirstRunPref, true)) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);

builder.setMessage(R.string.minus_dialog_information)
.setTitle(R.string.gms_minus_app_name)
.setPositiveButton(R.string.minus_dialog_information_ack, (dialog, id) -> {
builder.setMessage(R.string.limited_services_dialog_information)
.setTitle(R.string.limited_services_app_name)
.setPositiveButton(R.string.limited_services_dialog_information_ack, (dialog, id) -> {
prefs.edit().putBoolean(FirstRunPref, false).apply();
});

Expand Down
6 changes: 3 additions & 3 deletions play-services-core/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
-->
<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">
<string name="gms_app_name">microG Services</string>
<string name="gms_minus_app_name">microG Minus Services</string>
<string name="limited_services_app_name">microG Limited Services</string>
<string name="gms_settings_name">microG Settings</string>
<string name="gms_settings_summary">Setup microG services.</string>

Expand Down Expand Up @@ -284,7 +284,7 @@ This can take a couple of minutes."</string>
<string name="credentials_assisted_choose_account_subtitle">to continue to %1$s</string>
<string name="credentials_assisted_signin_button_text_long">Sign in with Google</string>

<string name="minus_dialog_information">You are using the microG Minus services. Unlike the usual microG services, this flavor only works with apps using microG libraries, not those on Google Play. This means that most applications will ignore these services.</string>
<string name="minus_dialog_information_ack">I understand</string>
<string name="limited_services_dialog_information">You are using the microG Limited Services. Unlike the usual microG Services, this flavor only works with apps using microG libraries, not those on Google Play. This means that most applications will ignore these services.</string>
<string name="limited_services_dialog_information_ack">I understand</string>

</resources>

0 comments on commit 3520b31

Please sign in to comment.