Revision b347d5e3 src/com/rackspacecloud/android/ContainerObjectsActivity.java
b/src/com/rackspacecloud/android/ContainerObjectsActivity.java | ||
---|---|---|
20 | 20 |
import android.app.AlertDialog; |
21 | 21 |
import android.app.Dialog; |
22 | 22 |
import android.app.ListActivity; |
23 |
import android.content.Context; |
|
23 | 24 |
import android.content.DialogInterface; |
24 | 25 |
import android.content.Intent; |
25 | 26 |
import android.os.AsyncTask; |
... | ... | |
58 | 59 |
public Object kiloBytes; |
59 | 60 |
public int bConver = 1048576; |
60 | 61 |
public int kbConver = 1024; |
62 |
private Context context; |
|
61 | 63 |
|
62 | 64 |
@Override |
63 | 65 |
public void onCreate(Bundle savedInstanceState) { |
64 | 66 |
super.onCreate(savedInstanceState); |
65 | 67 |
container = (Container) this.getIntent().getExtras().get("container"); |
66 | 68 |
Log.v(LOG, "CDNEnabled:" + container.isCdnEnabled()); |
69 |
context = getApplicationContext(); |
|
67 | 70 |
if (container.isCdnEnabled() == true) { |
68 | 71 |
cdnEnabledIs = "true"; |
69 | 72 |
} else { |
... | ... | |
185 | 188 |
protected ArrayList<ContainerObjects> doInBackground(Void... arg0) { |
186 | 189 |
ArrayList<ContainerObjects> files = null; |
187 | 190 |
try { |
188 |
files = (new ContainerObjectManager()).createList(true, |
|
191 |
files = (new ContainerObjectManager(context)).createList(true,
|
|
189 | 192 |
container.getName()); |
190 | 193 |
} catch (CloudServersException e) { |
191 | 194 |
exception = e; |
... | ... | |
350 | 353 |
protected HttpResponse doInBackground(Void... arg0) { |
351 | 354 |
HttpResponse resp = null; |
352 | 355 |
try { |
353 |
resp = (new ContainerManager()).delete(container.getName()); |
|
356 |
resp = (new ContainerManager(context)).delete(container.getName());
|
|
354 | 357 |
Log.v(LOG, "container's name " + container.getName()); |
355 | 358 |
} catch (CloudServersException e) { |
356 | 359 |
exception = e; |
Also available in: Unified diff