!10547 product isolation

Merge pull request !10547 from HUMBLE./master
This commit is contained in:
openharmony_ci 2024-11-06 12:52:33 +00:00 committed by Gitee
commit 2b4a959061
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -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;