Skip to content

fix(screen): keep phones with a small display size on the compact profile - #850

Merged
LeanBitLab merged 2 commits into
mainfrom
fix/phone-split-screen-profile
Nov 16, 2026
Merged

LeanBitLab merged 2 commits into
mainfrom
fix/phone-split-screen-profile

Conversation

@LeanBitLab

Copy link
Copy Markdown
Owner

Related to #843.

Problem

Since 4.3.2 the keyboard can show split on a regular phone that was never split before (4.3.1 was fine). Split defaults to on for the large screen profile, and a phone with a small display size setting can be 500dp or more wide and tall.

Cause

97c78f059 (#778) lowered the large screen limit from 600x600dp to 500x500dp so unfolded foldables (e.g. 588x706dp, also without a hinge sensor) get the unfolded layout. That limit also matches phones with a small display size, which are tall and narrow.

Fix

  • The relaxed 500dp limit now also requires a nearly square screen (long side at most 1.6 times the short side). Unfolded foldables are about 1.2, phones about 2 or more
  • 600x600dp and the hinge sensor foldable rule are unchanged
  • New test: 520x1150dp phone in portrait and landscape stays compact

Logging

The exported log only holds warnings, errors and the app's own startup lines, so the screen profile line never showed up and reports could not be matched to a screen.

  • The screen profile line now goes through the app logger
  • The startup lines now include the device model, screen size in dp and density

Testing

  • ScreenProfileTest: 13 tests pass
  • ./gradlew :app:compileStandardDebugKotlin passes
  • The reporter's actual dp is unconfirmed, so the cause is inferred from the code and the 4.3.1 to 4.3.3 timing. Not tested on a device

…file

Since 4.3.2 any screen with 500dp or more in both dimensions counted as
large, which defaults to the split keyboard. A regular phone with a small
display size setting reaches that, so it got a split keyboard it never had
before. The relaxed 500dp limit (added for unfolded foldables such as
588x706dp) now also requires a nearly square screen.
The screen profile line was written with android.util.Log, which the
exported log does not contain, so reports could not be matched to a screen.
Route it through the app logger and add the device model and screen size
to the startup lines.
@LeanBitLab
LeanBitLab merged commit 0324851 into main Nov 16, 2026
1 check passed
@LeanBitLab
LeanBitLab deleted the fix/phone-split-screen-profile branch November 16, 2026 14: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