Is there a way to check in code whether or not a device's bootloader has been unlocked? Not whether the devices is rooted, just the bootloader status.
There's this command of course:
fastboot oem device-info
But I need to be able to make the same determination in C++ (preferred) or Java when running in regular (not fastboot) mode.