Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • PowerDevil PowerDevil
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
  • Bugzilla
    • Bugzilla
  • Merge requests 18
    • Merge requests 18
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PlasmaPlasma
  • PowerDevilPowerDevil
  • Merge requests
  • !143

Use correct tablet mode function to determine mobile-ness

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Nate Graham requested to merge ngraham/powerdevil:use-correct-tablet-mode-function into master Mar 06, 2023
  • Overview 1
  • Commits 1
  • Pipelines 1
  • Changes 2

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 Mar 06, 2023 by Nate Graham
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: use-correct-tablet-mode-function