package com.sudhirkhanger.app.stockhawk.service;

import android.app.IntentService;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;

import com.google.android.gms.gcm.TaskParams;

/**
 * Created by sam_chordas on 10/1/15.
 */
public class StockIntentService extends IntentService {

    private static final String LOG_TAG = StockIntentService.class.getSimpleName();

    public StockIntentService() {
        super(StockIntentService.class.getName());
    }

    public StockIntentService(String name) {
        super(name);
    }

    @Override
    protected void onHandleIntent(Intent intent) {
        Log.d(LOG_TAG, "StockIntentService called");
        StockTaskService stockTaskService = new StockTaskService(this);
        Bundle args = new Bundle();
        if (intent.getStringExtra("tag").equals("add")) {
            args.putString("symbol", intent.getStringExtra("symbol"));
            Log.d(LOG_TAG, "if intent" + intent.getStringExtra("symbol"));
        } else {
            Log.d(LOG_TAG, "else intent" + intent.getStringExtra("tag"));
        }
        // We can call OnRunTask from the intent service to force it to run immediately instead of
        // scheduling a task.
        stockTaskService.onRunTask(new TaskParams(intent.getStringExtra("tag"), args));
    }
}

@@ -919,174 +919,8 @@
 ));%0A
-            Log.d(LOG_TAG, %22if intent%22 + intent.getStringExtra(%22symbol%22));%0A        %7D else %7B%0A            Log.d(LOG_TAG, %22else intent%22 + intent.getStringExtra(%22tag%22));%0A
     

remove log