The screen appears black because the "FLAG_SECURE" setting is enabled. When this setting is enabled, capturing the screen (including screenshots) is prohibited for security reasons.
Normally, screens with this attribute enabled cannot be captured. However, to facilitate UI capture even in such screens, a black dummy screen is displayed instead.
Although the UI appears black, UI elements are still captured and can be interacted with as usual.
However, since this makes the screen's appearance difficult to verify, it is recommended to disable the "FLAG_SECURE" setting during testing. By doing so, the screen will display normally.