From Android 16 QPR1 widgets are lock screen eligible by default, so the
note widget (title + preview text) and the reminders widget (titles and
descriptions) could render user content on a locked device.
Adds res/xml-v36 overrides declaring not_keyguard for both. The new note
widget is left eligible - it is only a button and leaks nothing.
ThemeOverlay.Notesnook.AppWidgetContainer declared and set
appWidgetBackgroundColor/appWidgetTextColor, but no layout ever read
them - leftovers from the Android Studio widget template, in a palette
unrelated to the app. Removes the overlay, its declare-styleable, the
android:theme references, and the light_blue_* colors that only it used.
Also replaces the hardcoded 10dp widget corner radius with
system_app_widget_background_radius on API 31+ (10dp fallback below),
so the widgets match the rest of the home screen.
updateWidgetNote scanned every key in the appPreview preferences and
rewrote any whose value contained the note id. That included the
remindersList key, so a match replaced the entire reminders list with a
note and then threw NumberFormatException parsing "remindersList" as a
widget id. hasWidgetNote had the same unguarded scan.
Match on the parsed note's id instead of on the raw JSON containing it,
and treat only keys that parse as an int as widget entries, so non-widget
keys are excluded structurally rather than by name. Also guards the casts
and gson parses that could throw on a malformed entry.
Push the reminder rows into the widget update itself via RemoteViewsCompat
instead of binding a RemoteViewsService adapter, which has been deprecated
since API 31. Removes the bound service entirely, so there is no cached
factory to invalidate and no separate notifyAppWidgetViewDataChanged step
that can race or be missed.
Adds androidx.core:core-remoteviews for the API 24-30 fallback. Row ids are
now derived from the reminder id rather than the list position, and the list
is capped at 50 rows so the update fits in a binder transaction.
Builds and publishes iOS and Android Preview apps that are instantly available to registered testers and quality assurance teams. We are using Firebase App Distribution for this purpose that works seamlessly on both android and iOS.
Signed-off-by: Ammar Ahmed <40239442+ammarahm-ed@users.noreply.github.com>