diff -Naur packages.orig/apps/Trebuchet/res/layout/app_drawer_container.xml packages/apps/Trebuchet/res/layout/app_drawer_container.xml
--- packages.orig/apps/Trebuchet/res/layout/app_drawer_container.xml	2016-03-18 09:04:40.934249449 +0100
+++ packages/apps/Trebuchet/res/layout/app_drawer_container.xml	2015-07-01 12:03:18.000000000 +0200
@@ -82,4 +82,36 @@
                 android:visibility="invisible"
                 android:layout_height="100dp" />
     </RelativeLayout>
+    <RelativeLayout
+            android:id="@+id/lock_container"
+            android:layout_width="wrap_content"
+            android:layout_height="wrap_content"
+            android:layout_gravity="top|right"
+            android:clipToPadding="false">
+        <Button
+                android:id="@+id/lockIndicator_unlocked"
+                android:layout_margin="10dp"
+                android:layout_width="220dp"
+                android:textSize="24sp"
+                android:gravity="center_horizontal|top"
+                android:textColor="@android:color/black"
+                android:clickable="false"
+                android:drawableLeft="@drawable/folder_unlock"
+                android:text="@string/lock_unlocked"
+                android:paddingLeft="18dp"
+                android:layout_height="60dp" />
+        <Button
+                android:id="@+id/lockIndicator_locked"
+                android:layout_margin="10dp"
+                android:layout_width="220dp"
+                android:textSize="24sp"
+                android:gravity="center_horizontal|top"
+                android:textColor="@android:color/black"
+                android:clickable="false"
+                android:drawableLeft="@drawable/folder_lock"
+                android:text="@string/lock_locked"
+                android:visibility="invisible"
+                android:paddingLeft="18dp"
+                android:layout_height="60dp" />
+    </RelativeLayout>
 </FrameLayout>
diff -Naur packages.orig/apps/Trebuchet/res/layout/password_dialog.xml packages/apps/Trebuchet/res/layout/password_dialog.xml
--- packages.orig/apps/Trebuchet/res/layout/password_dialog.xml	1970-01-01 01:00:00.000000000 +0100
+++ packages/apps/Trebuchet/res/layout/password_dialog.xml	2015-06-30 10:04:51.000000000 +0200
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<LinearLayout
+    android:layout_height="match_parent"
+    android:layout_width="match_parent"
+    android:orientation="vertical"
+    android:id="@+id/root"
+    xmlns:android="http://schemas.android.com/apk/res/android">
+    <TextView
+        android:layout_height="wrap_content"
+        android:layout_width="wrap_content"
+        android:id="@+id/TextView_Pwd1"
+        android:text="@string/settings_password"
+        android:textStyle="bold" />
+    <EditText
+        android:layout_height="wrap_content"
+        android:layout_width="match_parent"
+        android:id="@+id/EditText_Pwd1"
+        android:inputType="textPassword" />
+    <TextView
+        android:layout_height="wrap_content"
+        android:layout_width="match_parent"
+        android:id="@+id/TextView_PwdProblem"
+        android:textStyle="bold"
+        android:gravity="center" />
+</LinearLayout>
+
diff -Naur packages.orig/apps/Trebuchet/res/values/preferences_defaults.xml packages/apps/Trebuchet/res/values/preferences_defaults.xml
--- packages.orig/apps/Trebuchet/res/values/preferences_defaults.xml	2016-03-18 09:04:40.946249449 +0100
+++ packages/apps/Trebuchet/res/values/preferences_defaults.xml	2015-07-16 08:20:28.000000000 +0200
@@ -14,5 +14,5 @@
     <bool name="preferences_interface_general_icons_large_default">@bool/config_largeIcons</bool>
     <string name="preferences_interface_general_icons_text_font_family_default">sans-serif-condensed</string>
     <integer name="preferences_interface_general_icons_text_font_style_default">0</integer>
-    <integer name="preferences_interface_drawer_type_default">1</integer>
+    <integer name="preferences_interface_drawer_type_default">0</integer>
 </resources>
diff -Naur packages.orig/apps/Trebuchet/res/values/strings.xml packages/apps/Trebuchet/res/values/strings.xml
--- packages.orig/apps/Trebuchet/res/values/strings.xml	2016-03-18 09:04:40.946249449 +0100
+++ packages/apps/Trebuchet/res/values/strings.xml	2015-07-01 11:12:10.000000000 +0200
@@ -308,4 +308,13 @@
     <string name="abandoned_promise_explanation">The app for this icon isn\'t installed.
         You can remove it, or search for the app and install it manually.
     </string>
+
+    <!-- Password dialog -->
+    <string name="settings_password">Clave:</string>
+    <string name="settings_pwd_equal"> </string>
+    <string name="settings_pwd_not_equal">Clave incorrecta</string>
+
+    <!-- Lock/unlock -->
+    <string name="lock_unlocked">unlocked</string>
+    <string name="lock_locked">locked</string>
 </resources>
diff -Naur packages.orig/apps/Trebuchet/src/com/android/launcher3/AppDrawerListAdapter.java packages/apps/Trebuchet/src/com/android/launcher3/AppDrawerListAdapter.java
--- packages.orig/apps/Trebuchet/src/com/android/launcher3/AppDrawerListAdapter.java	2016-03-18 09:04:40.946249449 +0100
+++ packages/apps/Trebuchet/src/com/android/launcher3/AppDrawerListAdapter.java	2015-07-16 09:46:39.000000000 +0200
@@ -101,12 +101,12 @@
         }
 
         public static DrawerType getModeForValue(int value) {
-            switch (value) {
-                case 1:
-                    return Pager;
-                default :
+            //switch (value) {
+            //    case 1:
+            //        return Pager;
+            //    default :
                     return Drawer;
-            }
+            //}
         }
     }
 
diff -Naur packages.orig/apps/Trebuchet/src/com/android/launcher3/Launcher.java packages/apps/Trebuchet/src/com/android/launcher3/Launcher.java
--- packages.orig/apps/Trebuchet/src/com/android/launcher3/Launcher.java	2016-03-18 09:04:40.954249449 +0100
+++ packages/apps/Trebuchet/src/com/android/launcher3/Launcher.java	2015-07-16 11:25:42.000000000 +0200
@@ -107,6 +107,7 @@
 import android.view.inputmethod.InputMethodManager;
 import android.widget.Advanceable;
 import android.widget.FrameLayout;
+import android.widget.EditText;
 import android.widget.ImageView;
 import android.widget.PopupMenu;
 import android.widget.TextView;
@@ -178,6 +179,9 @@
 
     private static final int REQUEST_LOCK_PATTERN = 14;
 
+    /** For the password dialog */
+    private static final int DIALOG_PASSWORD = 3;
+
     /**
      * IntentStarter uses request codes starting with this. This must be greater than all activity
      * request codes used internally.
@@ -309,6 +313,10 @@
     private AppDrawerListAdapter mAppDrawerAdapter;
     private AppDrawerScrubber mScrubber;
 
+    private boolean mLocked = true;
+    private View mLockUnlocked;
+    private View mLockLocked;
+
     protected SearchDropTargetBar mSearchDropTargetBar;
     private AppsCustomizeTabHost mAppsCustomizeTabHost;
     private AppsCustomizePagedView mAppsCustomizeContent;
@@ -561,6 +569,7 @@
                 "cyanogenmod.intent.action.PROTECTED_COMPONENT_UPDATE");
         registerReceiver(protectedAppsChangedReceiver, protectedAppsFilter,
                 "cyanogenmod.permission.PROTECTED_APP", null);
+        lockLoad();
     }
 
     @Override
@@ -573,10 +582,11 @@
         mHideIconLabels = SettingsProvider.getBoolean(this,
                 SettingsProvider.SETTINGS_UI_HOMESCREEN_HIDE_ICON_LABELS,
                 R.bool.preferences_interface_homescreen_hide_icon_labels_default);
-        mDrawerType = AppDrawerListAdapter.DrawerType.getModeForValue(
-                SettingsProvider.getInt(this,
-                        SettingsProvider.SETTINGS_UI_DRAWER_TYPE,
-                        R.integer.preferences_interface_drawer_type_default));
+        //mDrawerType = AppDrawerListAdapter.DrawerType.getModeForValue(
+        //        SettingsProvider.getInt(this,
+        //                SettingsProvider.SETTINGS_UI_DRAWER_TYPE,
+        //                R.integer.preferences_interface_drawer_type_default));
+        mDrawerType = AppDrawerListAdapter.DrawerType.Drawer;
 
         // Determine the dynamic grid properties
         Point smallestSize = new Point();
@@ -621,6 +631,53 @@
         }
     }
 
+    private boolean lockLoad() {
+        android.content.SharedPreferences preferences = getPreferences(Context.MODE_PRIVATE);
+        mLocked=preferences.getBoolean("locked", true);
+        if(mLockLocked != null && mLockUnlocked != null ) {
+            if(mLocked==true) {
+                mLockUnlocked.setVisibility(View.INVISIBLE);
+                mLockLocked.setVisibility(View.VISIBLE);
+            } else {
+                mLockLocked.setVisibility(View.INVISIBLE);
+                mLockUnlocked.setVisibility(View.VISIBLE);
+            }
+        }
+        return(mLocked);
+    }
+
+    private void lockSave() {
+        android.content.SharedPreferences preferences = getPreferences(Context.MODE_PRIVATE);
+        android.content.SharedPreferences.Editor editor = preferences.edit();
+        editor.putBoolean("locked", mLocked);
+        return;
+    }
+
+    private void initializeLockIndicator() {
+        if (mLockUnlocked == null || mLockLocked == null) {
+            FrameLayout view = (FrameLayout) findViewById(R.id.app_drawer_container);
+            mLockUnlocked = (View) view.findViewById(R.id.lockIndicator_unlocked);
+            mLockUnlocked.setOnClickListener(new View.OnClickListener() {
+                 public void onClick(View v) {
+                    mLocked=true;
+                    mLockUnlocked.setVisibility(View.INVISIBLE);
+                    mLockLocked.setVisibility(View.VISIBLE);
+                    lockSave();
+                 }
+            });
+            mLockLocked = (View) view.findViewById(R.id.lockIndicator_locked);
+            mLockLocked.setOnClickListener(new View.OnClickListener() {
+                 public void onClick(View v) {
+                    mLocked=false;
+                    mLockLocked.setVisibility(View.INVISIBLE);
+                    mLockUnlocked.setVisibility(View.VISIBLE);
+                    lockSave();
+                 }
+            });
+        }
+        lockLoad();
+    }
+
     public void updateScrubber() {
         mScrubber.updateSections();
     }
@@ -937,7 +994,7 @@
                         exitSpringLoadedDragModeDelayed(false, 0, null);
                     }
                 };
-                if (workspaceLocked) {
+                if (workspaceLocked || mLocked) {
                     // No need to remove the empty screen if we're mid-binding, as the
                     // the bind will not add the empty screen.
                     mWorkspace.postDelayed(onComplete, ON_ACTIVITY_RESULT_ANIMATION_DELAY);
@@ -946,7 +1003,7 @@
                             ON_ACTIVITY_RESULT_ANIMATION_DELAY, false);
                 }
             } else {
-                if (!workspaceLocked) {
+                if (!(workspaceLocked || mLocked)) {
                     if (mPendingAddInfo.container == LauncherSettings.Favorites.CONTAINER_DESKTOP) {
                         // When the screen id represents an actual screen (as opposed to a rank)
                         // we make sure that the drop page actually exists.
@@ -979,7 +1036,7 @@
                 // Update the widget view.
                 PendingAddArguments args = preparePendingAddArgs(requestCode, data,
                         pendingAddWidgetId, mPendingAddInfo);
-                if (workspaceLocked) {
+                if (workspaceLocked || mLocked) {
                     sPendingAddItem = args;
                 } else {
                     completeAdd(args);
@@ -997,7 +1054,7 @@
         if (resultCode == RESULT_OK && mPendingAddInfo.container != ItemInfo.NO_ID) {
             final PendingAddArguments args = preparePendingAddArgs(requestCode, data, -1,
                     mPendingAddInfo);
-            if (isWorkspaceLocked()) {
+            if (isWorkspaceLocked() || mLocked) {
                 sPendingAddItem = args;
             } else {
                 completeAdd(args);
@@ -1211,6 +1268,7 @@
         }
 
         updateGridIfNeeded();
+        lockLoad();
     }
 
     @Override
@@ -1272,14 +1330,17 @@
     }
 
     public void updateDrawerType() {
-        mDrawerType = AppDrawerListAdapter.DrawerType.getModeForValue(
+        /*mDrawerType = AppDrawerListAdapter.DrawerType.getModeForValue(
                 SettingsProvider.getInt(this,
                         SettingsProvider.SETTINGS_UI_DRAWER_TYPE,
                         R.integer.preferences_interface_drawer_type_default));
+                        */
+        mDrawerType=AppDrawerListAdapter.DrawerType.Drawer;
     }
 
     public AppDrawerListAdapter.DrawerType getDrawerType() {
-        return mDrawerType;
+        //return mDrawerType;
+        return AppDrawerListAdapter.DrawerType.Drawer;
     }
 
     public void onClickSortModeButton(View v) {
@@ -1478,6 +1539,7 @@
     protected void startSettings() {
         Intent settings;
         settings = new Intent(android.provider.Settings.ACTION_SETTINGS);
+        settings.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
         startActivity(settings);
         if (mWorkspace.isInOverviewMode()) {
             mWorkspace.exitOverviewMode(false);
@@ -1739,6 +1801,7 @@
                 }
             });
             initializeScrubber();
+            initializeLockIndicator();
         }
     }
 
@@ -1837,7 +1900,7 @@
 
         if (!mRestoring) {
             mWorkspace.addInScreen(view, container, screenId, cellXY[0], cellXY[1], 1, 1,
-                    isWorkspaceLocked());
+                    isWorkspaceLocked() || mLocked);
         }
     }
 
@@ -1953,7 +2016,7 @@
             launcherInfo.notifyWidgetSizeChanged(this);
 
             mWorkspace.addInScreen(launcherInfo.hostView, container, screenId, cellXY[0], cellXY[1],
-                    launcherInfo.spanX, launcherInfo.spanY, isWorkspaceLocked());
+                    launcherInfo.spanX, launcherInfo.spanY, isWorkspaceLocked() || mLocked);
 
             addWidgetToAutoAdvanceIfNeeded(launcherInfo.hostView, appWidgetInfo);
         }
@@ -2192,6 +2255,53 @@
         return mWorkspace;
     }
 
+    @Override
+    protected Dialog onCreateDialog(int id) {
+        switch (id) {
+            case DIALOG_PASSWORD:
+                LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+
+                final View layout = inflater.inflate(R.layout.password_dialog, (ViewGroup) findViewById(R.id.root));
+                final EditText password1 = (EditText) layout.findViewById(R.id.EditText_Pwd1);
+                final TextView error = (TextView) layout.findViewById(R.id.TextView_PwdProblem);
+                AlertDialog.Builder builder = new AlertDialog.Builder(this);
+                builder.setTitle("Introduce clave");
+                builder.setView(layout);
+                builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {
+                   public void onClick(DialogInterface dialog, int whichButton) {
+                      password1.setText("");
+                      removeDialog(DIALOG_PASSWORD);
+                   }
+                });
+
+                builder.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
+                   public void onClick(DialogInterface dialog, int which) {
+                      String strPassword1 = password1.getText().toString();
+                      String strPassword2 = "20021009";
+                      String strPasswordUnlock = "2002100920021009";
+                      if (strPassword1.equals(strPassword2)) {
+                         error.setText(R.string.settings_pwd_equal);
+                         showAllApps(true, AppsCustomizePagedView.ContentType.Applications, false);
+                         removeDialog(DIALOG_PASSWORD);
+                      } else if (strPassword1.equals(strPasswordUnlock)) {
+                         mLocked=false;
+                         lockSave();
+                         password1.setText("");
+                         error.setText("");
+                      } else {
+                         password1.setText("");
+                         error.setText(R.string.settings_pwd_not_equal);
+                      }
+                   }
+                });
+                AlertDialog passwordDialog = builder.create();
+                return passwordDialog;
+        }
+
+        return super.onCreateDialog(id);
+    }
+
+
     public Hotseat getHotseat() {
         return mHotseat;
     }
@@ -2406,6 +2516,8 @@
     }
 
     public void validateLockForHiddenFolders(Bundle bundle, FolderIcon info) {
+        return;
+        /*
         // Validate Lock Pattern
         Intent lockPatternActivity = new Intent();
         lockPatternActivity.setClassName(
@@ -2417,6 +2529,7 @@
         mHiddenFolderIcon = info;
         mHiddenFolderFragment = new HiddenFolderFragment();
         mHiddenFolderFragment.setArguments(bundle);
+        */
     }
 
     @Override
@@ -2741,7 +2854,7 @@
             newFolder.setTextVisible(!mHideIconLabels);
         }
         mWorkspace.addInScreen(newFolder, container, screenId, cellX, cellY, 1, 1,
-                isWorkspaceLocked());
+                isWorkspaceLocked() || mLocked);
         // Force measure the new folder icon
         CellLayout parent = mWorkspace.getParentCellLayoutForView(newFolder);
         parent.getShortcutsAndWidgets().measureChild(newFolder);
@@ -2884,15 +2997,15 @@
 
         Object tag = v.getTag();
         if (tag instanceof ShortcutInfo) {
-            onClickAppShortcut(v);
+                onClickAppShortcut(v);
         } else if (tag instanceof FolderInfo) {
             if (v instanceof FolderIcon) {
-                onClickFolderIcon(v);
+                    onClickFolderIcon(v);
             }
         } else if (v == mAllAppsButton) {
             onClickAllAppsButton(v);
         } else if (tag instanceof AppInfo) {
-            startAppShortcutOrInfoActivity(v);
+                startAppShortcutOrInfoActivity(v);
         } else if (tag instanceof LauncherAppWidgetInfo) {
             if (v instanceof PendingAppWidgetHostView) {
                 onClickPendingWidget((PendingAppWidgetHostView) v);
@@ -2991,7 +3104,8 @@
         if (isAllAppsVisible()) {
             showWorkspace(true);
         } else {
-            showAllApps(true, AppsCustomizePagedView.ContentType.Applications, false);
+            //showAllApps(true, AppsCustomizePagedView.ContentType.Applications, false);
+            showDialog(DIALOG_PASSWORD);
         }
     }
 
@@ -3307,6 +3421,7 @@
 
     public boolean startActivitySafely(View v, Intent intent, Object tag) {
         boolean success = false;
+        intent.addFlags(Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS);
         if (mIsSafeModeEnabled && !Utilities.isSystemApp(this, intent)) {
             Toast.makeText(this, R.string.safemode_shortcut_error, Toast.LENGTH_SHORT).show();
             return false;
@@ -3489,7 +3604,7 @@
 
     public boolean onLongClick(View v) {
         if (!isDraggingEnabled()) return false;
-        if (isWorkspaceLocked()) return false;
+        if (mLocked || isWorkspaceLocked()) return false;
         if (mState != State.WORKSPACE) return false;
 
         if (v instanceof Workspace) {
@@ -3519,6 +3634,8 @@
         // on hotseat items.
         final boolean inHotseat = isHotseatLayout(v);
         boolean allowLongPress = inHotseat || mWorkspace.allowLongPress();
+        if (mLocked)
+            allowLongPress = false;
         if (allowLongPress && !mDragController.isDragging()) {
             if (itemUnderLongClick == null) {
                 // User long pressed on empty space
@@ -3683,7 +3800,8 @@
         }
 
         boolean material = Utilities.isLmpOrAbove();
-        final boolean drawer = mDrawerType == AppDrawerListAdapter.DrawerType.Drawer;
+        //final boolean drawer = mDrawerType == AppDrawerListAdapter.DrawerType.Drawer;
+        final boolean drawer = true;
         final Resources res = getResources();
 
         final int duration = res.getInteger(R.integer.config_appsCustomizeZoomInTime);
diff -Naur packages.orig/apps/Trebuchet/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java packages/apps/Trebuchet/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java
--- packages.orig/apps/Trebuchet/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java	2016-03-18 09:04:40.962249449 +0100
+++ packages/apps/Trebuchet/src/com/android/launcher3/list/SettingsPinnedHeaderAdapter.java	2015-07-16 10:15:18.000000000 +0200
@@ -418,7 +418,8 @@
                 SettingsProvider.SETTINGS_UI_DRAWER_TYPE,
                 R.integer.preferences_interface_drawer_type_default);
 
-        type = (type + 1) % AppDrawerListAdapter.DrawerType.values().length;
+        //type = (type + 1) % AppDrawerListAdapter.DrawerType.values().length;
+        type = 0;
         SettingsProvider.putInt(mLauncher, SettingsProvider.SETTINGS_UI_DRAWER_TYPE, type);
 
         mLauncher.updateDrawerType();
