// Path: src/com/arantius/tivocommander/rpc/request/Subscribe.java
// public class Subscribe extends MindRpcRequest {
//   public Subscribe() {
//     super("subscribe");
// 
//     mDataMap.put("bodyId", MindRpc.mTivoDevice.tsn);
//     mDataMap.put("recordingQuality", "best");
//   }
// 
//   public void setCollection(String collectionId, JsonNode channel, int max,
//       String which, String subscriptionId) {
//     HashMap<String, Object> idSetSource = new HashMap<String, Object>();
//     idSetSource.put("channel", channel);
//     idSetSource.put("collectionId", collectionId);
//     idSetSource.put("type", "seasonPassSource");
//     if (subscriptionId != null && !"".equals(subscriptionId)) {
//       mDataMap.put("subscriptionId", subscriptionId);
//     }
//     mDataMap.put("idSetSource", idSetSource);
//     mDataMap.put("maxRecordings", max);
//     mDataMap.put("showStatus", which);
//   }
// 
//   public void setIgnoreConflicts(boolean ignoreConflicts) {
//     mDataMap.put("ignoreConflicts", ignoreConflicts);
//   }
// 
//   public void setKeepUntil(String behavior) {
//     mDataMap.put("keepBehavior", behavior);
//   }
// 
//   public void setOffer(String offerId, String contentId) {
//     HashMap<String, String> idSetSource = new HashMap<String, String>();
//     idSetSource.put("contentId", contentId);
//     idSetSource.put("offerId", offerId);
//     idSetSource.put("type", "singleOfferSource");
//     mDataMap.put("idSetSource", idSetSource);
//   }
// 
//   public void setPadding(Integer start, Integer stop) {
//     if (start != 0) {
//       mDataMap.put("startTimePadding", start);
//     }
//     if (stop != 0) {
//       mDataMap.put("endTimePadding", stop);
//     }
//   }
// 
//   public void setPriority(Integer priority) {
//     if (priority > 0) {
//       mDataMap.put("priority", priority);
//     }
//   }
// }


import android.app.Activity;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.Window;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import com.arantius.tivocommander.rpc.request.Subscribe;
    pos = ((Spinner) findViewById(R.id.start)).getSelectedItemPosition();
    mPaddingStart = mStartStopValues[pos];

    pos = ((Spinner) findViewById(R.id.stop)).getSelectedItemPosition();
    mPaddingStop = mStartStopValues[pos];
  }

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
    Utils.activateHomeButton(this);
  }

  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    return Utils.onOptionsItemSelected(item, this, true);
  }

  protected void setUpSpinner(int spinnerId, String[] labels) {
    Spinner spinner = (Spinner) findViewById(spinnerId);
    ArrayAdapter<String> adapter =
        new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item,
            labels);
    adapter
        .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    spinner.setAdapter(adapter);
  }

// Path: src/com/arantius/tivocommander/rpc/request/Subscribe.java
// public class Subscribe extends MindRpcRequest {
//   public Subscribe() {
//     super("subscribe");
// 
//     mDataMap.put("bodyId", MindRpc.mTivoDevice.tsn);
//     mDataMap.put("recordingQuality", "best");
//   }
// 
//   public void setCollection(String collectionId, JsonNode channel, int max,
//       String which, String subscriptionId) {
//     HashMap<String, Object> idSetSource = new HashMap<String, Object>();
//     idSetSource.put("channel", channel);
//     idSetSource.put("collectionId", collectionId);
//     idSetSource.put("type", "seasonPassSource");
//     if (subscriptionId != null && !"".equals(subscriptionId)) {
//       mDataMap.put("subscriptionId", subscriptionId);
//     }
//     mDataMap.put("idSetSource", idSetSource);
//     mDataMap.put("maxRecordings", max);
//     mDataMap.put("showStatus", which);
//   }
// 
//   public void setIgnoreConflicts(boolean ignoreConflicts) {
//     mDataMap.put("ignoreConflicts", ignoreConflicts);
//   }
// 
//   public void setKeepUntil(String behavior) {
//     mDataMap.put("keepBehavior", behavior);
//   }
// 
//   public void setOffer(String offerId, String contentId) {
//     HashMap<String, String> idSetSource = new HashMap<String, String>();
//     idSetSource.put("contentId", contentId);
//     idSetSource.put("offerId", offerId);
//     idSetSource.put("type", "singleOfferSource");
//     mDataMap.put("idSetSource", idSetSource);
//   }
// 
//   public void setPadding(Integer start, Integer stop) {
//     if (start != 0) {
//       mDataMap.put("startTimePadding", start);
//     }
//     if (stop != 0) {
//       mDataMap.put("endTimePadding", stop);
//     }
//   }
// 
//   public void setPriority(Integer priority) {
//     if (priority > 0) {
//       mDataMap.put("priority", priority);
//     }
//   }
// }


// Path: src/com/arantius/tivocommander/SubscribeBase.java
import android.app.Activity;
import android.os.Bundle;
import android.view.MenuItem;
import android.view.Window;
import android.widget.ArrayAdapter;
import android.widget.Spinner;
import com.arantius.tivocommander.rpc.request.Subscribe;

    pos = ((Spinner) findViewById(R.id.start)).getSelectedItemPosition();
    mPaddingStart = mStartStopValues[pos];

    pos = ((Spinner) findViewById(R.id.stop)).getSelectedItemPosition();
    mPaddingStop = mStartStopValues[pos];
  }

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
    Utils.activateHomeButton(this);
  }

  @Override
  public boolean onOptionsItemSelected(MenuItem item) {
    return Utils.onOptionsItemSelected(item, this, true);
  }

  protected void setUpSpinner(int spinnerId, String[] labels) {
    Spinner spinner = (Spinner) findViewById(spinnerId);
    ArrayAdapter<String> adapter =
        new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item,
            labels);
    adapter
        .setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
    spinner.setAdapter(adapter);
  }

  protected void subscribeRequestCommon(Subscribe request) {