Revision 008fa428
b/src/com/rackspacecloud/android/AddAccountActivity.java | ||
---|---|---|
82 | 82 |
//set the auth server default to us |
83 | 83 |
authServer = "https://auth.api.rackspacecloud.com/v1.0"; |
84 | 84 |
providerSpinner = (Spinner) findViewById(R.id.provider_spinner); |
85 |
String[] providers = {"Rackspace Cloud (US)", "Rackspace Cloud (UK)", "Custom"}; |
|
85 |
String[] providers = {"Rackspace Cloud (US)", "Rackspace Cloud (UK)", "Pithos+", "Pithos+ Dev","Custom"};
|
|
86 | 86 |
ArrayAdapter<String> imageAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, providers); |
87 | 87 |
imageAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); |
88 | 88 |
providerSpinner.setAdapter(imageAdapter); |
... | ... | |
96 | 96 |
authServer = Preferences.COUNTRY_UK_AUTH_SERVER; |
97 | 97 |
customServer.setEnabled(false); |
98 | 98 |
} |
99 |
else if(pos == 2){ |
|
100 |
authServer = Preferences.PITHOS_SERVER; |
|
101 |
customServer.setEnabled(false); |
|
102 |
} |
|
103 |
else if(pos == 3){ |
|
104 |
authServer = Preferences.PITHOS_DEV_SERVER; |
|
105 |
customServer.setEnabled(false); |
|
106 |
} |
|
99 | 107 |
else{ |
100 | 108 |
customServer.setEnabled(true); |
101 | 109 |
} |
b/src/com/rackspacecloud/android/ListAccountsActivity.java | ||
---|---|---|
354 | 354 |
else if(authServer.equals(Preferences.COUNTRY_US_AUTH_SERVER)){ |
355 | 355 |
result = "Rackspace Cloud (US)"; |
356 | 356 |
} |
357 |
else if(authServer.equals(Preferences.PITHOS_SERVER)){ |
|
358 |
result = "Pithos+"; |
|
359 |
} |
|
360 |
else if(authServer.equals(Preferences.PITHOS_DEV_SERVER)){ |
|
361 |
result = "Pithos+ Dev"; |
|
362 |
} |
|
357 | 363 |
else{ |
358 |
result = "Custom";
|
|
364 |
result = "Custom:" +authServer;
|
|
359 | 365 |
//setCustomIcon(); |
360 | 366 |
} |
361 | 367 |
return result; |
... | ... | |
367 | 373 |
|| account.getAuthServer().equals(Preferences.COUNTRY_US_AUTH_SERVER)){ |
368 | 374 |
return R.drawable.rackspacecloud_icon; |
369 | 375 |
} |
376 |
if(account.getAuthServer().equals(Preferences.PITHOS_DEV_SERVER) |
|
377 |
|| account.getAuthServer().equals(Preferences.PITHOS_SERVER)){ |
|
378 |
return R.drawable.pithos_icon; |
|
379 |
} |
|
370 | 380 |
else{ |
371 | 381 |
return R.drawable.openstack_icon; |
372 | 382 |
} |
b/src/com/rackspacecloud/android/Preferences.java | ||
---|---|---|
28 | 28 |
//Define auth server here |
29 | 29 |
public static final String COUNTRY_US_AUTH_SERVER = "https://auth.api.rackspacecloud.com/v1.0"; |
30 | 30 |
public static final String COUNTRY_UK_AUTH_SERVER = "https://lon.auth.api.rackspacecloud.com/v1.0"; |
31 |
public static final String PITHOS_SERVER = "https://plus.pithos.grnet.gr/v1"; |
|
32 |
public static final String PITHOS_DEV_SERVER = "https://pithos.dev.grnet.gr/v1"; |
|
31 | 33 |
|
32 | 34 |
protected void onCreate(Bundle savedInstanceState) { |
33 | 35 |
super.onCreate(savedInstanceState); |
Also available in: Unified diff