Skip to content

Enhance DND/Focus mode with rotation timer and logging#7

Open
LRAB1 wants to merge 16 commits into
NineCSdev:mainfrom
LRAB1:main
Open

Enhance DND/Focus mode with rotation timer and logging#7
LRAB1 wants to merge 16 commits into
NineCSdev:mainfrom
LRAB1:main

Conversation

@LRAB1
Copy link
Copy Markdown
Contributor

@LRAB1 LRAB1 commented Mar 17, 2026

This pull request introduces several enhancements to project configuration, database schema, and core repository logic for better Android development workflow and feature support. The main changes include the addition of per-project code style settings, new VSCode automation tasks for Android development, and an update to the database schema and repository logic to support a new "skip on DND" (Do Not Disturb) flag for wallpaper collections. There are also improvements to DND state handling and diagnostics within the repository.

Development Environment Configuration:

  • Added per-project code style configuration for Java, Kotlin, and XML in .idea/codeStyles/Project.xml and enabled usage of these settings in .idea/codeStyles/codeStyleConfig.xml. [1] [2]
  • Introduced a set of Android development tasks in .vscode/tasks.json, including ADB wireless pairing/connection and install/launch automation for debug APKs.

Database and Model Enhancements:

  • Updated the Room database schema (app/schemas/com.ninecsdev.wallpaperchanger.data.local.AppDatabase/2.json) to add a new skipOnDnd (INTEGER NOT NULL) column to the collections table, reflecting the new flag for skipping collections during DND mode. [1] [2] [3]

Repository and Logic Updates:

  • Modified WallpaperRepository to support the skipOnDnd flag in collection creation and update methods (importFolderAsCollection, createManualCollection, and updateCollection). These methods now accept and persist the new flag. [1] [2] [3] [4] [5]
  • Improved DND (Do Not Disturb) state handling by adding a fast-path cache for Nothing OS Focus Mode, a diagnostic structure, and relevant imports for notification policy management. [1] [2] [3]

Permissions:

  • Added the android.permission.ACCESS_NOTIFICATION_POLICY permission to AndroidManifest.xml to allow the app to check and respond to DND state.
  • Note: Not happy with the implementation of the permission request (it gets mentioned when setting DND follow) but no screen exists yet to inform the user why we suddenly leave the app screen to get to a permission menu in the device settings.

@LRAB1 LRAB1 marked this pull request as ready for review March 17, 2026 23:59
Copilot AI and others added 5 commits March 18, 2026 00:03
…ggle

Co-authored-by: LRAB1 <110101676+LRAB1@users.noreply.github.com>
refactor: remove unused picker mode state and related logic
…-screen

Add DND permission rationale dialog before navigating to system settings
@LRAB1 LRAB1 marked this pull request as draft March 18, 2026 00:43
@LRAB1 LRAB1 marked this pull request as ready for review March 18, 2026 00:43
@NineCSdev
Copy link
Copy Markdown
Owner

First, thanks for opening this PR and for the effort you put into it. I like the overall goal, especially adding DnD/Focus-aware behavior and improving diagnostics.

Before merge, I’d like to align on a few design points:

  1. DnD scope (main concern)
    From a product perspective, DnD/Focus is a device-level context, so I expect this behavior to be app-level first (one global setting).
    I’m not convinced yet that per-collection DnD is the right default design, because if users want different behavior they would still need to manually switch active collections in the app in addition to enabling DnD at system level. That workflow is not very clear to me.
    I’m open to discussing per-collection overrides, but I’d like to understand the use case better first.
    If you have a concrete scenario where per-collection control clearly improves UX, please share it and we can decide together.

  2. Model/schema changes should be avoided when possible
    In general, I want to avoid model changes unless they are clearly necessary.
    If we can implement this as an app-level setting, we may avoid modifying WallpaperCollection and avoid DB/schema impact entirely.

  3. Data model and migration safety
    If skipOnDnd remains in the collection model, we need a proper DB version bump and migration path for existing users.
    Also, I’m seeing a crash when running this PR on my device, and this may be related to migration/schema changes.

  4. Delay setting scope
    I noticed this PR also includes user-selectable delay (which addresses an existing TODO). I plan to implement delay customization myself as part of an upcoming settings screen work, so please remove delay-related feature changes from this PR to avoid duplicated effort.

  5. Runtime DnD decision path
    Please consolidate DnD decision-making into one clear runtime path so behavior is predictable and easier to maintain across devices.

  6. PR hygiene
    Please remove IDE/machine-specific files from the PR (.idea and .vscode local state and similar environment-specific artifacts).

  7. Tests policy for now
    Thanks for adding tests. For now I’m keeping this project test-light, so I’m not merging test files in feature PRs yet.
    Please remove test files from this PR so we keep scope focused; we can revisit a formal testing strategy in a separate discussion.

If you want, we can resolve point 1 first (global-only vs global + override), and then finalize the implementation accordingly.

@LRAB1
Copy link
Copy Markdown
Contributor Author

LRAB1 commented Mar 30, 2026

I'll try and look into it this week. The global-only was an oversight on my part, will be adjusting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants