mirror of
https://gitee.com/openharmony/window_window_manager
synced 2024-11-23 06:50:40 +00:00
commit
49562037cd
@ -27,7 +27,7 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "Display"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "Display"};
|
||||
}
|
||||
class Display::Impl : public RefBase {
|
||||
public:
|
||||
|
@ -29,13 +29,13 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManager"};
|
||||
const static uint32_t MAX_RETRY_NUM = 6;
|
||||
const static uint32_t RETRY_WAIT_MS = 500;
|
||||
const static uint32_t MAX_DISPLAY_SIZE = 32;
|
||||
const static uint32_t MAX_INTERVAL_US = 25000;
|
||||
std::atomic<bool> g_dmIsDestroyed = false;
|
||||
std::mutex snapBypickerMutex;
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManager"};
|
||||
const static uint32_t MAX_RETRY_NUM = 6;
|
||||
const static uint32_t RETRY_WAIT_MS = 500;
|
||||
const static uint32_t MAX_DISPLAY_SIZE = 32;
|
||||
const static uint32_t MAX_INTERVAL_US = 25000;
|
||||
std::atomic<bool> g_dmIsDestroyed = false;
|
||||
std::mutex snapBypickerMutex;
|
||||
}
|
||||
WM_IMPLEMENT_SINGLE_INSTANCE(DisplayManager)
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerAdapter"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerAdapter"};
|
||||
}
|
||||
WM_IMPLEMENT_SINGLE_INSTANCE(DisplayManagerAdapter)
|
||||
WM_IMPLEMENT_SINGLE_INSTANCE(ScreenManagerAdapter)
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "Screen"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "Screen"};
|
||||
}
|
||||
class Screen::Impl : public RefBase {
|
||||
public:
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "ScreenGroup"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "ScreenGroup"};
|
||||
}
|
||||
class ScreenGroup::Impl : public RefBase {
|
||||
public:
|
||||
|
@ -27,8 +27,8 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "ScreenManager"};
|
||||
const static uint32_t MAX_SCREEN_SIZE = 32;
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "ScreenManager"};
|
||||
const static uint32_t MAX_SCREEN_SIZE = 32;
|
||||
}
|
||||
class ScreenManager::Impl : public RefBase {
|
||||
public:
|
||||
|
@ -24,7 +24,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerAgentProxy"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerAgentProxy"};
|
||||
}
|
||||
|
||||
void DisplayManagerAgentProxy::NotifyDisplayPowerEvent(DisplayPowerEvent event, EventStatus status)
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerAgentStub"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerAgentStub"};
|
||||
}
|
||||
|
||||
int32_t DisplayManagerAgentStub::OnRemoteRequest(uint32_t code, MessageParcel& data,
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayLite"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayLite"};
|
||||
}
|
||||
class DisplayLite::Impl : public RefBase {
|
||||
public:
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerAdapterLite"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerAdapterLite"};
|
||||
}
|
||||
WM_IMPLEMENT_SINGLE_INSTANCE(DisplayManagerAdapterLite)
|
||||
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerLite"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerLite"};
|
||||
}
|
||||
WM_IMPLEMENT_SINGLE_INSTANCE(DisplayManagerLite)
|
||||
|
||||
|
@ -22,10 +22,10 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "AbstractDisplay"};
|
||||
constexpr int32_t PAD_SCREEN_WIDTH = 2560;
|
||||
constexpr int32_t PHONE_SCREEN_WIDTH = 2160;
|
||||
constexpr float INCH_2_MM = 25.4f;
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "AbstractDisplay"};
|
||||
constexpr int32_t PAD_SCREEN_WIDTH = 2560;
|
||||
constexpr int32_t PHONE_SCREEN_WIDTH = 2160;
|
||||
constexpr float INCH_2_MM = 25.4f;
|
||||
}
|
||||
|
||||
AbstractDisplay::AbstractDisplay(DisplayId id, sptr<SupportedScreenModes>& info, sptr<AbstractScreen>& absScreen)
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "AbstractDisplayController"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "AbstractDisplayController"};
|
||||
}
|
||||
|
||||
AbstractDisplayController::AbstractDisplayController(std::recursive_mutex& mutex, DisplayStateChangeListener listener)
|
||||
|
@ -23,8 +23,8 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "AbstractScreenGroup"};
|
||||
constexpr float MAX_ZORDER = 100000.0f;
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "AbstractScreenGroup"};
|
||||
constexpr float MAX_ZORDER = 100000.0f;
|
||||
}
|
||||
|
||||
AbstractScreen::AbstractScreen(sptr<AbstractScreenController> screenController, const std::string& name, ScreenId dmsId,
|
||||
|
@ -38,10 +38,10 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "AbstractScreenController"};
|
||||
const std::string CONTROLLER_THREAD_ID = "AbstractScreenControllerThread";
|
||||
const static uint32_t MAX_RETRY_NUM = 3;
|
||||
const static uint32_t RETRY_WAIT_MS = 100;
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "AbstractScreenController"};
|
||||
const std::string CONTROLLER_THREAD_ID = "AbstractScreenControllerThread";
|
||||
const static uint32_t MAX_RETRY_NUM = 3;
|
||||
const static uint32_t RETRY_WAIT_MS = 100;
|
||||
}
|
||||
|
||||
AbstractScreenController::AbstractScreenController(std::recursive_mutex& mutex)
|
||||
|
@ -21,8 +21,8 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayCutoutController"};
|
||||
const uint32_t NO_WATERFALL_DISPLAY_COMPRESSION_SIZE = 0;
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayCutoutController"};
|
||||
const uint32_t NO_WATERFALL_DISPLAY_COMPRESSION_SIZE = 0;
|
||||
}
|
||||
|
||||
bool DisplayCutoutController::isWaterfallDisplay_ = false;
|
||||
|
@ -28,38 +28,38 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayDumper"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayDumper"};
|
||||
|
||||
constexpr int SCREEN_NAME_MAX_LENGTH = 20;
|
||||
const std::string ARG_DUMP_HELP = "-h";
|
||||
const std::string ARG_DUMP_ALL = "-a";
|
||||
const std::string ARG_DUMP_SCREEN = "-s";
|
||||
const std::string ARG_DUMP_DISPLAY = "-d";
|
||||
// set the output width of screen
|
||||
constexpr int W_SCREEN_NAME = 21;
|
||||
constexpr int W_SCREEN_TYPE = 9;
|
||||
constexpr int W_GROUP_TYPE = 8;
|
||||
constexpr int W_DMS_ID = 6;
|
||||
constexpr int W_RS_ID = 21;
|
||||
constexpr int W_ACTIVE_IDX = 10;
|
||||
constexpr int W_VIR_PIXEL_RATIO = 4;
|
||||
constexpr int W_SCREEN_ROTATION = 9;
|
||||
constexpr int W_ORIENTATION = 12;
|
||||
constexpr int W_REQUESTED_ORIENTATION = 19;
|
||||
constexpr int W_NODE_ID = 21;
|
||||
constexpr int W_MIRROR_TYPE = 11;
|
||||
constexpr int W_MIRROR_NODE_ID = 13;
|
||||
// set the output width of display
|
||||
constexpr int W_DISPLAY_ID = 10;
|
||||
constexpr int W_ABSTR_SCREEN_ID = 9;
|
||||
constexpr int W_REFRESH_RATE = 12;
|
||||
constexpr int W_DISPLAY_ROTATION = 9;
|
||||
constexpr int W_DISPLAY_ORIENTATION = 18;
|
||||
constexpr int W_DISPLAY_FREEZE_FLAG = 11;
|
||||
constexpr int W_DISPLAY_OFFSET_X = 5;
|
||||
constexpr int W_DISPLAY_OFFSET_Y = 5;
|
||||
constexpr int W_DISPLAY_WIDTH = 5;
|
||||
constexpr int W_DISPLAY_HEITHT = 5;
|
||||
constexpr int SCREEN_NAME_MAX_LENGTH = 20;
|
||||
const std::string ARG_DUMP_HELP = "-h";
|
||||
const std::string ARG_DUMP_ALL = "-a";
|
||||
const std::string ARG_DUMP_SCREEN = "-s";
|
||||
const std::string ARG_DUMP_DISPLAY = "-d";
|
||||
// set the output width of screen
|
||||
constexpr int W_SCREEN_NAME = 21;
|
||||
constexpr int W_SCREEN_TYPE = 9;
|
||||
constexpr int W_GROUP_TYPE = 8;
|
||||
constexpr int W_DMS_ID = 6;
|
||||
constexpr int W_RS_ID = 21;
|
||||
constexpr int W_ACTIVE_IDX = 10;
|
||||
constexpr int W_VIR_PIXEL_RATIO = 4;
|
||||
constexpr int W_SCREEN_ROTATION = 9;
|
||||
constexpr int W_ORIENTATION = 12;
|
||||
constexpr int W_REQUESTED_ORIENTATION = 19;
|
||||
constexpr int W_NODE_ID = 21;
|
||||
constexpr int W_MIRROR_TYPE = 11;
|
||||
constexpr int W_MIRROR_NODE_ID = 13;
|
||||
// set the output width of display
|
||||
constexpr int W_DISPLAY_ID = 10;
|
||||
constexpr int W_ABSTR_SCREEN_ID = 9;
|
||||
constexpr int W_REFRESH_RATE = 12;
|
||||
constexpr int W_DISPLAY_ROTATION = 9;
|
||||
constexpr int W_DISPLAY_ORIENTATION = 18;
|
||||
constexpr int W_DISPLAY_FREEZE_FLAG = 11;
|
||||
constexpr int W_DISPLAY_OFFSET_X = 5;
|
||||
constexpr int W_DISPLAY_OFFSET_Y = 5;
|
||||
constexpr int W_DISPLAY_WIDTH = 5;
|
||||
constexpr int W_DISPLAY_HEITHT = 5;
|
||||
}
|
||||
|
||||
DisplayDumper::DisplayDumper(const sptr<AbstractDisplayController>& abstractDisplayController,
|
||||
|
@ -19,7 +19,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerAgentController"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerAgentController"};
|
||||
}
|
||||
WM_IMPLEMENT_SINGLE_INSTANCE(DisplayManagerAgentController)
|
||||
|
||||
|
@ -30,7 +30,7 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerConfig"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerConfig"};
|
||||
}
|
||||
|
||||
std::map<std::string, bool> DisplayManagerConfig::enableConfig_;
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerProxy"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerProxy"};
|
||||
}
|
||||
|
||||
sptr<DisplayInfo> DisplayManagerProxy::GetDefaultDisplayInfo()
|
||||
|
@ -33,8 +33,8 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerService"};
|
||||
const std::string SCREEN_CAPTURE_PERMISSION = "ohos.permission.CAPTURE_SCREEN";
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerService"};
|
||||
const std::string SCREEN_CAPTURE_PERMISSION = "ohos.permission.CAPTURE_SCREEN";
|
||||
}
|
||||
WM_IMPLEMENT_SINGLE_INSTANCE(DisplayManagerService)
|
||||
const bool REGISTER_RESULT = SceneBoardJudgement::IsSceneBoardEnabled() ? false :
|
||||
|
@ -23,7 +23,7 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerServiceInner"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerServiceInner"};
|
||||
}
|
||||
WM_IMPLEMENT_SINGLE_INSTANCE(DisplayManagerServiceInner)
|
||||
|
||||
|
@ -26,8 +26,8 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerStub"};
|
||||
const static uint32_t MAX_SCREEN_SIZE = 32;
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerStub"};
|
||||
const static uint32_t MAX_SCREEN_SIZE = 32;
|
||||
}
|
||||
|
||||
int32_t DisplayManagerStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply,
|
||||
|
@ -21,7 +21,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayPowerController"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayPowerController"};
|
||||
}
|
||||
|
||||
bool DisplayPowerController::SuspendBegin(PowerStateChangeReason reason)
|
||||
|
@ -23,7 +23,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "ScreenRotationController"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "ScreenRotationController"};
|
||||
}
|
||||
|
||||
DisplayId ScreenRotationController::defaultDisplayId_ = 0;
|
||||
|
@ -23,7 +23,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "SensorConnector"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "SensorConnector"};
|
||||
|
||||
#ifdef SENSOR_ENABLE
|
||||
constexpr int64_t ORIENTATION_SENSOR_SAMPLING_RATE = 200000000; // 200ms
|
||||
|
@ -23,7 +23,7 @@ using namespace testing::ext;
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr uint32_t SLEEP_TIME_US = 100000;
|
||||
constexpr uint32_t SLEEP_TIME_US = 100000;
|
||||
}
|
||||
class DisplayManagerServiceInnerTest : public testing::Test {
|
||||
public:
|
||||
|
@ -30,7 +30,7 @@ using namespace testing::ext;
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr uint32_t SLEEP_TIME_US = 100000;
|
||||
constexpr uint32_t SLEEP_TIME_US = 100000;
|
||||
}
|
||||
class DisplayManagerServiceTest : public testing::Test {
|
||||
public:
|
||||
|
@ -31,7 +31,7 @@ using namespace testing::ext;
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr uint32_t SLEEP_TIME_IN_US = 100000; // 100ms
|
||||
constexpr uint32_t SLEEP_TIME_IN_US = 100000; // 100ms
|
||||
}
|
||||
using RemoteMocker = MockIRemoteObject;
|
||||
class DisplayManagerStubTest : public testing::Test {
|
||||
|
@ -26,7 +26,7 @@ using namespace testing::ext;
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr uint32_t SLEEP_TIME_US = 2000000;
|
||||
constexpr uint32_t SLEEP_TIME_US = 2000000;
|
||||
}
|
||||
class ScreenRotationControllerTest : public testing::Test {
|
||||
public:
|
||||
|
@ -20,7 +20,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtensionClientStubImpl"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtensionClientStubImpl"};
|
||||
}
|
||||
|
||||
void WindowExtensionClientStubImpl::OnWindowReady(const std::shared_ptr<RSSurfaceNode>& surfaceNode)
|
||||
|
@ -32,7 +32,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtensionConnection"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtensionConnection"};
|
||||
}
|
||||
|
||||
class WindowExtensionConnection::Impl : public AAFwk::AbilityConnectionStub {
|
||||
|
@ -22,7 +22,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtensionProxy"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtensionProxy"};
|
||||
}
|
||||
|
||||
void WindowExtensionClientProxy::OnWindowReady(const std::shared_ptr<RSSurfaceNode>& surfaceNode)
|
||||
|
@ -20,7 +20,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtensionClientStub"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtensionClientStub"};
|
||||
}
|
||||
int WindowExtensionClientStub::OnRemoteRequest(uint32_t code, MessageParcel& data,
|
||||
MessageParcel& reply, MessageOption& option)
|
||||
|
@ -35,7 +35,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JSWindowExtension"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JSWindowExtension"};
|
||||
}
|
||||
int JsWindowExtension::extensionCnt_ = 0;
|
||||
|
||||
|
@ -31,9 +31,9 @@ namespace Rosen {
|
||||
using namespace AbilityRuntime;
|
||||
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JSWindowExtensionContext"};
|
||||
std::shared_ptr<AppExecFwk::EventHandler> handler_;
|
||||
constexpr int32_t MIN_ARG_COUNT = 2;
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JSWindowExtensionContext"};
|
||||
std::shared_ptr<AppExecFwk::EventHandler> handler_;
|
||||
constexpr int32_t MIN_ARG_COUNT = 2;
|
||||
}
|
||||
|
||||
napi_value NapiGetUndefined(napi_env env)
|
||||
|
@ -22,7 +22,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtension"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtension"};
|
||||
}
|
||||
|
||||
WindowExtension* WindowExtension::Create(const std::unique_ptr<AbilityRuntime::Runtime>& runtime)
|
||||
|
@ -23,7 +23,7 @@ namespace OHOS {
|
||||
namespace Rosen {
|
||||
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtensionContext"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtensionContext"};
|
||||
}
|
||||
|
||||
const size_t WindowExtensionContext::CONTEXT_TYPE_ID(std::hash<const char*> {} ("WindowExtensionContext"));
|
||||
|
@ -20,7 +20,7 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtensionStub"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtensionStub"};
|
||||
}
|
||||
WindowExtensionModuleLoader::WindowExtensionModuleLoader() = default;
|
||||
WindowExtensionModuleLoader::~WindowExtensionModuleLoader() = default;
|
||||
|
@ -24,7 +24,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtensionStubImpl"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtensionStubImpl"};
|
||||
}
|
||||
|
||||
WindowExtensionStubImpl::WindowExtensionStubImpl(const std::string& windowName) : windowName_(windowName)
|
||||
|
@ -23,7 +23,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtensionProxy"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtensionProxy"};
|
||||
}
|
||||
|
||||
void WindowExtensionProxy::SetBounds(const Rect& rect)
|
||||
|
@ -19,7 +19,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtensionStub"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowExtensionStub"};
|
||||
}
|
||||
|
||||
int WindowExtensionStub::OnRemoteRequest(uint32_t code, MessageParcel& data,
|
||||
|
@ -26,13 +26,13 @@ using DisplayId = uint64_t;
|
||||
using ScreenId = uint64_t;
|
||||
|
||||
namespace {
|
||||
constexpr DisplayId DISPLAY_ID_INVALID = -1ULL;
|
||||
constexpr ScreenId SCREEN_ID_INVALID = -1ULL;
|
||||
constexpr int DOT_PER_INCH = 160;
|
||||
const static std::string DEFAULT_SCREEN_NAME = "buildIn";
|
||||
constexpr int DOT_PER_INCH_MAXIMUM_VALUE = 640;
|
||||
constexpr int DOT_PER_INCH_MINIMUM_VALUE = 80;
|
||||
constexpr uint32_t BASELINE_DENSITY = 160;
|
||||
constexpr DisplayId DISPLAY_ID_INVALID = -1ULL;
|
||||
constexpr ScreenId SCREEN_ID_INVALID = -1ULL;
|
||||
constexpr int DOT_PER_INCH = 160;
|
||||
const static std::string DEFAULT_SCREEN_NAME = "buildIn";
|
||||
constexpr int DOT_PER_INCH_MAXIMUM_VALUE = 640;
|
||||
constexpr int DOT_PER_INCH_MINIMUM_VALUE = 80;
|
||||
constexpr uint32_t BASELINE_DENSITY = 160;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -29,11 +29,11 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
const std::string RECT_FORM_KEY_POS_X = "ext_pos_x";
|
||||
const std::string RECT_FORM_KEY_POS_Y = "ext_pos_y";
|
||||
const std::string RECT_FORM_KEY_HEIGHT = "ext_pos_heigh";
|
||||
const std::string RECT_FORM_KEY_WIDTH = "ext_pos_width";
|
||||
const std::string WINDOW_ID = "ext_window_id";
|
||||
const std::string RECT_FORM_KEY_POS_X = "ext_pos_x";
|
||||
const std::string RECT_FORM_KEY_POS_Y = "ext_pos_y";
|
||||
const std::string RECT_FORM_KEY_HEIGHT = "ext_pos_heigh";
|
||||
const std::string RECT_FORM_KEY_WIDTH = "ext_pos_width";
|
||||
const std::string WINDOW_ID = "ext_window_id";
|
||||
}
|
||||
|
||||
class RSSurfaceNode;
|
||||
|
@ -28,31 +28,31 @@
|
||||
typedef struct napi_env__* napi_env;
|
||||
typedef struct napi_value__* napi_value;
|
||||
namespace OHOS::MMI {
|
||||
class PointerEvent;
|
||||
class KeyEvent;
|
||||
class AxisEvent;
|
||||
class PointerEvent;
|
||||
class KeyEvent;
|
||||
class AxisEvent;
|
||||
}
|
||||
namespace OHOS::AppExecFwk {
|
||||
class Configuration;
|
||||
class Ability;
|
||||
class Configuration;
|
||||
class Ability;
|
||||
}
|
||||
|
||||
namespace OHOS::AbilityRuntime {
|
||||
class AbilityContext;
|
||||
class Context;
|
||||
class AbilityContext;
|
||||
class Context;
|
||||
}
|
||||
|
||||
namespace OHOS::AAFwk {
|
||||
class Want;
|
||||
class WantParams;
|
||||
class Want;
|
||||
class WantParams;
|
||||
}
|
||||
|
||||
namespace OHOS::Ace {
|
||||
class UIContent;
|
||||
class UIContent;
|
||||
}
|
||||
|
||||
namespace OHOS::Media {
|
||||
class PixelMap;
|
||||
class PixelMap;
|
||||
}
|
||||
|
||||
namespace OHOS::Accessibility {
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "wm_common.h"
|
||||
|
||||
namespace OHOS::AppExecFwk {
|
||||
class Configuration;
|
||||
class Configuration;
|
||||
}
|
||||
|
||||
namespace OHOS {
|
||||
|
@ -24,15 +24,15 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
const std::map<DisplayState, DisplayStateMode> NATIVE_TO_CJ_DISPLAY_STATE_MAP {
|
||||
{ DisplayState::UNKNOWN, DisplayStateMode::STATE_UNKNOWN },
|
||||
{ DisplayState::OFF, DisplayStateMode::STATE_OFF },
|
||||
{ DisplayState::ON, DisplayStateMode::STATE_ON },
|
||||
{ DisplayState::DOZE, DisplayStateMode::STATE_DOZE },
|
||||
{ DisplayState::DOZE_SUSPEND, DisplayStateMode::STATE_DOZE_SUSPEND },
|
||||
{ DisplayState::VR, DisplayStateMode::STATE_VR },
|
||||
{ DisplayState::ON_SUSPEND, DisplayStateMode::STATE_ON_SUSPEND },
|
||||
};
|
||||
const std::map<DisplayState, DisplayStateMode> NATIVE_TO_CJ_DISPLAY_STATE_MAP {
|
||||
{ DisplayState::UNKNOWN, DisplayStateMode::STATE_UNKNOWN },
|
||||
{ DisplayState::OFF, DisplayStateMode::STATE_OFF },
|
||||
{ DisplayState::ON, DisplayStateMode::STATE_ON },
|
||||
{ DisplayState::DOZE, DisplayStateMode::STATE_DOZE },
|
||||
{ DisplayState::DOZE_SUSPEND, DisplayStateMode::STATE_DOZE_SUSPEND },
|
||||
{ DisplayState::VR, DisplayStateMode::STATE_VR },
|
||||
{ DisplayState::ON_SUSPEND, DisplayStateMode::STATE_ON_SUSPEND },
|
||||
};
|
||||
}
|
||||
static thread_local std::map<uint64_t, sptr<DisplayImpl>> g_cjDisplayMap;
|
||||
std::recursive_mutex g_mutex;
|
||||
|
@ -35,16 +35,16 @@ constexpr size_t ARGC_ONE = 1;
|
||||
constexpr size_t ARGC_TWO = 2;
|
||||
constexpr int32_t INDEX_ONE = 1;
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "JsDisplay"};
|
||||
const std::map<DisplayState, DisplayStateMode> NATIVE_TO_JS_DISPLAY_STATE_MAP {
|
||||
{ DisplayState::UNKNOWN, DisplayStateMode::STATE_UNKNOWN },
|
||||
{ DisplayState::OFF, DisplayStateMode::STATE_OFF },
|
||||
{ DisplayState::ON, DisplayStateMode::STATE_ON },
|
||||
{ DisplayState::DOZE, DisplayStateMode::STATE_DOZE },
|
||||
{ DisplayState::DOZE_SUSPEND, DisplayStateMode::STATE_DOZE_SUSPEND },
|
||||
{ DisplayState::VR, DisplayStateMode::STATE_VR },
|
||||
{ DisplayState::ON_SUSPEND, DisplayStateMode::STATE_ON_SUSPEND },
|
||||
};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "JsDisplay"};
|
||||
const std::map<DisplayState, DisplayStateMode> NATIVE_TO_JS_DISPLAY_STATE_MAP {
|
||||
{ DisplayState::UNKNOWN, DisplayStateMode::STATE_UNKNOWN },
|
||||
{ DisplayState::OFF, DisplayStateMode::STATE_OFF },
|
||||
{ DisplayState::ON, DisplayStateMode::STATE_ON },
|
||||
{ DisplayState::DOZE, DisplayStateMode::STATE_DOZE },
|
||||
{ DisplayState::DOZE_SUSPEND, DisplayStateMode::STATE_DOZE_SUSPEND },
|
||||
{ DisplayState::VR, DisplayStateMode::STATE_VR },
|
||||
{ DisplayState::ON_SUSPEND, DisplayStateMode::STATE_ON_SUSPEND },
|
||||
};
|
||||
|
||||
using GraphicCM_ColorSpaceType = enum {
|
||||
GRAPHIC_CM_COLORSPACE_NONE,
|
||||
|
@ -21,11 +21,12 @@
|
||||
#include "js_runtime_utils.h"
|
||||
#include "window_manager_hilog.h"
|
||||
#include "js_display.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
using namespace AbilityRuntime;
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "JsDisplayListener"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "JsDisplayListener"};
|
||||
}
|
||||
|
||||
JsDisplayListener::JsDisplayListener(napi_env env) : env_(env)
|
||||
|
@ -33,7 +33,7 @@ constexpr size_t ARGC_ONE = 1;
|
||||
constexpr size_t ARGC_TWO = 2;
|
||||
constexpr int32_t INDEX_ONE = 1;
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "JsDisplayManager"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "JsDisplayManager"};
|
||||
}
|
||||
|
||||
class JsDisplayManager {
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "js_extension_window_register_manager.h"
|
||||
#include "session_info.h"
|
||||
#include "window.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
class JsEmbeddableWindowStage {
|
||||
|
@ -23,7 +23,7 @@ namespace Rosen {
|
||||
using namespace AbilityRuntime;
|
||||
using namespace Ace;
|
||||
namespace {
|
||||
constexpr int32_t NUMBER_ONE = 1;
|
||||
constexpr int32_t NUMBER_ONE = 1;
|
||||
}
|
||||
|
||||
napi_value NapiGetUndefined(napi_env env)
|
||||
|
@ -31,7 +31,7 @@ using namespace AbilityRuntime;
|
||||
constexpr size_t ARGC_ONE = 1;
|
||||
constexpr size_t ARGC_TWO = 2;
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "JsScreen"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "JsScreen"};
|
||||
}
|
||||
|
||||
static thread_local std::map<ScreenId, std::shared_ptr<NativeReference>> g_JsScreenMap;
|
||||
|
@ -19,11 +19,12 @@
|
||||
#include "js_runtime_utils.h"
|
||||
#include "window_manager_hilog.h"
|
||||
#include "js_screen.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
using namespace AbilityRuntime;
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "JsScreenListener"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "JsScreenListener"};
|
||||
}
|
||||
inline uint32_t SCREEN_DISCONNECT_TYPE = 0;
|
||||
inline uint32_t SCREEN_CONNECT_TYPE = 1;
|
||||
|
@ -41,7 +41,7 @@ constexpr int32_t INDEX_ONE = 1;
|
||||
constexpr int32_t INDEX_TWO = 2;
|
||||
constexpr uint32_t MAX_SCREENS_NUM = 1000;
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "JsScreenManager"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "JsScreenManager"};
|
||||
}
|
||||
|
||||
class JsScreenManager {
|
||||
|
@ -31,12 +31,13 @@
|
||||
#include "pixel_map_napi.h"
|
||||
#include "permission.h"
|
||||
#include "singleton_container.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
using namespace AbilityRuntime;
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JsWindowManager"};
|
||||
const std::string PIP_WINDOW = "pip_window";
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JsWindowManager"};
|
||||
const std::string PIP_WINDOW = "pip_window";
|
||||
}
|
||||
|
||||
JsWindowManager::JsWindowManager() : registerManager_(std::make_unique<JsWindowRegisterManager>())
|
||||
|
@ -21,11 +21,12 @@
|
||||
#include "window_option.h"
|
||||
#include "js_window.h"
|
||||
#include "permission.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
using namespace AbilityRuntime;
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JsTransitionController"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JsTransitionController"};
|
||||
}
|
||||
|
||||
static int g_jsTransCxtCtorCnt = 0;
|
||||
|
@ -40,15 +40,15 @@ namespace OHOS {
|
||||
namespace Rosen {
|
||||
using namespace AbilityRuntime;
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JsWindow"};
|
||||
constexpr Rect g_emptyRect = {0, 0, 0, 0};
|
||||
constexpr int32_t MIN_DECOR_HEIGHT = 37;
|
||||
constexpr int32_t MAX_DECOR_HEIGHT = 112;
|
||||
constexpr size_t INDEX_ZERO = 0;
|
||||
constexpr size_t INDEX_ONE = 1;
|
||||
constexpr size_t INDEX_TWO = 2;
|
||||
constexpr double MIN_GRAY_SCALE = 0.0;
|
||||
constexpr double MAX_GRAY_SCALE = 1.0;
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JsWindow"};
|
||||
constexpr Rect g_emptyRect = {0, 0, 0, 0};
|
||||
constexpr int32_t MIN_DECOR_HEIGHT = 37;
|
||||
constexpr int32_t MAX_DECOR_HEIGHT = 112;
|
||||
constexpr size_t INDEX_ZERO = 0;
|
||||
constexpr size_t INDEX_ONE = 1;
|
||||
constexpr size_t INDEX_TWO = 2;
|
||||
constexpr double MIN_GRAY_SCALE = 0.0;
|
||||
constexpr double MAX_GRAY_SCALE = 1.0;
|
||||
}
|
||||
|
||||
static thread_local std::map<std::string, std::shared_ptr<NativeReference>> g_jsWindowMap;
|
||||
|
@ -25,7 +25,7 @@ namespace OHOS {
|
||||
namespace Rosen {
|
||||
using namespace AbilityRuntime;
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JsListener"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JsListener"};
|
||||
}
|
||||
|
||||
JsWindowListener::~JsWindowListener()
|
||||
|
@ -17,47 +17,48 @@
|
||||
#include "window_manager.h"
|
||||
#include "window_manager_hilog.h"
|
||||
#include "js_runtime_utils.h"
|
||||
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
using namespace AbilityRuntime;
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JsRegisterManager"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JsRegisterManager"};
|
||||
|
||||
const std::map<std::string, RegisterListenerType> WINDOW_MANAGER_LISTENER_MAP {
|
||||
// white register list for window manager
|
||||
{SYSTEM_BAR_TINT_CHANGE_CB, RegisterListenerType::SYSTEM_BAR_TINT_CHANGE_CB},
|
||||
{GESTURE_NAVIGATION_ENABLED_CHANGE_CB, RegisterListenerType::GESTURE_NAVIGATION_ENABLED_CHANGE_CB},
|
||||
{WATER_MARK_FLAG_CHANGE_CB, RegisterListenerType::WATER_MARK_FLAG_CHANGE_CB},
|
||||
};
|
||||
const std::map<std::string, RegisterListenerType> WINDOW_LISTENER_MAP {
|
||||
// white register list for window
|
||||
{WINDOW_SIZE_CHANGE_CB, RegisterListenerType::WINDOW_SIZE_CHANGE_CB},
|
||||
{SYSTEM_AVOID_AREA_CHANGE_CB, RegisterListenerType::SYSTEM_AVOID_AREA_CHANGE_CB},
|
||||
{AVOID_AREA_CHANGE_CB, RegisterListenerType::AVOID_AREA_CHANGE_CB},
|
||||
{LIFECYCLE_EVENT_CB, RegisterListenerType::LIFECYCLE_EVENT_CB},
|
||||
{WINDOW_EVENT_CB, RegisterListenerType::WINDOW_EVENT_CB},
|
||||
{KEYBOARD_HEIGHT_CHANGE_CB, RegisterListenerType::KEYBOARD_HEIGHT_CHANGE_CB},
|
||||
{TOUCH_OUTSIDE_CB, RegisterListenerType::TOUCH_OUTSIDE_CB},
|
||||
{SCREENSHOT_EVENT_CB, RegisterListenerType::SCREENSHOT_EVENT_CB},
|
||||
{DIALOG_TARGET_TOUCH_CB, RegisterListenerType::DIALOG_TARGET_TOUCH_CB},
|
||||
{DIALOG_DEATH_RECIPIENT_CB, RegisterListenerType::DIALOG_DEATH_RECIPIENT_CB},
|
||||
{WINDOW_STATUS_CHANGE_CB, RegisterListenerType::WINDOW_STATUS_CHANGE_CB},
|
||||
{WINDOW_TITLE_BUTTON_RECT_CHANGE_CB, RegisterListenerType::WINDOW_TITLE_BUTTON_RECT_CHANGE_CB},
|
||||
{WINDOW_VISIBILITY_CHANGE_CB, RegisterListenerType::WINDOW_VISIBILITY_CHANGE_CB},
|
||||
{WINDOW_NO_INTERACTION_DETECT_CB, RegisterListenerType::WINDOW_NO_INTERACTION_DETECT_CB},
|
||||
{WINDOW_RECT_CHANGE_CB, RegisterListenerType::WINDOW_RECT_CHANGE_CB},
|
||||
{SUB_WINDOW_CLOSE_CB, RegisterListenerType::SUB_WINDOW_CLOSE_CB},
|
||||
};
|
||||
const std::map<std::string, RegisterListenerType> WINDOW_STAGE_LISTENER_MAP {
|
||||
// white register list for window stage
|
||||
{WINDOW_STAGE_EVENT_CB, RegisterListenerType::WINDOW_STAGE_EVENT_CB},
|
||||
};
|
||||
const std::map<std::string, RegisterListenerType> WINDOW_MANAGER_LISTENER_MAP {
|
||||
// white register list for window manager
|
||||
{SYSTEM_BAR_TINT_CHANGE_CB, RegisterListenerType::SYSTEM_BAR_TINT_CHANGE_CB},
|
||||
{GESTURE_NAVIGATION_ENABLED_CHANGE_CB, RegisterListenerType::GESTURE_NAVIGATION_ENABLED_CHANGE_CB},
|
||||
{WATER_MARK_FLAG_CHANGE_CB, RegisterListenerType::WATER_MARK_FLAG_CHANGE_CB},
|
||||
};
|
||||
const std::map<std::string, RegisterListenerType> WINDOW_LISTENER_MAP {
|
||||
// white register list for window
|
||||
{WINDOW_SIZE_CHANGE_CB, RegisterListenerType::WINDOW_SIZE_CHANGE_CB},
|
||||
{SYSTEM_AVOID_AREA_CHANGE_CB, RegisterListenerType::SYSTEM_AVOID_AREA_CHANGE_CB},
|
||||
{AVOID_AREA_CHANGE_CB, RegisterListenerType::AVOID_AREA_CHANGE_CB},
|
||||
{LIFECYCLE_EVENT_CB, RegisterListenerType::LIFECYCLE_EVENT_CB},
|
||||
{WINDOW_EVENT_CB, RegisterListenerType::WINDOW_EVENT_CB},
|
||||
{KEYBOARD_HEIGHT_CHANGE_CB, RegisterListenerType::KEYBOARD_HEIGHT_CHANGE_CB},
|
||||
{TOUCH_OUTSIDE_CB, RegisterListenerType::TOUCH_OUTSIDE_CB},
|
||||
{SCREENSHOT_EVENT_CB, RegisterListenerType::SCREENSHOT_EVENT_CB},
|
||||
{DIALOG_TARGET_TOUCH_CB, RegisterListenerType::DIALOG_TARGET_TOUCH_CB},
|
||||
{DIALOG_DEATH_RECIPIENT_CB, RegisterListenerType::DIALOG_DEATH_RECIPIENT_CB},
|
||||
{WINDOW_STATUS_CHANGE_CB, RegisterListenerType::WINDOW_STATUS_CHANGE_CB},
|
||||
{WINDOW_TITLE_BUTTON_RECT_CHANGE_CB, RegisterListenerType::WINDOW_TITLE_BUTTON_RECT_CHANGE_CB},
|
||||
{WINDOW_VISIBILITY_CHANGE_CB, RegisterListenerType::WINDOW_VISIBILITY_CHANGE_CB},
|
||||
{WINDOW_NO_INTERACTION_DETECT_CB, RegisterListenerType::WINDOW_NO_INTERACTION_DETECT_CB},
|
||||
{WINDOW_RECT_CHANGE_CB, RegisterListenerType::WINDOW_RECT_CHANGE_CB},
|
||||
{SUB_WINDOW_CLOSE_CB, RegisterListenerType::SUB_WINDOW_CLOSE_CB},
|
||||
};
|
||||
const std::map<std::string, RegisterListenerType> WINDOW_STAGE_LISTENER_MAP {
|
||||
// white register list for window stage
|
||||
{WINDOW_STAGE_EVENT_CB, RegisterListenerType::WINDOW_STAGE_EVENT_CB},
|
||||
};
|
||||
|
||||
const std::map<CaseType, std::map<std::string, RegisterListenerType>> LISTENER_CODE_MAP {
|
||||
{CaseType::CASE_WINDOW_MANAGER, WINDOW_MANAGER_LISTENER_MAP},
|
||||
{CaseType::CASE_WINDOW, WINDOW_LISTENER_MAP},
|
||||
{CaseType::CASE_STAGE, WINDOW_STAGE_LISTENER_MAP},
|
||||
};
|
||||
const std::map<CaseType, std::map<std::string, RegisterListenerType>> LISTENER_CODE_MAP {
|
||||
{CaseType::CASE_WINDOW_MANAGER, WINDOW_MANAGER_LISTENER_MAP},
|
||||
{CaseType::CASE_WINDOW, WINDOW_LISTENER_MAP},
|
||||
{CaseType::CASE_STAGE, WINDOW_STAGE_LISTENER_MAP},
|
||||
};
|
||||
}
|
||||
|
||||
JsWindowRegisterManager::JsWindowRegisterManager()
|
||||
|
@ -26,8 +26,8 @@ namespace OHOS {
|
||||
namespace Rosen {
|
||||
using namespace AbilityRuntime;
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JsUtils"};
|
||||
constexpr int32_t MAX_TOUCHABLE_AREAS = 10;
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "JsUtils"};
|
||||
constexpr int32_t MAX_TOUCHABLE_AREAS = 10;
|
||||
}
|
||||
|
||||
napi_value WindowTypeInit(napi_env env)
|
||||
|
@ -31,13 +31,13 @@ namespace Rosen {
|
||||
using DisplayId = uint64_t;
|
||||
using ScreenId = uint64_t;
|
||||
namespace {
|
||||
constexpr DisplayId DISPLAY_ID_INVALID = -1ULL;
|
||||
constexpr ScreenId SCREEN_ID_INVALID = -1ULL;
|
||||
constexpr int DOT_PER_INCH = 160;
|
||||
const static std::string DEFAULT_SCREEN_NAME = "buildIn";
|
||||
constexpr int DOT_PER_INCH_MAXIMUM_VALUE = 640;
|
||||
constexpr int DOT_PER_INCH_MINIMUM_VALUE = 80;
|
||||
constexpr uint32_t BASELINE_DENSITY = 160;
|
||||
constexpr DisplayId DISPLAY_ID_INVALID = -1ULL;
|
||||
constexpr ScreenId SCREEN_ID_INVALID = -1ULL;
|
||||
constexpr int DOT_PER_INCH = 160;
|
||||
const static std::string DEFAULT_SCREEN_NAME = "buildIn";
|
||||
constexpr int DOT_PER_INCH_MAXIMUM_VALUE = 640;
|
||||
constexpr int DOT_PER_INCH_MINIMUM_VALUE = 80;
|
||||
constexpr uint32_t BASELINE_DENSITY = 160;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -26,7 +26,7 @@
|
||||
#include "window_property.h"
|
||||
|
||||
namespace OHOS::AbilityRuntime {
|
||||
class Context;
|
||||
class Context;
|
||||
}
|
||||
|
||||
namespace OHOS {
|
||||
|
@ -23,7 +23,7 @@
|
||||
#include "window_option.h"
|
||||
|
||||
namespace OHOS::AppExecFwk {
|
||||
class Configuration;
|
||||
class Configuration;
|
||||
}
|
||||
|
||||
namespace OHOS {
|
||||
|
@ -22,9 +22,9 @@
|
||||
#include "refbase.h"
|
||||
|
||||
namespace OHOS {
|
||||
sptr<IRemoteObject> NAPI_ohos_rpc_getNativeRemoteObject(napi_env env, napi_value object)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
sptr<IRemoteObject> NAPI_ohos_rpc_getNativeRemoteObject(napi_env env, napi_value object)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
} // namespace OHOS
|
||||
#endif // NAPI_IPC_OHOS_REMOTE_OBJECT_H
|
||||
|
@ -23,7 +23,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "VsyncStation"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "VsyncStation"};
|
||||
}
|
||||
|
||||
VsyncStation::VsyncStation(NodeId nodeId) : nodeId_(nodeId)
|
||||
|
@ -21,7 +21,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "Window"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "Window"};
|
||||
}
|
||||
sptr<Window> Window::Create(const std::string& windowName, sptr<WindowOption>& option,
|
||||
const std::shared_ptr<OHOS::AbilityRuntime::Context>& context, WMError& errCode)
|
||||
|
@ -25,7 +25,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowImpl"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowImpl"};
|
||||
}
|
||||
std::map<std::string, std::pair<uint32_t, sptr<Window>>> WindowImpl::windowMap_;
|
||||
std::map<uint32_t, std::vector<sptr<WindowImpl>>> WindowImpl::subWindowMap_;
|
||||
|
@ -25,7 +25,7 @@ namespace OHOS {
|
||||
namespace Rosen {
|
||||
const std::string WindowScene::MAIN_WINDOW_ID = "main window";
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowScene"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowScene"};
|
||||
}
|
||||
WindowScene::~WindowScene()
|
||||
{
|
||||
|
@ -29,7 +29,7 @@ using namespace testing::ext;
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "SnapshotDisplayTest"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "SnapshotDisplayTest"};
|
||||
}
|
||||
|
||||
class SnapshotDisplayTest : public testing::Test {
|
||||
|
@ -25,12 +25,12 @@ using namespace testing::ext;
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr int RGB565_PIXEL_BYTES = 2;
|
||||
constexpr int RGB888_PIXEL_BYTES = 3;
|
||||
constexpr int BPP = 4;
|
||||
constexpr int RGBA8888BUF_SIZE = 10;
|
||||
constexpr int RGB888BUF_SIZE = 10;
|
||||
constexpr int RGB565BUF_SIZE = 10;
|
||||
constexpr int RGB565_PIXEL_BYTES = 2;
|
||||
constexpr int RGB888_PIXEL_BYTES = 3;
|
||||
constexpr int BPP = 4;
|
||||
constexpr int RGBA8888BUF_SIZE = 10;
|
||||
constexpr int RGB888BUF_SIZE = 10;
|
||||
constexpr int RGB565BUF_SIZE = 10;
|
||||
}
|
||||
class SnapshotUtilsTest : public testing::Test {
|
||||
public:
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "ScreenManagerUtils"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "ScreenManagerUtils"};
|
||||
}
|
||||
|
||||
bool ScreenManagerUtils::CreateSurface()
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
namespace OHOS ::Rosen {
|
||||
namespace {
|
||||
constexpr size_t DATA_MIN_SIZE = 4;
|
||||
constexpr size_t DATA_MIN_SIZE = 4;
|
||||
}
|
||||
|
||||
class DisplayListener : public DisplayManager::IDisplayListener {
|
||||
|
@ -26,7 +26,7 @@
|
||||
|
||||
namespace OHOS ::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerIPC_Fuzzer"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerIPC_Fuzzer"};
|
||||
}
|
||||
template<class T>
|
||||
size_t GetObject(T &object, const uint8_t *data, size_t size)
|
||||
|
@ -28,8 +28,8 @@
|
||||
namespace OHOS::Rosen {
|
||||
|
||||
namespace {
|
||||
constexpr char END_CHAR = '\0';
|
||||
constexpr size_t LEN = 10;
|
||||
constexpr char END_CHAR = '\0';
|
||||
constexpr size_t LEN = 10;
|
||||
}
|
||||
template<class T>
|
||||
size_t GetObject(T &object, const uint8_t *data, size_t size)
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr size_t DATA_MIN_SIZE = 32;
|
||||
constexpr size_t DATA_MIN_SIZE = 32;
|
||||
}
|
||||
class ScreenListener : public ScreenManager::IScreenListener {
|
||||
public:
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "ScreenSessionManagerFuzzTest"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "ScreenSessionManagerFuzzTest"};
|
||||
}
|
||||
|
||||
using DMMessage = IScreenSessionManager::DisplayManagerMessage;
|
||||
|
@ -31,7 +31,7 @@ using namespace OHOS::Rosen;
|
||||
|
||||
namespace OHOS {
|
||||
namespace {
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
}
|
||||
template<class T>
|
||||
size_t GetObject(T &object, const uint8_t *data, size_t size)
|
||||
|
@ -30,7 +30,7 @@ using namespace OHOS::Rosen;
|
||||
|
||||
namespace OHOS {
|
||||
namespace {
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
}
|
||||
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
|
@ -30,7 +30,7 @@ using namespace OHOS::Rosen;
|
||||
|
||||
namespace OHOS {
|
||||
namespace {
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
}
|
||||
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
|
@ -30,7 +30,7 @@ using namespace OHOS::Rosen;
|
||||
|
||||
namespace OHOS {
|
||||
namespace {
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
}
|
||||
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
|
@ -27,7 +27,7 @@
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "SessionInterfaceFuzzTest"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "SessionInterfaceFuzzTest"};
|
||||
}
|
||||
|
||||
static std::shared_ptr<AbilityRuntime::AbilityContext> abilityContext =
|
||||
|
@ -29,7 +29,7 @@ using namespace OHOS::Rosen;
|
||||
|
||||
namespace OHOS {
|
||||
namespace {
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
}
|
||||
|
||||
bool DoSomethingInterestingWithMyAPI(const uint8_t* data, size_t size)
|
||||
|
@ -27,7 +27,7 @@ using namespace OHOS::Rosen;
|
||||
|
||||
namespace OHOS {
|
||||
namespace {
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
|
@ -29,8 +29,8 @@ using namespace OHOS::Rosen;
|
||||
|
||||
namespace OHOS {
|
||||
namespace {
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowAgentFuzzTest"};
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowAgentFuzzTest"};
|
||||
}
|
||||
|
||||
template<class T>
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
namespace OHOS ::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerIPC_Fuzzer"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayManagerIPC_Fuzzer"};
|
||||
}
|
||||
template<class T>
|
||||
size_t GetObject(T& object, const uint8_t* data, size_t size)
|
||||
|
@ -24,7 +24,7 @@ using namespace OHOS::Rosen;
|
||||
|
||||
namespace OHOS {
|
||||
namespace {
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
|
@ -30,9 +30,9 @@ using namespace OHOS::Rosen;
|
||||
|
||||
namespace OHOS {
|
||||
namespace {
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
constexpr char END_CHAR = '\0';
|
||||
constexpr size_t LEN = 10;
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
constexpr char END_CHAR = '\0';
|
||||
constexpr size_t LEN = 10;
|
||||
}
|
||||
class WindowLifeCycle : public IWindowLifeCycle {
|
||||
public:
|
||||
|
@ -28,7 +28,7 @@ using namespace OHOS::Rosen::TransformHelper;
|
||||
|
||||
namespace OHOS {
|
||||
namespace {
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
constexpr size_t DATA_MIN_SIZE = 2;
|
||||
}
|
||||
|
||||
template<class T>
|
||||
|
@ -29,10 +29,10 @@ using namespace testing::ext;
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayChangeTest"};
|
||||
constexpr uint32_t MAX_TIME_WAITING_FOR_CALLBACK = 20;
|
||||
constexpr uint32_t SLEEP_TIME_IN_US = 10000; // 10ms
|
||||
constexpr uint32_t SPLIT_TEST_SLEEP_S = 2;
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayChangeTest"};
|
||||
constexpr uint32_t MAX_TIME_WAITING_FOR_CALLBACK = 20;
|
||||
constexpr uint32_t SLEEP_TIME_IN_US = 10000; // 10ms
|
||||
constexpr uint32_t SPLIT_TEST_SLEEP_S = 2;
|
||||
}
|
||||
|
||||
class DisplayChangeEventListener : public DisplayManager::IDisplayListener {
|
||||
|
@ -32,8 +32,8 @@ using namespace testing::ext;
|
||||
|
||||
namespace OHOS::Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "DisplayManagerTest"};
|
||||
const int WAIT_FOR_SYNC_US = 1; // 1s
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "DisplayManagerTest"};
|
||||
const int WAIT_FOR_SYNC_US = 1; // 1s
|
||||
}
|
||||
|
||||
class DisplayChangeEventListener : public DisplayManager::IDisplayListener {
|
||||
|
@ -27,9 +27,9 @@ using namespace testing::ext;
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayPowerTest"};
|
||||
constexpr uint32_t MAX_TIME_WAITING_FOR_CALLBACK = 40;
|
||||
constexpr uint32_t SLEEP_TIME_IN_US = 50000;
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayPowerTest"};
|
||||
constexpr uint32_t MAX_TIME_WAITING_FOR_CALLBACK = 40;
|
||||
constexpr uint32_t SLEEP_TIME_IN_US = 50000;
|
||||
}
|
||||
|
||||
class DisplayPowerEventListener : public IDisplayPowerEventListener {
|
||||
|
@ -18,7 +18,7 @@
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayTestUtils"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "DisplayTestUtils"};
|
||||
}
|
||||
|
||||
DisplayTestUtils::~DisplayTestUtils()
|
||||
|
@ -27,7 +27,7 @@ using namespace testing::ext;
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "displayUpdateTest"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "displayUpdateTest"};
|
||||
}
|
||||
class DisplayUpdateListener : public DisplayManager::IDisplayUpdateListener {
|
||||
public:
|
||||
|
@ -26,7 +26,7 @@ using namespace testing::ext;
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "PrivateWindowTest"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "PrivateWindowTest"};
|
||||
}
|
||||
class PrivateWindowListener : public DisplayManager::IPrivateWindowListener {
|
||||
public:
|
||||
|
@ -33,8 +33,8 @@ using namespace testing::ext;
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "ScreenManagerTest"};
|
||||
constexpr uint32_t COLOR_RED = 0xffff0000;
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "ScreenManagerTest"};
|
||||
constexpr uint32_t COLOR_RED = 0xffff0000;
|
||||
}
|
||||
class ScreenGroupChangeListener;
|
||||
class ScreenManagerTest : public testing::Test {
|
||||
|
@ -29,7 +29,7 @@ using namespace testing::ext;
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "ScreenshotTest"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_DISPLAY, "ScreenshotTest"};
|
||||
}
|
||||
using Utils = DisplayTestUtils;
|
||||
class ScreenshotListener;
|
||||
|
@ -24,7 +24,7 @@ using namespace testing::ext;
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowAnimationTest"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowAnimationTest"};
|
||||
}
|
||||
|
||||
using Utils = WindowTestUtils;
|
||||
|
@ -30,7 +30,7 @@ using namespace testing::ext;
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowAppFloatingWindowTest"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowAppFloatingWindowTest"};
|
||||
}
|
||||
|
||||
class TestCameraFloatWindowChangedListener : public ICameraFloatWindowChangedListener {
|
||||
|
@ -24,7 +24,7 @@ using namespace testing::ext;
|
||||
namespace OHOS {
|
||||
namespace Rosen {
|
||||
namespace {
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowFocusTest"};
|
||||
constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "WindowFocusTest"};
|
||||
}
|
||||
|
||||
using Utils = WindowTestUtils;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user