work/workmanager/src/main/java/androidx/work/impl/utils/WakeLocks.java
public static PowerManager.WakeLock newWakeLock(
            @NonNull Context context,
            @NonNull String tag) {
        PowerManager powerManager = (PowerManager) context.getApplicationContext()
                .getSystemService(Context.POWER_SERVICE);
        return powerManager.newWakeLock(PARTIAL_WAKE_LOCK, "WorkManager: " + tag);
    }
/**
     * Creates and returns a new WakeLock.
     *
     * @param context The context from which to get the PowerManager
     * @param tag A descriptive tag for the WakeLock; this method will prefix "WorkManager: " to it
     * @return A new WakeLock
     */
Creates and returns a new WakeLock.
@param context The context from which to get the PowerManager
@param tag A descriptive tag for the WakeLock; this method will prefix "WorkManager: " to it
@return A new WakeLock
Creates and returns a new WakeLock . @param context The context from which to get the PowerManager @param tag A descriptive tag for the WakeLock ; this method will prefix " WorkManager : " to it @return A new WakeLock
public static PowerManager.WakeLock newWakeLock(
            @NonNull Context context,
            @NonNull String tag) {
        PowerManager powerManager = (PowerManager) context.getApplicationContext()
                .getSystemService(Context.POWER_SERVICE);
        return powerManager.newWakeLock(PARTIAL_WAKE_LOCK, "WorkManager: " + tag);
    }
public static PowerManager . WakeLock newWakeLock ( @ NonNull Context context , @ NonNull String tag ) { PowerManager powerManager = ( PowerManager ) context . getApplicationContext ( ) . getSystemService ( Context . POWER_SERVICE ) ; return powerManager . newWakeLock ( PARTIAL_WAKE_LOCK , "WorkManager: " + tag ) ; }
Creates and returns a new WakeLock.
Creates and returns a new WakeLock .