Revision b347d5e3 src/com/rackspacecloud/android/EnableCDNActivity.java

b/src/com/rackspacecloud/android/EnableCDNActivity.java
18 18
import android.app.Activity;
19 19
import android.app.AlertDialog;
20 20
import android.app.Dialog;
21
import android.content.Context;
21 22
import android.content.DialogInterface;
22 23
import android.os.AsyncTask;
23 24
import android.os.Bundle;
......
45 46
	private Spinner ttlSpinner;
46 47
	private Spinner logRetSpinner;
47 48
	private Spinner cdnSpinner;
48

  
49
	private Context context;
50
	
49 51
	/** Called when the activity is first created. */
50 52
	@Override
51 53
	public void onCreate(Bundle savedInstanceState) {
52 54
		super.onCreate(savedInstanceState);
53 55
		setContentView(R.layout.enable_cdn_container);
56
		context = getApplicationContext();
54 57
		containerName = (String) this.getIntent().getExtras().get("Cname");
55 58
		setupButtons();
56 59
		loadTtlSpinner();
......
241 244
		protected HttpResponse doInBackground(Void... arg0) {
242 245
			HttpResponse resp = null;
243 246
			try {
244
				resp = (new ContainerManager()).enable(containerName,
247
				resp = (new ContainerManager(context)).enable(containerName,
245 248
						selectedTtlId, selectedLogRetId);
246 249
			} catch (CloudServersException e) {
247 250
				exception = e;
......
287 290
		protected HttpResponse doInBackground(Void... arg0) {
288 291
			HttpResponse resp = null;
289 292
			try {
290
				resp = (new ContainerManager()).disable(containerName,
293
				resp = (new ContainerManager(context)).disable(containerName,
291 294
						selectedCdnId, selectedTtlId, selectedLogRetId);
292 295
			} catch (CloudServersException e) {
293 296
				exception = e;

Also available in: Unified diff