I created an application which uses camera and during the appplication execution the screen is always on.
In the onCreate() method I added the lock:
I would move the lock from OnCreate() to OnResume(). You want the lock during the visible lifetime of the Activity, not the entire lifetime of the Activity. You Activity could definetly still be running with another Activity running in front of it.
I would move the release to OnPause(). OnPause() is the earliest point your application should normally be killed by the OS.
Additionally, I wouldn't check to see if I have the lock before releasing. If you use OnResume() to acquire the lock; isHeld should always be true in OnPause().