--- CSipSimple-trunk.orig/CSipSimple/AndroidManifest.xml	2013-12-02 17:46:47.052035267 +0100
+++ CSipSimple-trunk/CSipSimple/AndroidManifest.xml	2013-12-09 09:11:34.518195371 +0100
@@ -552,6 +552,17 @@
         <activity
             android:name="com.csipsimple.wizards.impl.MondotalkCreate"
             android:theme="@style/DarkTheme" />
+
+        <!-- GUI for locking the app -->
+	<activity android:name="CSipSimpleLock"
+	   android:label="Lock CSipSimple" 
+	   android:icon="@drawable/ic_launcher_phone">
+		<intent-filter>
+			<action android:name="android.intent.action.MAIN" />
+			<category android:name="android.intent.category.LAUNCHER" />
+		</intent-filter>
+	</activity>
+
     </application>
 
 </manifest>
\ No hay ningún carácter de nueva línea al final del fichero
--- CSipSimple-trunk.orig/CSipSimple/src/es/sicosoft/csipsimplelock/CSipSimpleLock.java	1970-01-01 01:00:00.000000000 +0100
+++ CSipSimple-trunk/CSipSimple/src/es/sicosoft/csipsimplelock/CSipSimpleLock.java	2014-01-10 10:24:42.334475690 +0100
@@ -0,0 +1,66 @@
+package com.csipsimple;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.content.Context;
+import android.view.View;
+import android.widget.CheckBox;
+import android.widget.LinearLayout;
+import android.widget.LinearLayout.LayoutParams;
+import android.widget.TextView;
+import android.widget.CompoundButton;
+import android.widget.CompoundButton.OnCheckedChangeListener;
+
+public class CSipSimpleLock  extends Activity
+{
+    /** Called when the activity is first created. */
+    @Override
+    public void onCreate(Bundle savedInstanceState)
+    {
+        super.onCreate(savedInstanceState);
+        LinearLayout ll=new LinearLayout(this);
+        TextView tv=new TextView(this);
+        CheckBox chk=new CheckBox(this);
+        tv.setText("Despues de editar la siguiente opcion, se ha de reiniciar el CSipSimple");
+        tv.setId(5);
+        tv.setLayoutParams(new LayoutParams(LayoutParams.FILL_PARENT,LayoutParams.WRAP_CONTENT));
+        chk.setId(6);
+        chk.setText("Bloquear configuracion");
+        android.content.SharedPreferences preferences = getSharedPreferences("prefconfiglock",0);
+        boolean checked = preferences.getBoolean("configlock",false);
+        chk.setChecked(checked);
+        chk.setOnCheckedChangeListener(new OnCheckedChangeListener()
+        {
+            @Override
+            public void onCheckedChanged(CompoundButton arg0, boolean arg1) {
+                    android.content.SharedPreferences preferences = getSharedPreferences("prefconfiglock",0);
+                    android.content.SharedPreferences.Editor editor = preferences.edit();
+                    // Is the view now checked?
+                    boolean checked = arg1;
+                    editor.putBoolean("configlock", checked);
+                    editor.commit();
+            }
+        });
+        ll.setOrientation(LinearLayout.VERTICAL);
+        ll.addView(tv);
+        ll.addView(chk);
+        setContentView(ll);
+    }
+        @Override
+        public boolean onKeyDown(int keyCode, android.view.KeyEvent event)  {
+                if (keyCode == android.view.KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
+			android.widget.Toast.makeText(this,"Reinicie el terminal",android.widget.Toast.LENGTH_SHORT).show();			
+			//killself();
+                }
+                return super.onKeyDown(keyCode, event);
+        }
+
+
+    public void killself()
+    {
+	moveTaskToBack(true);
+	android.os.Process.killProcess(android.os.Process.myPid());
+	//System.exit(0);
+    }
+}
+
--- CSipSimple-trunk.orig/CSipSimple/src/com/csipsimple/ui/SipHome.java	2013-12-02 17:46:33.544035273 +0100
+++ CSipSimple-trunk/CSipSimple/src/com/csipsimple/ui/SipHome.java	2014-01-09 09:13:24.366413416 +0100
@@ -760,34 +760,37 @@
     public boolean onCreateOptionsMenu(Menu menu) {
 
         int actionRoom = getResources().getBoolean(R.bool.menu_in_bar) ? MenuItem.SHOW_AS_ACTION_IF_ROOM : MenuItem.SHOW_AS_ACTION_NEVER;
-        
-        WizardInfo distribWizard = CustomDistribution.getCustomDistributionWizard();
-        if (distribWizard != null) {
-            menu.add(Menu.NONE, DISTRIB_ACCOUNT_MENU, Menu.NONE, "My " + distribWizard.label)
-                    .setIcon(distribWizard.icon)
-                    .setShowAsAction(actionRoom);
-        }
-        if (CustomDistribution.distributionWantsOtherAccounts()) {
-            int accountRoom = actionRoom;
-            if(Compatibility.isCompatible(13)) {
-                accountRoom |= MenuItem.SHOW_AS_ACTION_WITH_TEXT;
-            }
-            menu.add(Menu.NONE, ACCOUNTS_MENU, Menu.NONE,
-                    (distribWizard == null) ? R.string.accounts : R.string.other_accounts)
-                    .setIcon(R.drawable.ic_menu_account_list)
-                    .setAlphabeticShortcut('a')
-                    .setShowAsAction( accountRoom );
-        }
-        menu.add(Menu.NONE, PARAMS_MENU, Menu.NONE, R.string.prefs)
-                .setIcon(android.R.drawable.ic_menu_preferences)
-                .setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
+	
+        android.content.SharedPreferences preferences = getSharedPreferences("prefconfiglock",0);
 
-        menu.add(Menu.NONE, HELP_MENU, Menu.NONE, R.string.help)
-                .setIcon(android.R.drawable.ic_menu_help)
-                .setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
-        menu.add(Menu.NONE, CLOSE_MENU, Menu.NONE, R.string.menu_disconnect)
-                .setIcon(R.drawable.ic_lock_power_off)
-                .setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
+        if(!preferences.getBoolean("configlock",false)) {
+            WizardInfo distribWizard = CustomDistribution.getCustomDistributionWizard();
+            if (distribWizard != null) {
+                menu.add(Menu.NONE, DISTRIB_ACCOUNT_MENU, Menu.NONE, "My " + distribWizard.label)
+                        .setIcon(distribWizard.icon)
+                        .setShowAsAction(actionRoom);
+            }
+            if (CustomDistribution.distributionWantsOtherAccounts()) {
+                        int accountRoom = actionRoom;
+                        if(Compatibility.isCompatible(13)) {
+                            accountRoom |= MenuItem.SHOW_AS_ACTION_WITH_TEXT;
+                        }
+                        menu.add(Menu.NONE, ACCOUNTS_MENU, Menu.NONE,
+                                (distribWizard == null) ? R.string.accounts : R.string.other_accounts)
+                                .setIcon(R.drawable.ic_menu_account_list)
+                                .setAlphabeticShortcut('a')
+                                .setShowAsAction( accountRoom );
+            }
+            menu.add(Menu.NONE, PARAMS_MENU, Menu.NONE, R.string.prefs)
+                    .setIcon(android.R.drawable.ic_menu_preferences)
+                    .setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
+            menu.add(Menu.NONE, HELP_MENU, Menu.NONE, R.string.help)
+                    .setIcon(android.R.drawable.ic_menu_help)
+                    .setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
+            menu.add(Menu.NONE, CLOSE_MENU, Menu.NONE, R.string.menu_disconnect)
+                    .setIcon(R.drawable.ic_lock_power_off)
+                    .setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER);
+	}
 
         return super.onCreateOptionsMenu(menu);
     }
--- CSipSimple-trunk.orig/CSipSimple/src/com/csipsimple/ui/incall/InCallControls.java	2013-12-02 17:46:32.728035274 +0100
+++ CSipSimple-trunk/CSipSimple/src/com/csipsimple/ui/incall/InCallControls.java	2014-01-10 09:39:15.054474649 +0100
@@ -29,6 +29,7 @@
 import android.util.AttributeSet;
 import android.view.View;
 import android.widget.FrameLayout;
+import android.content.SharedPreferences;
 
 import com.actionbarsherlock.internal.view.menu.ActionMenuPresenter;
 import com.actionbarsherlock.internal.view.menu.ActionMenuView;
@@ -57,7 +58,6 @@
     private MenuBuilder btnMenuBuilder;
 	private boolean supportMultipleCalls = false;
 
-
 	public InCallControls(Context context) {
         this(context, null, 0);
     }
@@ -65,6 +65,21 @@
 	public InCallControls(Context context, AttributeSet attrs) {
 		this(context, attrs, 0);
 	}
+    public boolean lockButtons() {
+		android.content.SharedPreferences preferences = getContext().getSharedPreferences("prefconfiglock",0);
+		boolean configlocked=preferences.getBoolean("configlock",false);
+		if(configlocked) {
+			btnMenuBuilder.findItem(R.id.bluetoothButton).setEnabled(false).setVisible(false);
+			btnMenuBuilder.findItem(R.id.addCallButton).setEnabled(false).setVisible(false);
+			btnMenuBuilder.findItem(R.id.mediaSettingsButton).setEnabled(false).setVisible(false);
+		} else {
+			btnMenuBuilder.findItem(R.id.bluetoothButton).setEnabled(true).setVisible(true);
+			btnMenuBuilder.findItem(R.id.addCallButton).setEnabled(true).setVisible(true);
+			btnMenuBuilder.findItem(R.id.mediaSettingsButton).setEnabled(true).setVisible(true);
+		}
+		this.invalidate();
+		return configlocked;
+    }
 	
     public InCallControls(Context context, AttributeSet attrs, int style) {
         super(context, attrs, style);
@@ -173,7 +188,10 @@
 	public void setMediaState(MediaState mediaState) {
 		lastMediaState = mediaState;
 
-        // Update menu
+	        // Update menu
+		boolean configlocked=lockButtons();
+		android.content.SharedPreferences preferences = getContext().getSharedPreferences("prefconfiglock",0);
+
 		// BT
 		boolean enabled, checked;
 		if(lastMediaState == null) {
@@ -183,7 +201,8 @@
     		enabled = callOngoing && lastMediaState.canBluetoothSco;
     		checked = lastMediaState.isBluetoothScoOn;
 		}
-        btnMenuBuilder.findItem(R.id.bluetoothButton).setVisible(enabled).setChecked(checked);
+		if(!configlocked) 
+		        btnMenuBuilder.findItem(R.id.bluetoothButton).setVisible(enabled).setChecked(checked);
         
         // Mic
         if(lastMediaState == null) {
@@ -209,12 +228,17 @@
         btnMenuBuilder.findItem(R.id.speakerButton).setVisible(enabled).setChecked(checked);
         
         // Add call
-        btnMenuBuilder.findItem(R.id.addCallButton).setVisible(supportMultipleCalls && callOngoing);
+	if(!configlocked) 
+        	btnMenuBuilder.findItem(R.id.addCallButton).setVisible(supportMultipleCalls && callOngoing);
 	}
 
     @Override
     public boolean onMenuItemSelected(MenuBuilder menu, MenuItem item) {
         int id = item.getItemId();
+	android.content.SharedPreferences preferences = getContext().getSharedPreferences("prefconfiglock",0);
+	boolean configlocked=preferences.getBoolean("configlock",false);
+	if(configlocked && (id==R.id.bluetoothButton || id==R.id.addCallButton || id==R.id.mediaSettingsButton))
+		return true; // Config locked, do nothing
         if (item.isCheckable()) {
             item.setChecked(!item.isChecked());
         }
