/*
 * Copyright (C) 2017 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package android.arch.background.workmanager.systemjob;

import android.annotation.TargetApi;
import android.app.job.JobInfo;
import android.app.job.JobScheduler;
import android.arch.background.workmanager.Scheduler;
import android.arch.background.workmanager.model.WorkSpec;
import android.content.Context;

/**
 * A class that schedules work using {@link android.app.job.JobScheduler}.
 */
@TargetApi(23)
public class SystemJobScheduler implements Scheduler {

    private JobScheduler mJobScheduler;
    private SystemJobInfoConverter mSystemJobInfoConverter;

    public SystemJobScheduler(Context context) {
        mJobScheduler = (JobScheduler) context.getSystemService(Context.JOB_SCHEDULER_SERVICE);
        mSystemJobInfoConverter = new SystemJobInfoConverter(context);
    }

    @Override
    public void schedule(WorkSpec... workSpecs) {
        for (WorkSpec workSpec : workSpecs) {
            JobInfo jobInfo = mSystemJobInfoConverter.convert(workSpec);
            mJobScheduler.schedule(jobInfo);
        }
    }
}

@@ -919,16 +919,41 @@
 Context;
+%0Aimport android.util.Log;
 %0A%0A/**%0A *
@@ -1099,16 +1099,75 @@
 duler %7B%0A
+    private static final String TAG = %22SystemJobScheduler%22;
 %0A    pri
@@ -1666,16 +1666,116 @@
 kSpec);%0A
+            Log.d(TAG, %22Scheduling work, ID: %22 + workSpec.getId() + %22 Job ID: %22 + jobInfo.getId());%0A
         

Add log to SystemJobScheduler.schedule