Merge "Account for DPM state when checking FLAG_SECURE" into rvc-dev