Skip to content

Release 13 bugfixes - #301

Merged
thestinger merged 21 commits into
GrapheneOS:mainfrom
RankoR-GOS:release-13-bugfixes
Sep 18, 2026
Merged

thestinger merged 21 commits into
GrapheneOS:mainfrom
RankoR-GOS:release-13-bugfixes

Conversation

@RankoR

@RankoR RankoR commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Also closes #297, #295, #302, #303, #315, #318

@RankoR
RankoR force-pushed the release-13-bugfixes branch from 79d9e55 to 111312d Compare September 13, 2026 15:23
@RankoR
RankoR requested review from inthewaves and m4pl and removed request for inthewaves September 13, 2026 15:54
Comment thread src/com/android/messaging/ui/conversation/entry/NewChatScreen.kt
Comment thread src/com/android/messaging/ui/conversation/entry/NewChatScreen.kt
@RankoR
RankoR force-pushed the release-13-bugfixes branch from 5e17f62 to b468592 Compare September 14, 2026 21:10
@RankoR

RankoR commented Sep 14, 2026

Copy link
Copy Markdown
Contributor Author

Will fix #304 in a separate PR

@m4pl m4pl left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good to me.

Comment on lines +663 to +670

// Dropping parts took its sqlite_sequence row along, so parts._id restarts at 1.
// The notification images are named after those ids and outlive the database, so
// leaving them behind would serve one part's image as the image of whatever part
// next takes its id
for (final File image : NotificationImageProvider.listImageFiles()) {
image.delete();
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We should move this cleanup into createDatabase() instead. Messaging supplies a null database error handler, selecting Android's default handler, which attempts to delete the corrupted database: https://github.com/GrapheneOS/platform_frameworks_base/blob/01966176d7184cc5bccb4839876e661a9c03563b/core/java/android/database/DefaultDatabaseErrorHandler.java#L53-L104

If corruption is detected while opening, SQLiteDatabase invokes that handler and retries openInner(). Recovery path: https://github.com/GrapheneOS/platform_frameworks_base/blob/01966176d7184cc5bccb4839876e661a9c03563b/core/java/android/database/sqlite/SQLiteDatabase.java#L1166-L1182

If recreation succeeds, SQLiteOpenHelper sees database version zero and calls onCreate(). Version check: https://github.com/GrapheneOS/platform_frameworks_base/blob/01966176d7184cc5bccb4839876e661a9c03563b/core/java/android/database/sqlite/SQLiteOpenHelper.java#L413-L437).

Messaging’s onCreate() calls createDatabase() directly, bypassing this cleanup in rebuildTables(). Moving the loop covers that recovery path too, preventing surviving cached images from being reused for unrelated parts whose IDs match

Comment on lines +16 to 20
internal fun predictiveBackContentTransform(
@SwipeEdge swipeEdge: Int,
): ContentTransform {
return EnterTransition.None togetherWith predictiveBackExit(swipeEdge = swipeEdge)
}

@inthewaves inthewaves Sep 15, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

It's possible to see a sliding fade animation if the back gesture interrupts the opening animation, making the app appear to have two different back animations

backgesture2anims.mp4

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This comes from AnimatedContent retaining the previous screen’s cached forward-enter transition when predictive back interrupts an opening animation. NavDisplay doesn’t expose a way to replace that cached transition.

I added a workaround: while an entry is still becoming visible, back uses the ordinary pop without a predictive preview. Once settled, predictive shrink-and-push works normally. This removes the mixed slide/fade artifact, but the early-back behavior remains intentionally different. Is that acceptable?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Yes, looks fine

Overlapping passes all saw the same "nothing posted yet" state and repeated
each other's attachment decodes, which is what put the SMS_DELIVER broadcast
over its deadline.
The file was named with a fresh random id per call, so every pass decoded and
re-compressed every image again. Name it after parts._id, which is digits-only
and never reused, and drop the cache whenever the database is created, since
that restarts those ids.
Wait at most 8s for the import, then finish the broadcast. The import runs in
the application scope either way, and the message commits before the
notification pass that takes the time.
@RankoR
RankoR force-pushed the release-13-bugfixes branch from 390f492 to b978057 Compare September 16, 2026 22:08
@RankoR

RankoR commented Sep 16, 2026

Copy link
Copy Markdown
Contributor Author

Will add few more fixes of the other bugs in this PR later.

@RankoR
RankoR requested a review from inthewaves September 17, 2026 20:30
@thestinger
thestinger merged commit 496038e into GrapheneOS:main Sep 18, 2026
7 checks passed
@RankoR
RankoR deleted the release-13-bugfixes branch September 18, 2026 22:03
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.

Keyboard doesn't capitalize in messaging app

4 participants