Skip to content

Fix crash on clean install and missing INTERNET permission#21

Merged
gx-bangsong merged 1 commit intomainfrom
fix/clean-install-crash-and-internet-perm-8671396376364523767
Mar 29, 2026
Merged

Fix crash on clean install and missing INTERNET permission#21
gx-bangsong merged 1 commit intomainfrom
fix/clean-install-crash-and-internet-perm-8671396376364523767

Conversation

@gx-bangsong
Copy link
Copy Markdown
Owner

This PR fixes a crash occurring on clean installs of the DeskClock app and resolves a missing INTERNET permission issue.

Key changes:

  • Database Schema: Updated ClockDatabaseHelper.java to include vibrationPattern and holidayOption columns in the initial table creation SQL (onCreate). This ensures that clean installs have the correct schema.
  • Database Migration: Incremented DATABASE_VERSION to 22 and added migration logic in onUpgrade for existing installs.
  • Content Provider: Updated projection maps in ClockProvider.java to include the new columns, preventing IllegalArgumentException during queries.
  • Permissions: Correctly placed the INTERNET permission tag in AndroidManifest.xml.
  • Model Classes: Updated Alarm.java and AlarmInstance.java to correctly read from and write to the database. Specifically, ensured that QUERY_COLUMNS order matches static integer indices and maintained strict field order in Alarm.java's Parcelable implementation.

Verified the changes by successfully compiling the project with Gradle.


PR created automatically by Jules for task 8671396376364523767 started by @gx-bangsong

- Updated ClockDatabaseHelper to include vibrationPattern and holidayOption columns in onCreate SQL strings.
- Added migration logic for database version 22 in onUpgrade.
- Updated ClockContract and ClockProvider projection maps for the new columns.
- Corrected INTERNET permission placement in AndroidManifest.xml.
- Updated Alarm and AlarmInstance models to handle the new fields in Cursor reading and Parcelable serialization.

Co-authored-by: gx-bangsong <146644201+gx-bangsong@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@gx-bangsong gx-bangsong merged commit 3e2da8e into main Mar 29, 2026
1 check passed
@gx-bangsong gx-bangsong deleted the fix/clean-install-crash-and-internet-perm-8671396376364523767 branch March 29, 2026 04:16
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.

1 participant