From 63047e0ac6ba3e67df4c611c15d67113052741bf Mon Sep 17 00:00:00 2001 From: Marine Date: Mon, 16 Feb 2015 15:03:11 +0100 Subject: [PATCH 1/2] remove redundant cast (Button) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit findViewById(R.id.pop) , findViewById(R.id.imap) and findViewById(R.id.webdav) are Button so it’s redundant to cast it to Button --- .../fsck/k9/activity/setup/AccountSetupAccountType.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/k9mail/src/main/java/com/fsck/k9/activity/setup/AccountSetupAccountType.java b/k9mail/src/main/java/com/fsck/k9/activity/setup/AccountSetupAccountType.java index 1e07fc6c0..5bc9f4130 100644 --- a/k9mail/src/main/java/com/fsck/k9/activity/setup/AccountSetupAccountType.java +++ b/k9mail/src/main/java/com/fsck/k9/activity/setup/AccountSetupAccountType.java @@ -7,7 +7,6 @@ import android.os.Bundle; import android.util.Log; import android.view.View; import android.view.View.OnClickListener; -import android.widget.Button; import android.widget.Toast; import com.fsck.k9.Account; import com.fsck.k9.K9; @@ -41,9 +40,9 @@ public class AccountSetupAccountType extends K9Activity implements OnClickListen public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.account_setup_account_type); - ((Button)findViewById(R.id.pop)).setOnClickListener(this); - ((Button)findViewById(R.id.imap)).setOnClickListener(this); - ((Button)findViewById(R.id.webdav)).setOnClickListener(this); + findViewById(R.id.pop).setOnClickListener(this); + findViewById(R.id.imap).setOnClickListener(this); + findViewById(R.id.webdav).setOnClickListener(this); String accountUuid = getIntent().getStringExtra(EXTRA_ACCOUNT); mAccount = Preferences.getPreferences(this).getAccount(accountUuid); From f5cac2c71f54af3efc2b1b8a5b61e8c6f2266335 Mon Sep 17 00:00:00 2001 From: Marine Date: Mon, 16 Feb 2015 15:10:34 +0100 Subject: [PATCH 2/2] remove redundant cast Button to WelcomeMessage MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit findViewById(R.id.next) and findViewById(R.id.import_settings) are Button so it’s redundant to cast it to Button --- .../main/java/com/fsck/k9/activity/setup/WelcomeMessage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/k9mail/src/main/java/com/fsck/k9/activity/setup/WelcomeMessage.java b/k9mail/src/main/java/com/fsck/k9/activity/setup/WelcomeMessage.java index 9c30bb0c2..afc4aabd2 100644 --- a/k9mail/src/main/java/com/fsck/k9/activity/setup/WelcomeMessage.java +++ b/k9mail/src/main/java/com/fsck/k9/activity/setup/WelcomeMessage.java @@ -33,8 +33,8 @@ public class WelcomeMessage extends K9Activity implements OnClickListener{ welcome.setText(HtmlConverter.htmlToSpanned(getString(R.string.accounts_welcome))); welcome.setMovementMethod(LinkMovementMethod.getInstance()); - ((Button) findViewById(R.id.next)).setOnClickListener(this); - ((Button) findViewById(R.id.import_settings)).setOnClickListener(this); + findViewById(R.id.next).setOnClickListener(this); + findViewById(R.id.import_settings).setOnClickListener(this); } @Override