mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-11-27 00:51:35 +00:00
commit
2b4a959061
@ -28,6 +28,7 @@ static const std::string PHY_ROTATION_OFFSET = system::GetParameter("const.windo
|
||||
static const std::string SINGLE_DISPLAY = "1";
|
||||
static const std::string DUAL_DISPLAY = "2";
|
||||
static const std::string SINGLE_POCKET_DISPLAY = "4";
|
||||
static const std::string SUPER_FOLD_DISPLAY = "5";
|
||||
static const std::string DEFAULT_OFFSET = "0";
|
||||
}
|
||||
class FoldScreenStateInternel {
|
||||
@ -73,6 +74,18 @@ public:
|
||||
return foldTypes[0] == SINGLE_POCKET_DISPLAY;
|
||||
}
|
||||
|
||||
static bool IsSuperFoldDisplayDevice()
|
||||
{
|
||||
if (!IsValidFoldType(g_foldScreenType)) {
|
||||
return false;
|
||||
}
|
||||
std::vector<std::string> foldTypes = StringSplit(g_foldScreenType, ',');
|
||||
if (foldTypes.empty()) {
|
||||
return false;
|
||||
}
|
||||
return foldTypes[0] == SUPER_FOLD_DISPLAY;
|
||||
}
|
||||
|
||||
static std::vector<std::string> StringSplit(const std::string& str, char delim)
|
||||
{
|
||||
std::size_t previous = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user