package com.openxc.openxcdiagnostic.util;

import android.app.Activity;
import android.app.AlertDialog;

public class DialogLauncher {

    public static void launchAlert(Activity context, String title, String message) {
        
        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        builder.setMessage(message);
        builder.setTitle(title);
        builder.setPositiveButton("Done", null);
        builder.create().show();
    }
    
    public static void launchAlert(Activity context, String title, String message, String doneButton) {
        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        builder.setMessage(message);
        builder.setTitle(title);
        builder.setPositiveButton(doneButton, null);
        builder.create().show();
    }
    
}

@@ -187,32 +187,44 @@
 t, String title,
+%0A           
  String message)
@@ -238,230 +238,49 @@
     
-%0A        AlertDialog.Builder builder = new AlertDialog.Builder(context);%0A        builder.setMessage(message);%0A        builder.setTitle(title);%0A        builder.setPositiveButton(%22Done%22, null);%0A        builder.create().show(
+launchAlert(context, title, message, %22OK%22
 );%0A 
@@ -284,20 +284,16 @@
 ;%0A    %7D%0A
-    
 %0A    pub
@@ -351,16 +351,28 @@
 g title,
+%0A           
  String 
@@ -635,15 +635,11 @@
 ;%0A    %7D%0A
-    
 %0A%7D%0A

Consolidate alert dialog launching.