Add CUSTOM_LPNH_THRESHOLDS feature flag to customize LPNH

When this flag is enabled, new Developer Options appear which
allow you to customize the slop and timeout to invoke LPNH.

The slop is defined as a multiplier to the default edge slop
(which I discovered while looking into this - it appears to
be intended for touches along the device edge and is 50%
larger than the default touch slop; currently used by Back).

Timeout is defined in milliseconds, defaulting to 400, at least
on my device.

Bug: 301680992
Bug: 300955321
Flag: CUSTOM_LPNH_THRESHOLDS - should be no-op with default off
Test: Manual with flag on and adjusting sliders, and flag off
Change-Id: Iabc7b3706f4fdd6f0392c858b81a856e375ffd51
diff --git a/src/com/android/launcher3/LauncherPrefs.kt b/src/com/android/launcher3/LauncherPrefs.kt
index 4db2fca..324453e 100644
--- a/src/com/android/launcher3/LauncherPrefs.kt
+++ b/src/com/android/launcher3/LauncherPrefs.kt
@@ -20,6 +20,7 @@
 import android.content.SharedPreferences
 import android.content.SharedPreferences.OnSharedPreferenceChangeListener
 import android.util.Log
+import android.view.ViewConfiguration
 import androidx.annotation.VisibleForTesting
 import com.android.launcher3.BuildConfig.WIDGET_ON_FIRST_SCREEN
 import com.android.launcher3.LauncherFiles.DEVICE_PREFERENCES_KEY
@@ -309,6 +310,20 @@
                 EncryptionType.MOVE_TO_DEVICE_PROTECTED
             )
         @JvmField
+        val LONG_PRESS_NAV_HANDLE_SLOP_PERCENTAGE =
+            nonRestorableItem(
+                LauncherAppState.KEY_LONG_PRESS_NAV_HANDLE_SLOP_PERCENTAGE,
+                100,
+                EncryptionType.MOVE_TO_DEVICE_PROTECTED
+            )
+        @JvmField
+        val LONG_PRESS_NAV_HANDLE_TIMEOUT_MS =
+            nonRestorableItem(
+                LauncherAppState.KEY_LONG_PRESS_NAV_HANDLE_TIMEOUT_MS,
+                ViewConfiguration.getLongPressTimeout(),
+                EncryptionType.MOVE_TO_DEVICE_PROTECTED
+            )
+        @JvmField
         val THEMED_ICONS =
             backedUpItem(Themes.KEY_THEMED_ICONS, false, EncryptionType.MOVE_TO_DEVICE_PROTECTED)
         @JvmField val PROMISE_ICON_IDS = backedUpItem(InstallSessionHelper.PROMISE_ICON_IDS, "")