1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-28 04:02:19 -05:00

Formatting of Accounts.java

This commit is contained in:
Sander Bogaert 2012-08-28 10:43:25 -04:00 committed by Andrew Chen
parent 0f51eb54c1
commit 416ac8b646

View File

@ -149,7 +149,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
class AccountsHandler extends Handler { class AccountsHandler extends Handler {
private void setViewTitle() { private void setViewTitle() {
mActionBarTitle.setText(" "+getString(R.string.accounts_title)); mActionBarTitle.setText(" " + getString(R.string.accounts_title));
mActionBarUnread.setText(String.valueOf(mUnreadMessageCount)); mActionBarUnread.setText(String.valueOf(mUnreadMessageCount));
String operation = mListener.getOperation(Accounts.this, getTimeFormat()); String operation = mListener.getOperation(Accounts.this, getTimeFormat());
@ -1544,7 +1544,7 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
int start = mImportContents.globalSettings ? 1 : 0; int start = mImportContents.globalSettings ? 1 : 0;
for (int i = start, end = listView.getCount(); i < end; i++) { for (int i = start, end = listView.getCount(); i < end; i++) {
if (pos.get(i)) { if (pos.get(i)) {
accountUuids.add(mImportContents.accounts.get(i-start).uuid); accountUuids.add(mImportContents.accounts.get(i - start).uuid);
} }
} }
@ -1796,14 +1796,12 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
EnumSet<ACCOUNT_LOCATION> accountLocation = accountLocation(mSelectedContextAccount); EnumSet<ACCOUNT_LOCATION> accountLocation = accountLocation(mSelectedContextAccount);
if (accountLocation.contains(ACCOUNT_LOCATION.TOP)) { if (accountLocation.contains(ACCOUNT_LOCATION.TOP)) {
menu.findItem(R.id.move_up).setVisible(false); menu.findItem(R.id.move_up).setVisible(false);
} } else {
else {
menu.findItem(R.id.move_up).setVisible(true); menu.findItem(R.id.move_up).setVisible(true);
} }
if (accountLocation.contains(ACCOUNT_LOCATION.BOTTOM)) { if (accountLocation.contains(ACCOUNT_LOCATION.BOTTOM)) {
menu.findItem(R.id.move_down).setVisible(false); menu.findItem(R.id.move_down).setVisible(false);
} } else {
else {
menu.findItem(R.id.move_down).setVisible(true); menu.findItem(R.id.move_down).setVisible(true);
} }
@ -1974,7 +1972,9 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
} finally { } finally {
try { try {
is.close(); is.close();
} catch (IOException e) { /* Ignore */ } } catch (IOException e) {
/* Ignore */
}
} }
} catch (SettingsImportExportException e) { } catch (SettingsImportExportException e) {
Log.w(K9.LOG_TAG, "Exception during import", e); Log.w(K9.LOG_TAG, "Exception during import", e);
@ -2045,13 +2045,14 @@ public class Accounts extends K9ListActivity implements OnItemClickListener {
} finally { } finally {
try { try {
is.close(); is.close();
} catch (IOException e) { /* Ignore */ } } catch (IOException e) {
/* Ignore */
}
} }
} catch (SettingsImportExportException e) { } catch (SettingsImportExportException e) {
Log.w(K9.LOG_TAG, "Exception during export", e); Log.w(K9.LOG_TAG, "Exception during export", e);
return false; return false;
} } catch (FileNotFoundException e) {
catch (FileNotFoundException e) {
Log.w(K9.LOG_TAG, "Couldn't read content from URI " + mUri); Log.w(K9.LOG_TAG, "Couldn't read content from URI " + mUri);
return false; return false;
} }