work/workmanager/src/main/java/androidx/work/impl/utils/EnqueueRunnable.java
@VisibleForTesting
    public boolean addToDatabase() {
        WorkManagerImpl workManagerImpl = mWorkContinuation.getWorkManagerImpl();
        WorkDatabase workDatabase = workManagerImpl.getWorkDatabase();
        workDatabase.beginTransaction();
        try {
            boolean needsScheduling = processContinuation(mWorkContinuation);
            workDatabase.setTransactionSuccessful();
            return needsScheduling;
        } finally {
            workDatabase.endTransaction();
        }
    }
/**
     * Adds the {@link WorkSpec}'s to the datastore, parent first.
     * Schedules work on the background scheduler, if transaction is successful.
     */
Adds the  WorkSpec's to the datastore, parent first.
Schedules work on the background scheduler, if transaction is successful.
Adds the WorkSpec ' s to the datastore parent first . Schedules work on the background scheduler if transaction is successful .
@VisibleForTesting
    public boolean addToDatabase() {
        WorkManagerImpl workManagerImpl = mWorkContinuation.getWorkManagerImpl();
        WorkDatabase workDatabase = workManagerImpl.getWorkDatabase();
        workDatabase.beginTransaction();
        try {
            boolean needsScheduling = processContinuation(mWorkContinuation);
            workDatabase.setTransactionSuccessful();
            return needsScheduling;
        } finally {
            workDatabase.endTransaction();
        }
    }
@ VisibleForTesting public boolean addToDatabase ( ) { WorkManagerImpl workManagerImpl = mWorkContinuation . getWorkManagerImpl ( ) ; WorkDatabase workDatabase = workManagerImpl . getWorkDatabase ( ) ; workDatabase . beginTransaction ( ) ; try { boolean needsScheduling = processContinuation ( mWorkContinuation ) ; workDatabase . setTransactionSuccessful ( ) ; return needsScheduling ; } finally { workDatabase . endTransaction ( ) ; } }
Adds the {@link WorkSpec}'s to the datastore, parent first.
Adds the { @link WorkSpec } ' s to the datastore parent first .