/*
 * Copyright (c) 2015. Ncomz. All Rights Reserved
 */

package com.ntels.onecable.admin.common.mdns;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;

public class RestartService extends BroadcastReceiver {

  public static final String ACTION_RESTART_PERSISTENTSERVICE = "ACTION.RESTART.PersistentService";

  @Override
  public void onReceive(Context context, Intent intent) {

    Log.d("RestartService", "RestartService called!@!@@@@@#$@$@#$@#$@#");
    if (intent.getAction().equals(ACTION_RESTART_PERSISTENTSERVICE)) {
//            Intent i1 = new Intent(mContext, PushService.class);
//            mContext.startService(i1);

      Intent i2 = new Intent(context, MdnsRegService.class);
      context.startService(i2);
    }
  }
}