Merged requested to merge ngraham/powerdevil:use-correct-tablet-mode-function into master
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
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