mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-11 20:14:35 +02:00
chore(GmsCore support): Use more generic message
This commit is contained in:
parent
42e73cbfce
commit
db792e3920
@ -59,18 +59,21 @@ public class GmsCoreSupport {
|
|||||||
|
|
||||||
private static void showBatteryOptimizationDialog(Activity context,
|
private static void showBatteryOptimizationDialog(Activity context,
|
||||||
String dialogMessageRef,
|
String dialogMessageRef,
|
||||||
String positiveButtonStringRef,
|
String positiveButtonTextRef,
|
||||||
DialogInterface.OnClickListener onPositiveClickListener) {
|
DialogInterface.OnClickListener onPositiveClickListener) {
|
||||||
// Use a delay to allow the activity to finish initializing.
|
// Use a delay to allow the activity to finish initializing.
|
||||||
// Otherwise, if device is in dark mode the dialog is shown with wrong color scheme.
|
// Otherwise, if device is in dark mode the dialog is shown with wrong color scheme.
|
||||||
Utils.runOnMainThreadDelayed(() -> new AlertDialog.Builder(context)
|
Utils.runOnMainThreadDelayed(() ->
|
||||||
.setIconAttribute(android.R.attr.alertDialogIcon)
|
// Do not set cancelable to false, to allow using back button to skip the action,
|
||||||
.setTitle(str("gms_core_dialog_title"))
|
// just in case the battery change can never be satisfied.
|
||||||
.setMessage(str(dialogMessageRef))
|
new AlertDialog.Builder(context)
|
||||||
.setPositiveButton(str(positiveButtonStringRef), onPositiveClickListener)
|
.setIconAttribute(android.R.attr.alertDialogIcon)
|
||||||
// Allow using back button to skip the action, just in case the check can never be satisfied.
|
.setTitle(str("gms_core_dialog_title"))
|
||||||
.setCancelable(true)
|
.setMessage(str(dialogMessageRef))
|
||||||
.show(), 100);
|
.setPositiveButton(str(positiveButtonTextRef), onPositiveClickListener)
|
||||||
|
.show(),
|
||||||
|
100
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -443,7 +443,9 @@ This is required for the app to work."</string>
|
|||||||
<string name="gms_core_dialog_open_website_text">Open website</string>
|
<string name="gms_core_dialog_open_website_text">Open website</string>
|
||||||
<string name="gms_core_dialog_not_whitelisted_using_battery_optimizations_message">"GmsCore battery optimizations must be disabled to prevent issues.
|
<string name="gms_core_dialog_not_whitelisted_using_battery_optimizations_message">"GmsCore battery optimizations must be disabled to prevent issues.
|
||||||
|
|
||||||
Tap on the continue button and disable battery optimizations."</string>
|
Disabling battery optimizations for GmsCore will not negatively affect battery usage.
|
||||||
|
|
||||||
|
Tap the continue button and allow optimization changes."</string>
|
||||||
<string name="gms_core_dialog_continue_text">Continue</string>
|
<string name="gms_core_dialog_continue_text">Continue</string>
|
||||||
|
|
||||||
<string name="revanced_spoof_client_title">Spoof client</string>
|
<string name="revanced_spoof_client_title">Spoof client</string>
|
||||||
|
@ -1852,7 +1852,9 @@ This is required for the app to work."</string>
|
|||||||
<string name="gms_core_dialog_open_website_text">Open website</string>
|
<string name="gms_core_dialog_open_website_text">Open website</string>
|
||||||
<string name="gms_core_dialog_not_whitelisted_using_battery_optimizations_message">"GmsCore battery optimizations must be disabled to prevent issues.
|
<string name="gms_core_dialog_not_whitelisted_using_battery_optimizations_message">"GmsCore battery optimizations must be disabled to prevent issues.
|
||||||
|
|
||||||
Tap on the continue button and disable battery optimizations."</string>
|
Disabling battery optimizations for GmsCore will not negatively affect battery usage.
|
||||||
|
|
||||||
|
Tap the continue button and allow optimization changes."</string>
|
||||||
<string name="gms_core_dialog_continue_text">Continue</string>
|
<string name="gms_core_dialog_continue_text">Continue</string>
|
||||||
|
|
||||||
<string name="revanced_sanitize_sharing_links_title">Sanitize sharing links</string>
|
<string name="revanced_sanitize_sharing_links_title">Sanitize sharing links</string>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user