Merge "Format the service name with BidiFormatter"
This commit is contained in:
committed by
Android (Google) Code Review
commit
51eed93c10
@@ -131,18 +131,17 @@ public class AccessibilityServiceWarning {
|
|||||||
/** Returns a {@link Dialog} to be shown to confirm that they want to disable a service. */
|
/** Returns a {@link Dialog} to be shown to confirm that they want to disable a service. */
|
||||||
public static Dialog createDisableDialog(Context context,
|
public static Dialog createDisableDialog(Context context,
|
||||||
AccessibilityServiceInfo info, DialogInterface.OnClickListener listener) {
|
AccessibilityServiceInfo info, DialogInterface.OnClickListener listener) {
|
||||||
final AlertDialog dialog = new AlertDialog.Builder(context)
|
CharSequence serviceName = getServiceName(context, info);
|
||||||
.setTitle(context.getString(R.string.disable_service_title,
|
|
||||||
info.getResolveInfo().loadLabel(context.getPackageManager())))
|
return new AlertDialog.Builder(context)
|
||||||
|
.setTitle(context.getString(R.string.disable_service_title, serviceName))
|
||||||
.setMessage(context.getString(R.string.disable_service_message,
|
.setMessage(context.getString(R.string.disable_service_message,
|
||||||
context.getString(R.string.accessibility_dialog_button_stop),
|
context.getString(R.string.accessibility_dialog_button_stop),
|
||||||
getServiceName(context, info)))
|
serviceName))
|
||||||
.setCancelable(true)
|
.setCancelable(true)
|
||||||
.setPositiveButton(R.string.accessibility_dialog_button_stop, listener)
|
.setPositiveButton(R.string.accessibility_dialog_button_stop, listener)
|
||||||
.setNegativeButton(R.string.accessibility_dialog_button_cancel, listener)
|
.setNegativeButton(R.string.accessibility_dialog_button_cancel, listener)
|
||||||
.create();
|
.create();
|
||||||
|
|
||||||
return dialog;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the service name and bidi wrap it to protect from bidi side effects.
|
// Get the service name and bidi wrap it to protect from bidi side effects.
|
||||||
|
|||||||
Reference in New Issue
Block a user