This section describes only module-specific error codes. For details about universal error codes, please refer to Universal Error Codes.
Message
Permission denied.
Symptom
Permission verification failed.
Possible causes
The HAP has not obtained the ohos.permission.DLP_GET_HIDE_STATUS permission.
Solution
Only apps in the trustlist can apply for this permission. For details about how to apply for this permission, please refer to Requesting Restricted Permissions.
Message
Capability not supported.
Symptom
This API is not supported on the current device.
Possible causes
The current device does not support this function.
Solution
Do not call this API on devices that do not support this API.
Message
Internal error.
Symptom
An internal error occurs in the DlpAntiPeep API.
Possible causes
An internal function error occurs. The global screen privacy switch is not enabled.
Solution
Try again in the service scenario.
Submit a ticket online for assistance.
Message
The antipeep function is not enabled.
Symptom
The screen privacy switch is not enabled.
Possible causes
The global screen privacy switch or the app-level switch is not enabled under system settings.
Solution
Enable the screen privacy switch and try again.
Step 1: Go to Settings > Privacy & security > Screen Privacy, and enable the global screen privacy switch. Then enable the screen privacy switch for the desired app.
Step 2: Go to the lock screen and perform face unlock.
Message
The protected application is not displayed on the screen.
Symptom
The app was not in the foreground, leading to the screen privacy API call failure.
Possible causes
The app was in the background when it called the screen privacy API.
Solution
Try again when the app is in the foreground.
Message
Facial recognition is not set.
Symptom
The user has not set up facial recognition, and the screen privacy feature cannot be enabled.
Possible causes
The user has not set up facial recognition under Biometrics & screen lock.
Solution
Prompt the user to set up facial recognition.
Message
The anti-peep information has been published.
Symptom
A live view already exists for the peeking state.
Possible causes
The app attempted to send a live view to notify of a peeking state, but the live view already exists.
Solution
No action is required. The live view notification that the app attempts to send already exists.