diff --git a/res/values/strings.xml b/res/values/strings.xml
index 8084a07..1802ac6 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -3092,7 +3092,7 @@
     <string name="accessibility_system_title">System</string>
     <!-- Title for the accessibility preference screen to enable screen magnification. [CHAR LIMIT=35] -->
     <string name="accessibility_screen_magnification_title">Screen magnification</string>
-    <!-- Summary for the accessibility preference screen to enable screen magnification. [CHAR LIMIT=35] -->
+    <!-- Summary for the accessibility preference screen to enable screen magnification. [CHAR LIMIT=none] -->
     <string name="accessibility_screen_magnification_summary">
         When screen magnification is on, you can\:\n\n
 
@@ -3105,6 +3105,12 @@
         Pan: Drag two or more fingers across the screen.\n
         Adjust zoom level: Pinch or expand using two or more fingers.
     </string>
+    <!-- Title for the accessibility preference screen to enable the global geture to enable accessibility. [CHAR LIMIT=35] -->
+    <string name="accessibility_global_gesture_preference_title">Global enable gesture</string>
+    <!--  Summary for the accessibility preference screen to enable the global geture to enable accessibility. [CHAR LIMIT=none] -->
+    <string name="accessibility_global_gesture_preference_summary">
+        To enable accessibility long press the power button, after a vibration or a beep long press with two fingers.
+    </string>
     <!-- Title for the accessibility preference to enable large text. [CHAR LIMIT=35] -->
     <string name="accessibility_toggle_large_text_preference_title">Large text</string>
     <!-- Title for the accessibility preference to enable screen magnification. [CHAR LIMIT=35] -->
diff --git a/res/xml/accessibility_settings.xml b/res/xml/accessibility_settings.xml
index e86dff6..15b5b2e 100644
--- a/res/xml/accessibility_settings.xml
+++ b/res/xml/accessibility_settings.xml
@@ -52,6 +52,11 @@
                 android:title="@string/accessibility_toggle_speak_password_preference_title"
                 android:persistent="false"/>
 
+        <PreferenceScreen
+                android:fragment="com.android.settings.AccessibilitySettings$ToggleGlobalGesturePreferenceFragment"
+                android:key="enable_global_gesture_preference_screen"
+                android:title="@string/accessibility_global_gesture_preference_title"/>
+
         <PreferenceScreen android:key="tts_settings_preference"
                 android:fragment="com.android.settings.tts.TextToSpeechSettings"
                 android:title="@string/tts_settings_title"/>
diff --git a/src/com/android/settings/AccessibilitySettings.java b/src/com/android/settings/AccessibilitySettings.java
index 592706c..1edff17 100644
--- a/src/com/android/settings/AccessibilitySettings.java
+++ b/src/com/android/settings/AccessibilitySettings.java
@@ -108,6 +108,8 @@
             "select_long_press_timeout_preference";
     private static final String TOGGLE_SCRIPT_INJECTION_PREFERENCE =
             "toggle_script_injection_preference";
+    private static final String ENABLE_ACCESSIBILITY_GESTURE_PREFERENCE_SCREEN =
+            "enable_global_gesture_preference_screen";
     private static final String DISPLAY_MAGNIFICATION_PREFERENCE_SCREEN =
             "screen_magnification_preference_screen";
 
@@ -168,6 +170,7 @@
     private AccessibilityEnableScriptInjectionPreference mToggleScriptInjectionPreference;
     private Preference mNoServicesMessagePreference;
     private PreferenceScreen mDisplayMagnificationPreferenceScreen;
+    private PreferenceScreen mGlobalGesturePreferenceScreen;
 
     private int mLongPressTimeoutDefault;
 
@@ -210,12 +213,6 @@
         }
         return false;
     }
-
-
-    
-    
-    
-    
     
     @Override
     public boolean onPreferenceTreeClick(PreferenceScreen preferenceScreen, Preference preference) {
@@ -231,6 +228,9 @@
         } else if (mToggleSpeakPasswordPreference == preference) {
             handleToggleSpeakPasswordPreferenceClick();
             return true;
+        } else if (mGlobalGesturePreferenceScreen == preference) {
+            handleTogglEnableAccessibilityGesturePreferenceClick();
+            return true;
         } else if (mDisplayMagnificationPreferenceScreen == preference) {
             handleDisplayMagnificationPreferenceScreenClick();
             return true;
@@ -266,6 +266,18 @@
                 mToggleSpeakPasswordPreference.isChecked() ? 1 : 0);
     }
 
+    private void handleTogglEnableAccessibilityGesturePreferenceClick() {
+        Bundle extras = mGlobalGesturePreferenceScreen.getExtras();
+        extras.putString(EXTRA_TITLE, getString(
+                R.string.accessibility_global_gesture_preference_title));
+        extras.putString(EXTRA_SUMMARY, getString(
+                R.string.accessibility_global_gesture_preference_summary));
+        extras.putBoolean(EXTRA_CHECKED, Settings.Global.getInt(getContentResolver(),
+                Settings.Global.ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED, 0) == 1);
+        super.onPreferenceTreeClick(mGlobalGesturePreferenceScreen,
+                mGlobalGesturePreferenceScreen);
+    }
+
     private void handleDisplayMagnificationPreferenceScreenClick() {
         Bundle extras = mDisplayMagnificationPreferenceScreen.getExtras();
         extras.putString(EXTRA_TITLE, getString(
@@ -325,6 +337,10 @@
         // Display magnification.
         mDisplayMagnificationPreferenceScreen = (PreferenceScreen) findPreference(
                 DISPLAY_MAGNIFICATION_PREFERENCE_SCREEN);
+
+        // Global gesture.
+        mGlobalGesturePreferenceScreen =
+                (PreferenceScreen) findPreference(ENABLE_ACCESSIBILITY_GESTURE_PREFERENCE_SCREEN);
     }
 
     private void updateAllPreferences() {
@@ -487,6 +503,17 @@
             mDisplayMagnificationPreferenceScreen.setSummary(
                     R.string.accessibility_feature_state_off);
         }
+
+        // Global gesture
+        final boolean globalGestureEnabled = Settings.Global.getInt(getContentResolver(),
+                Settings.Global.ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED, 0) == 1;
+        if (globalGestureEnabled) {
+            mGlobalGesturePreferenceScreen.setSummary(
+                    R.string.accessibility_feature_state_on);
+        } else {
+            mGlobalGesturePreferenceScreen.setSummary(
+                    R.string.accessibility_feature_state_off);
+        }
     }
 
     private void updateLockScreenRotationCheckbox() {
@@ -844,6 +871,29 @@
         }
     }
 
+    public static class ToggleGlobalGesturePreferenceFragment
+            extends ToggleFeaturePreferenceFragment {
+        @Override
+        protected void onPreferenceToggled(String preferenceKey, boolean enabled) {
+            Settings.Global.putInt(getContentResolver(),
+                    Settings.Global.ENABLE_ACCESSIBILITY_GLOBAL_GESTURE_ENABLED, enabled ? 1 : 0);
+        }
+
+        @Override
+        protected void onInstallActionBarToggleSwitch() {
+            super.onInstallActionBarToggleSwitch();
+            mToggleSwitch.setOnBeforeCheckedChangeListener(new OnBeforeCheckedChangeListener() {
+                @Override
+                public boolean onBeforeCheckedChanged(ToggleSwitch toggleSwitch, boolean checked) {
+                    toggleSwitch.setCheckedInternal(checked);
+                    getArguments().putBoolean(EXTRA_CHECKED, checked);
+                    onPreferenceToggled(mPreferenceKey, checked);
+                    return false;
+                }
+            });
+        }
+    }
+
     public static abstract class ToggleFeaturePreferenceFragment
             extends SettingsPreferenceFragment {
 
