Feature: Added the ability to set a gesture to open Launcher Settings and Digital Wellbeing.

This commit is contained in:
HeCodes2Much
2024-11-28 21:30:03 +00:00
parent 0445c77a92
commit b17d66192e
3 changed files with 14 additions and 0 deletions

View File

@@ -451,6 +451,10 @@ class HomeFragment : Fragment(),
}
}
Constants.Action.OpenAppSettings -> {
trySettings()
}
Constants.Action.OpenQuickSettings -> {
appHelper.expandQuickSettings(context)
}
@@ -481,6 +485,10 @@ class HomeFragment : Fragment(),
ActionService.instance()?.takeScreenShot()
}
Constants.Action.OpenDigitalWellbing -> {
appHelper.openDigitalWellbeing(context)
}
Constants.Action.Disabled -> {}
}
}

View File

@@ -153,10 +153,12 @@ object Constants {
ShowFavoriteList,
ShowHiddenList,
OpenQuickSettings,
OpenAppSettings,
ShowRecents,
ShowWidgets,
OpenPowerDialog,
TakeScreenShot,
OpenDigitalWellbing,
Disabled;
fun getString(context: Context): String {
@@ -168,10 +170,12 @@ object Constants {
ShowFavoriteList -> context.getString(R.string.settings_actions_show_favorite_list)
ShowHiddenList -> context.getString(R.string.settings_actions_show_hidden_list)
OpenQuickSettings -> context.getString(R.string.settings_actions_open_quick_settings)
OpenAppSettings -> context.getString(R.string.settings_actions_open_launcher_settings)
ShowRecents -> context.getString(R.string.settings_actions_show_recents)
ShowWidgets -> context.getString(R.string.settings_actions_show_widgets)
OpenPowerDialog -> context.getString(R.string.settings_actions_open_power_dialog)
TakeScreenShot -> context.getString(R.string.settings_actions_take_a_screenshot)
OpenDigitalWellbing -> context.getString(R.string.settings_actions_open_digital_wellbeing)
Disabled -> context.getString(R.string.settings_actions_disabled)
}
}

View File

@@ -158,10 +158,12 @@
<string name="settings_actions_show_favorite_list">Show Favorites List</string>
<string name="settings_actions_show_hidden_list">Show Hidden List</string>
<string name="settings_actions_open_quick_settings">Open Quick Settings</string>
<string name="settings_actions_open_launcher_settings">Open Launcher Settings</string>
<string name="settings_actions_show_recents">Show Recents</string>
<string name="settings_actions_show_widgets">Show Widgets</string>
<string name="settings_actions_open_power_dialog">Open Power Dialog</string>
<string name="settings_actions_take_a_screenshot">Take a ScreenShot</string>
<string name="settings_actions_open_digital_wellbeing">Open Digital Wellbeing</string>
<string name="settings_actions_disabled">Disabled</string>
<string name="settings_units_metric">Metric</string>