Merge "(3/n) Handling long-pressed action for One-handed mode Quick Settings tile"
diff --git a/AndroidManifest.xml b/AndroidManifest.xml
index a226812..db1211b 100644
--- a/AndroidManifest.xml
+++ b/AndroidManifest.xml
@@ -4246,6 +4246,25 @@
                   android:theme="@style/SudThemeGlif.Light">
         </activity>
 
+        <activity
+            android:name="Settings$OneHandedSettingsActivity"
+            android:label="@string/one_handed_title"
+            android:exported="true"
+            android:enabled="true">
+            <intent-filter android:priority="1">
+                <action android:name="android.intent.action.ONE_HANDED_SETTINGS" />
+                <category android:name="android.intent.category.DEFAULT" />
+            </intent-filter>
+            <intent-filter android:priority="1">
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="com.android.settings.SHORTCUT" />
+            </intent-filter>
+            <meta-data android:name="com.android.settings.FRAGMENT_CLASS"
+                   android:value="com.android.settings.gestures.OneHandedSettings"/>
+            <meta-data android:name="com.android.settings.PRIMARY_PROFILE_CONTROLLED"
+                       android:value="true" />
+        </activity>
+
         <!-- This is the longest AndroidManifest.xml ever. -->
     </application>
 </manifest>
diff --git a/src/com/android/settings/Settings.java b/src/com/android/settings/Settings.java
index 39ff8f3..9e3d7e6 100644
--- a/src/com/android/settings/Settings.java
+++ b/src/com/android/settings/Settings.java
@@ -325,4 +325,9 @@
     public static class AppDashboardActivity extends SettingsActivity {}
 
     public static class AdaptiveBrightnessActivity extends SettingsActivity { /* empty */ }
+
+    /**
+     * Activity for OneHandedSettings
+     */
+    public static class OneHandedSettingsActivity extends SettingsActivity { /* empty */ }
 }
diff --git a/src/com/android/settings/core/gateway/SettingsGateway.java b/src/com/android/settings/core/gateway/SettingsGateway.java
index 6897a09..eaf010a 100644
--- a/src/com/android/settings/core/gateway/SettingsGateway.java
+++ b/src/com/android/settings/core/gateway/SettingsGateway.java
@@ -100,6 +100,7 @@
 import com.android.settings.gestures.DoubleTapScreenSettings;
 import com.android.settings.gestures.DoubleTwistGestureSettings;
 import com.android.settings.gestures.GestureNavigationSettingsFragment;
+import com.android.settings.gestures.OneHandedSettings;
 import com.android.settings.gestures.PickupGestureSettings;
 import com.android.settings.gestures.PowerMenuSettings;
 import com.android.settings.gestures.SwipeToNotificationSettings;
@@ -321,7 +322,8 @@
             NetworkProviderSettings.class.getName(),
             AlarmsAndRemindersDetails.class.getName(),
             MediaManagementAppsDetails.class.getName(),
-            AutoBrightnessSettings.class.getName()
+            AutoBrightnessSettings.class.getName(),
+            OneHandedSettings.class.getName()
     };
 
     public static final String[] SETTINGS_FOR_RESTRICTED = {