createNewWakeLock
Creates new wakelock Creates a new wake lock with the specified level and flags.
The levelAndFlags parameter specifies a wake lock level and optional flags combined using the logical OR operator.
The wake lock levels are: PARTIAL_WAKE_LOCK, FULL_WAKE_LOCK, SCREEN_DIM_WAKE_LOCK and SCREEN_BRIGHT_WAKE_LOCK. Exactly one wake lock level must be specified as part of the levelAndFlags parameter.
The wake lock flags are: ACQUIRE_CAUSES_WAKEUP and ON_AFTER_RELEASE. Multiple flags can be combined as part of the levelAndFlags parameters.
Call WakeLock#acquire() on the object to acquire the wake lock, and WakeLock#release when you are done.
If using this to keep the screen on, you should strongly consider using WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON instead
Receiver
Context
Parameters
Int
String