Revision e6c34a0f
b/src/com/rackspace/cloud/files/api/client/ContainerManager.java | ||
---|---|---|
52 | 52 |
|
53 | 53 |
String url = getSafeURL(Account.getAccount().getStorageUrl(), editable.toString()); |
54 | 54 |
HttpPut put = new HttpPut(url); |
55 |
Log.d("info", "captin the url create " + url); |
|
56 | 55 |
|
57 | 56 |
put.addHeader("X-Auth-Token", Account.getAccount().getAuthToken()); |
58 | 57 |
httpclient.removeRequestInterceptorByClass(RequestExpectContinue.class); |
... | ... | |
142 | 141 |
CustomHttpClient httpclient = new CustomHttpClient(context); |
143 | 142 |
String url = getSafeURL(Account.getAccount().getCdnManagementUrl(), container); |
144 | 143 |
HttpPut put = new HttpPut(url); |
145 |
Log.d("info", "captin the url enable " + url); |
|
146 | 144 |
|
147 | 145 |
put.addHeader("X-Auth-Token", Account.getAccount().getAuthToken()); |
148 | 146 |
put.addHeader("X-TTL", ttl); |
... | ... | |
177 | 175 |
CustomHttpClient httpclient = new CustomHttpClient(context); |
178 | 176 |
String url = getSafeURL(Account.getAccount().getCdnManagementUrl(), container); |
179 | 177 |
HttpPost post = new HttpPost(url); |
180 |
Log.d("info", "captin the url disable " + url); |
|
181 | 178 |
|
182 | 179 |
post.addHeader("X-Auth-Token", Account.getAccount().getAuthToken()); |
183 | 180 |
post.addHeader("X-TTL", ttl); |
... | ... | |
212 | 209 |
CustomHttpClient httpclient = new CustomHttpClient(context); |
213 | 210 |
String url = getSafeURL(Account.getAccount().getStorageUrl(), string); |
214 | 211 |
HttpDelete put = new HttpDelete(url); |
215 |
Log.d("info", "captin the url delete " + url); |
|
216 | 212 |
|
217 | 213 |
put.addHeader("X-Auth-Token", Account.getAccount().getAuthToken()); |
218 | 214 |
httpclient.removeRequestInterceptorByClass(RequestExpectContinue.class); |
b/src/com/rackspace/cloud/files/api/client/ContainerObjectManager.java | ||
---|---|---|
54 | 54 |
|
55 | 55 |
CustomHttpClient httpclient = new CustomHttpClient(context); |
56 | 56 |
String url = getSafeURL(Account.getAccount().getStorageUrl(), passName) + "?format=xml"; |
57 |
Log.d("info", "captin the url creatlist: " + url); |
|
58 | 57 |
HttpGet get = new HttpGet(url); |
59 | 58 |
ArrayList<ContainerObjects> files = new ArrayList<ContainerObjects>(); |
60 | 59 |
|
... | ... | |
117 | 116 |
CustomHttpClient httpclient = new CustomHttpClient(context); |
118 | 117 |
String url = getSafeURL(Account.getAccount().getStorageUrl(), Container + "/" + Object); |
119 | 118 |
HttpDelete deleteObject = new HttpDelete(url); |
120 |
Log.d("info", "captin the url deleteobject: " + url); |
|
121 | 119 |
|
122 | 120 |
deleteObject.addHeader("X-Auth-Token", Account.getAccount().getAuthToken()); |
123 | 121 |
httpclient.removeRequestInterceptorByClass(RequestExpectContinue.class); |
... | ... | |
149 | 147 |
CustomHttpClient httpclient = new CustomHttpClient(context); |
150 | 148 |
String url = getSafeURL(Account.getAccount().getStorageUrl(), Container + "/" + Object); |
151 | 149 |
HttpGet getObject = new HttpGet(url); |
152 |
Log.d("info", "captin the url getobject: " + url); |
|
153 | 150 |
getObject.addHeader("X-Auth-Token", Account.getAccount().getAuthToken()); |
154 | 151 |
httpclient.removeRequestInterceptorByClass(RequestExpectContinue.class); |
155 | 152 |
|
... | ... | |
180 | 177 |
CustomHttpClient httpclient = new CustomHttpClient(context); |
181 | 178 |
String url = getSafeURL(Account.getAccount().getStorageUrl(), Container + "/" + Path + Object); |
182 | 179 |
HttpPut addObject = new HttpPut(url); |
183 |
Log.d("info", "captin the url addobject: " + url); |
|
184 | 180 |
|
185 | 181 |
addObject.addHeader("X-Auth-Token", Account.getAccount().getAuthToken()); |
186 | 182 |
addObject.addHeader("Content-Type", type); |
... | ... | |
217 | 213 |
CustomHttpClient httpclient = new CustomHttpClient(context); |
218 | 214 |
String url = getSafeURL(Account.getAccount().getStorageUrl(), Container + "/" + Path + Object); |
219 | 215 |
HttpPut addObject = new HttpPut(url); |
220 |
Log.d("info", "captin the url addobject2: " + url); |
|
221 | 216 |
|
222 | 217 |
addObject.addHeader("X-Auth-Token", Account.getAccount().getAuthToken()); |
223 | 218 |
addObject.addHeader("Content-Type", type); |
b/src/com/rackspacecloud/android/AddFileActivity.java | ||
---|---|---|
22 | 22 |
|
23 | 23 |
import android.app.Activity; |
24 | 24 |
import android.app.AlertDialog; |
25 |
import android.app.ProgressDialog; |
|
25 | 26 |
import android.content.Context; |
26 | 27 |
import android.content.DialogInterface; |
27 | 28 |
import android.content.Intent; |
... | ... | |
39 | 40 |
private EditText contents; |
40 | 41 |
private String containerName; |
41 | 42 |
private String path; |
43 |
private boolean isAdding; |
|
44 |
private ProgressDialog dialog; |
|
42 | 45 |
|
43 | 46 |
/** Called when the activity is first created. */ |
44 | 47 |
@Override |
... | ... | |
48 | 51 |
context = getApplicationContext(); |
49 | 52 |
containerName = (String) this.getIntent().getExtras().get("Cname"); |
50 | 53 |
path = (String) this.getIntent().getExtras().get("curPath"); |
54 |
setUpDialog(savedInstanceState); |
|
51 | 55 |
setUpInputs(); |
52 | 56 |
} |
53 | 57 |
|
54 | 58 |
private void setUpInputs(){ |
55 | 59 |
((Button) findViewById(R.id.new_file_button)).setOnClickListener(this); |
56 | 60 |
fileName = ((EditText)findViewById(R.id.file_name_text)); |
61 |
fileName.append(".txt"); |
|
57 | 62 |
contents = ((EditText)findViewById(R.id.new_file_text)); |
58 | 63 |
} |
59 | 64 |
|
65 |
private void setUpDialog(Bundle savedInstanceState){ |
|
66 |
isAdding = savedInstanceState != null && savedInstanceState.containsKey("isAdding") |
|
67 |
&& savedInstanceState.getBoolean("isAdding"); |
|
68 |
if(isAdding){ |
|
69 |
showDialog(); |
|
70 |
} |
|
71 |
|
|
72 |
} |
|
73 |
|
|
74 |
@Override |
|
75 |
protected void onSaveInstanceState(Bundle outState) { |
|
76 |
super.onSaveInstanceState(outState); |
|
77 |
outState.putBoolean("isAdding", isAdding); |
|
78 |
if(isAdding){ |
|
79 |
hideDialog(); |
|
80 |
} |
|
81 |
} |
|
82 |
|
|
60 | 83 |
public void onClick(View arg0) { |
61 | 84 |
if ("".equals(fileName.getText().toString())) { |
62 | 85 |
showAlert("Required Fields Missing", " File name is required."); |
... | ... | |
124 | 147 |
private CloudServersException exception; |
125 | 148 |
|
126 | 149 |
@Override |
150 |
protected void onPreExecute(){ |
|
151 |
isAdding = true; |
|
152 |
showDialog(); |
|
153 |
} |
|
154 |
|
|
155 |
@Override |
|
127 | 156 |
protected HttpBundle doInBackground(Void... arg0) { |
128 | 157 |
HttpBundle bundle = null; |
129 | 158 |
try { |
... | ... | |
136 | 165 |
|
137 | 166 |
@Override |
138 | 167 |
protected void onPostExecute(HttpBundle bundle) { |
168 |
isAdding = false; |
|
169 |
hideDialog(); |
|
139 | 170 |
HttpResponse response = bundle.getResponse(); |
140 | 171 |
if (response != null) { |
141 | 172 |
int statusCode = response.getStatusLine().getStatusCode(); |
... | ... | |
155 | 186 |
} |
156 | 187 |
} |
157 | 188 |
} |
189 |
|
|
190 |
private void showDialog() { |
|
191 |
if(dialog == null || !dialog.isShowing()){ |
|
192 |
dialog = ProgressDialog.show(AddFileActivity.this, "", "Adding File...", true); |
|
193 |
} |
|
194 |
} |
|
195 |
|
|
196 |
private void hideDialog() { |
|
197 |
if(dialog != null){ |
|
198 |
dialog.dismiss(); |
|
199 |
} |
|
200 |
} |
|
158 | 201 |
} |
b/src/com/rackspacecloud/android/ContainerObjectDetails.java | ||
---|---|---|
313 | 313 |
File file = new File(object.getAbsolutePath()); |
314 | 314 |
String extension = android.webkit.MimeTypeMap.getFileExtensionFromUrl(Uri.fromFile(file).toString()); |
315 | 315 |
String mimetype = android.webkit.MimeTypeMap.getSingleton().getMimeTypeFromExtension(extension); |
316 |
Log.d("info", "captin the file name is " + object.getName()); |
|
317 |
Log.d("info", "captin the uri is " + Uri.decode(Uri.fromFile(object).toString())); |
|
318 | 316 |
myIntent.setDataAndType(Uri.fromFile(file),mimetype); |
319 | 317 |
//myIntent.setData(Uri.fromFile(file)); |
320 | 318 |
try{ |
... | ... | |
451 | 449 |
|
452 | 450 |
private CloudServersException exception; |
453 | 451 |
|
452 |
@Override |
|
454 | 453 |
protected void onPreExecute(){ |
455 | 454 |
dialog = ProgressDialog.show(ContainerObjectDetails.this, "", "Downloading...", true); |
456 | 455 |
} |
b/src/com/rackspacecloud/android/ContainerObjectsActivity.java | ||
---|---|---|
566 | 566 |
@Override |
567 | 567 |
public void onActivityResult(int requestCode, int resultCode, Intent data) { |
568 | 568 |
super.onActivityResult(requestCode, resultCode, data); |
569 |
|
|
570 |
Log.d("info", "in containerobjactivity result"); |
|
571 | 569 |
|
572 |
if (resultCode == RESULT_OK) { |
|
570 |
if (resultCode == RESULT_OK && requestCode == 56) {
|
|
573 | 571 |
Log.d("info", "top called"); |
574 | 572 |
// a sub-activity kicked back, so we want to refresh the server list |
575 | 573 |
loadFiles(); |
576 | 574 |
} |
575 |
/* |
|
577 | 576 |
if (requestCode == 55) { |
578 | 577 |
Log.d("info", "bottom called"); |
579 | 578 |
if (resultCode == RESULT_OK) { |
... | ... | |
582 | 581 |
startActivityForResult(viewIntent1, 55); |
583 | 582 |
} |
584 | 583 |
} |
584 |
*/ |
|
585 | 585 |
} |
586 | 586 |
|
587 | 587 |
private CloudServersException parseCloudServersException( |
b/src/com/rackspacecloud/android/EnableCDNActivity.java | ||
---|---|---|
28 | 28 |
import android.widget.AdapterView; |
29 | 29 |
import android.widget.ArrayAdapter; |
30 | 30 |
import android.widget.Button; |
31 |
import android.widget.ProgressBar; |
|
32 | 31 |
import android.widget.Spinner; |
33 |
import android.widget.TextView; |
|
34 | 32 |
import android.widget.Toast; |
35 | 33 |
import android.widget.AdapterView.OnItemSelectedListener; |
36 | 34 |
|
b/src/com/rackspacecloud/android/ListContainerActivity.java | ||
---|---|---|
288 | 288 |
@Override |
289 | 289 |
public void onActivityResult(int requestCode, int resultCode, Intent data) { |
290 | 290 |
super.onActivityResult(requestCode, resultCode, data); |
291 |
|
|
292 |
Log.d("info", "captin in the list container activity result with code " + requestCode + " " + resultCode); |
|
293 | 291 |
|
294 | 292 |
if (resultCode == RESULT_OK) { |
295 | 293 |
// a sub-activity kicked back, so we want to refresh the server list |
b/src/com/rackspacecloud/android/PasswordServerActivity.java | ||
---|---|---|
120 | 120 |
protected HttpBundle doInBackground(Void... arg0) { |
121 | 121 |
HttpBundle bundle = null; |
122 | 122 |
try { |
123 |
Log.d("info", "captin the password is: " + modifiedPassword); |
|
124 | 123 |
bundle = (new ServerManager()).changePassword(server, modifiedPassword, getApplicationContext()); |
125 | 124 |
} catch (CloudServersException e) { |
126 | 125 |
exception = e; |
b/src/com/rackspacecloud/android/ServerErrorActivity.java | ||
---|---|---|
36 | 36 |
} |
37 | 37 |
|
38 | 38 |
private void setUpInputs(){ |
39 |
Log.d("info", "captin inpusts set up"); |
|
40 | 39 |
okButton = ((Button) findViewById(R.id.server_error_ok_button)); |
41 | 40 |
okButton.setOnClickListener(new OnClickListener() { |
42 | 41 |
@Override |
Also available in: Unified diff