Skip to content

Use correct tablet mode function to determine mobile-ness

isTabletModeAvailable() only tells us if the device is capable of entering tablet mode, not whether it's currently in that mode. This will return true for convertible laptops and cause them to get the wrong default settings.

What we want to do is query isTabletMode() to see if the device is currently in tablet mode right now. It's still not perfect because theoretically a convertible laptop could be in tablet mode during the initial system setup (when default profiles are generated), but this is at least a rarer situation compared to the status quo, which generates mobile-specific profiles 100% of the time for that type of hardware.

Test plan: Click the "Default" button in the powerdevil KCM while using a convertible laptop.

  • Before: it generates mobile settings with short timeouts for things
  • After: it generates desktop settings with longer timeouts for things

@apol @bshah @devinlin @teams/plasma-mobile

Edited by Nate Graham

Merge request reports