I have recently been looking at handling API levels fragmentation and found a great tutorial on supporting different API Levels in your source code:
As stated in the tut
Starting with Android 2.0 the Dalvik verifier is smarter about only checking classes that are actually used while running.
That said, the code you show here would only work if you never touch the CameraActivity class when running on older versions of the platform. Given that isn't what you are showing, an explanation may be that on some older builds of the platform that API was there but not yet available in the SDK.