Fix DB Migration Crash, Provider Projections, and Missing INTERNET Permission#20
Conversation
- Bumped database version to 22 in ClockDatabaseHelper. - Added vibrationPattern and holidayOption columns to alarm_templates and alarm_instances. - Implemented migration logic in onUpgrade for version 22. - Updated ClockProvider projection maps to include new columns, fixing IllegalArgumentException. - Added INTERNET permission to AndroidManifest.xml for holiday data fetching. - Updated Alarm and AlarmInstance models to support new fields in all constructors, ContentValues, and Parcelable implementations. Co-authored-by: gx-bangsong <146644201+gx-bangsong@users.noreply.github.com>
|
👋 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 New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
This PR fixes a critical crash caused by a missing database column
vibrationPatternand aSecurityExceptiondue to missingINTERNETpermission.Key changes:
vibrationPattern(TEXT) andholidayOption(INTEGER) columns to bothalarm_templatesandalarm_instancestables. Included full migration logic inClockDatabaseHelper.onUpgrade().sAlarmsWithInstancesProjection) to include the new columns. This resolves theIllegalArgumentExceptionthrown bySQLiteQueryBuilderwhen querying these columns.android.permission.INTERNETpermission, which is required byHolidayRepositoryto fetch holiday data from external APIs.AlarmandAlarmInstanceclasses to correctly read and write the new fields across all constructors,createContentValues(), andParcelableimplementations. Verified that all existing core methods were preserved.All changes have been verified to compile successfully via
./gradlew assembleDebug.PR created automatically by Jules for task 14359383749659225481 started by @gx-bangsong