@@ -42,7 +42,7 @@ import com.sameerasw.essentials.ui.composables.configs.ScreenOffWidgetSettingsUI
4242import com.sameerasw.essentials.ui.composables.configs.EdgeLightingSettingsUI
4343import com.sameerasw.essentials.ui.composables.configs.SoundModeTileSettingsUI
4444import com.sameerasw.essentials.ui.composables.configs.QuickSettingsTilesSettingsUI
45- import com.sameerasw.essentials.ui.composables.configs.FlashlightSettingsUI
45+ import com.sameerasw.essentials.ui.composables.configs.ButtonRemapSettingsUI
4646import com.sameerasw.essentials.ui.composables.configs.DynamicNightLightSettingsUI
4747import com.sameerasw.essentials.ui.composables.configs.SnoozeNotificationsSettingsUI
4848import com.sameerasw.essentials.viewmodels.CaffeinateViewModel
@@ -68,7 +68,9 @@ class FeatureSettingsActivity : ComponentActivity() {
6868 " Flashlight toggle" to " Toggle flashlight while screen off" ,
6969 " Dynamic night light" to " Toggle based on current app" ,
7070 " Snooze system notifications" to " Automatically snooze persistent notifications" ,
71- " Quick Settings Tiles" to " All available QS tiles"
71+ " Quick Settings Tiles" to " All available QS tiles" ,
72+ " Pixel IMS" to " Force enable IMS for Pixels" ,
73+ " Button remap" to " Remap hardware buttons"
7274 )
7375 val description = featureDescriptions[feature] ? : " "
7476 setContent {
@@ -113,7 +115,7 @@ class FeatureSettingsActivity : ComponentActivity() {
113115 " Screen off widget" -> ! isAccessibilityEnabled
114116 " Statusbar icons" -> ! isWriteSecureSettingsEnabled
115117 " Edge lighting" -> ! isOverlayPermissionGranted || ! isEdgeLightingAccessibilityEnabled || ! isNotificationListenerEnabled
116- " Flashlight toggle " -> ! isAccessibilityEnabled
118+ " Button remap " -> ! isAccessibilityEnabled
117119 " Dynamic night light" -> ! isAccessibilityEnabled || ! isWriteSecureSettingsEnabled
118120 " Snooze system notifications" -> ! isNotificationListenerEnabled
119121 else -> false
@@ -193,17 +195,15 @@ class FeatureSettingsActivity : ComponentActivity() {
193195 isGranted = isNotificationListenerEnabled
194196 )
195197 )
196- " Flashlight toggle " -> listOf (
198+ " Button remap " -> listOf (
197199 PermissionItem (
198200 iconRes = R .drawable.rounded_settings_accessibility_24,
199201 title = " Accessibility Service" ,
200- description = " Required to intercept volume button presses when the screen is off " ,
202+ description = " Required to intercept hardware button events " ,
201203 dependentFeatures = PermissionRegistry .getFeatures(" ACCESSIBILITY" ),
202204 actionLabel = " Enable in Settings" ,
203205 action = {
204- val intent = Intent (Settings .ACTION_ACCESSIBILITY_SETTINGS )
205- intent.flags = Intent .FLAG_ACTIVITY_NEW_TASK
206- context.startActivity(intent)
206+ context.startActivity(Intent (Settings .ACTION_ACCESSIBILITY_SETTINGS ))
207207 },
208208 isGranted = isAccessibilityEnabled
209209 )
@@ -323,18 +323,18 @@ class FeatureSettingsActivity : ComponentActivity() {
323323 " Sound mode tile" -> {
324324 SoundModeTileSettingsUI (modifier = Modifier .padding(top = 16 .dp))
325325 }
326- " Flashlight toggle " -> {
327- FlashlightSettingsUI (
326+ " Button remap " -> {
327+ ButtonRemapSettingsUI (
328328 viewModel = viewModel,
329329 modifier = Modifier .padding(top = 16 .dp)
330330 )
331331 }
332332 " Dynamic night light" -> {
333- DynamicNightLightSettingsUI (
334- viewModel = viewModel,
335- modifier = Modifier .padding(top = 16 .dp)
336- )
337- }
333+ com.sameerasw.essentials.ui.composables.configs. DynamicNightLightSettingsUI (viewModel = viewModel)
334+ }
335+ " Pixel IMS " -> {
336+ com.sameerasw.essentials.ui.composables.configs. PixelImsSettingsUI (viewModel = viewModel )
337+ }
338338 " Snooze system notifications" -> {
339339 SnoozeNotificationsSettingsUI (
340340 viewModel = viewModel,
0 commit comments