Skip to content

Implement new DIY actions as toggles for Wi-Fi and Cellular Data - #1116

Draft
ssethhyy wants to merge 8 commits into
sameerasw:developfrom
ssethhyy:feature/actions-toggles
Draft

ssethhyy wants to merge 8 commits into
sameerasw:developfrom
ssethhyy:feature/actions-toggles

Conversation

@ssethhyy

@ssethhyy ssethhyy commented Sep 21, 2026

Copy link
Copy Markdown

Description

This PR implements new DIY actions for both Toggle Wi-Fi and Toggle Cellular Data
List of changes:

  • Added Action.ToggleWifi and Action.ToggleCellularData to Action.kt and ActionRegistry.kt.
  • Implemented isWifiEnabled using WifiManager.isWifiEnabled.
  • Implemented isCellularDataEnabled using TelephonyManager and HiddenApiBypass.
  • Implemented state checking in CombinedActionExecutor to dynamically inspect current device status and toggle Wi-Fi / Cellular Data.
  • Supported across all automation contexts (DIY Automations and Button Remapping).

Type of change

  • Bug fix
  • New feature
  • UI / visual update
  • Performance improvement
  • Refactoring / cleanup
  • Translations
  • Build / CI tooling

UI changes

N/A

Checklist

Before submitting, please make sure:

  • The base branch is set to develop (not main).
  • The app builds cleanly locally with ./gradlew assembleDebug.
  • Unit tests pass with ./gradlew testDebugUnitTest.
  • You tested the changes on a device or emulator (including Shizuku or Root if applicable).
  • [N/A] New preferences use SettingsRepository for keys and getter/setter methods.
  • [N/A] New user-facing settings are registered in FeatureRegistry.kt for search indexing.
  • [N/A] New UI follows the design system in ui/core/ (RoundedCardContainer, IconToggleItem, etc.).
  • Strings are added to res/values/strings.xml and drawables use rounded variants (R.drawable.rounded_*).

@ssethhyy
ssethhyy requested a review from sameerasw as a code owner September 21, 2026 16:03
Copilot AI lite review requested due to automatic review settings September 21, 2026 16:03
@ssethhyy ssethhyy changed the title Feature/actions toggles Implement new DIY actions as toggles for Wi-Fi and Cellular Data Sep 21, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🟡 Changes recommended

Moderate issues remain in cellular-state handling, picker persistence and lifecycle cleanup, and notification-lighting behavior.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 2 Medium severity · 1 Low severity

Open (3)
What changed in this PR

Adds state-aware Wi-Fi and cellular-data toggle actions, alongside configurable Ripple/Dash notification-lighting features.

Changes:

  • Registers and executes connectivity toggle actions.
  • Adds Ripple/Dash models, persistence, rendering, and service integration.
  • Adds lighting settings, previews, manual positioning, and supporting resources.
File Summary
app/​src/​main/​res/​values/​strings.xml Adds action and lighting strings.
app/​src/​main/​res/​drawable/​rounded_crop_portrait_24.xml Adds the Dash icon.
app/​src/​main/​java/​com/​sameerasw/​essentials/​viewmodels/​state/​RippleSettings.kt Manages Ripple settings and position.
app/​src/​main/​java/​com/​sameerasw/​essentials/​viewmodels/​state/​DashSettings.kt Manages Dash settings.
app/​src/​main/​java/​com/​sameerasw/​essentials/​viewmodels/​MainViewModel.kt Loads and forwards lighting settings.
app/​src/​main/​java/​com/​sameerasw/​essentials/​utils/​OverlayHelper.kt Integrates overlay styles.
app/​src/​main/​java/​com/​sameerasw/​essentials/​utils/​overlay/​RippleOverlay.kt Animates Ripple overlays.
app/​src/​main/​java/​com/​sameerasw/​essentials/​utils/​overlay/​RippleGlitterView.kt Renders Ripple effects.
app/​src/​main/​java/​com/​sameerasw/​essentials/​utils/​overlay/​RippleConfigIo.kt Serializes Ripple configuration.
app/​src/​main/​java/​com/​sameerasw/​essentials/​utils/​overlay/​DashOverlay.kt Renders and animates Dash overlays.
app/​src/​main/​java/​com/​sameerasw/​essentials/​utils/​overlay/​DashConfigIo.kt Serializes Dash configuration.
app/​src/​main/​java/​com/​sameerasw/​essentials/​ui/​features/​lighting/​pickers/​EdgeLightingStylePicker.kt Adds Ripple/Dash style choices.
app/​src/​main/​java/​com/​sameerasw/​essentials/​ui/​features/​lighting/​NotificationLightingSettingsUI.kt Adds lighting controls and previews.
app/​src/​main/​java/​com/​sameerasw/​essentials/​ui/​core/​sheets/​EssentialsBottomSheet.kt Adds IME padding behavior.
app/​src/​main/​java/​com/​sameerasw/​essentials/​ui/​activities/​RipplePositionPickerActivity.kt Provides manual Ripple positioning.
app/​src/​main/​java/​com/​sameerasw/​essentials/​services/​NotificationListener.kt Propagates lighting configuration.
app/​src/​main/​java/​com/​sameerasw/​essentials/​services/​NotificationLightingService.kt Displays configured lighting overlays.
app/​src/​main/​java/​com/​sameerasw/​essentials/​services/​handlers/​NotificationLightingHandler.kt Handles accessibility overlay configuration.
app/​src/​main/​java/​com/​sameerasw/​essentials/​services/​automation/​executors/​CombinedActionExecutor.kt Executes connectivity toggles.
app/​src/​main/​java/​com/​sameerasw/​essentials/​domain/​model/​RippleConfig.kt Defines Ripple configuration.
app/​src/​main/​java/​com/​sameerasw/​essentials/​domain/​model/​NotificationLightingStyle.kt Adds Ripple/Dash styles.
app/​src/​main/​java/​com/​sameerasw/​essentials/​domain/​model/​NotificationLightingRipplePosition.kt Defines Ripple positions.
app/​src/​main/​java/​com/​sameerasw/​essentials/​domain/​model/​DashConfig.kt Defines Dash configuration.
app/​src/​main/​java/​com/​sameerasw/​essentials/​domain/​diy/​ActionRegistry.kt Registers connectivity actions.
app/​src/​main/​java/​com/​sameerasw/​essentials/​domain/​diy/​Action.kt Defines toggle actions.
app/​src/​main/​java/​com/​sameerasw/​essentials/​data/​repository/​SettingsRepository.kt Adds lighting preference keys.
app/​src/​main/​AndroidManifest.xml Registers the position picker activity.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +913 to +916
result as? Boolean ?: false
} catch (e: Exception) {
e.printStackTrace()
false
Comment on lines +117 to +120
viewModel.ripple.savePositionXY(
newX.coerceIn(0f, 100f),
newY.coerceIn(0f, 100f),
)
Comment on lines +18 to +19
RIPPLE,
DASH,
@sameerasw

Copy link
Copy Markdown
Owner

@ssethhyy Hi! Appreciate the work.. Can you take a look at the conflicts and address them?

@sameerasw
sameerasw marked this pull request as draft September 22, 2026 12:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

3 participants