Commit 58177d52 authored by Yusuke Iwaki's avatar Yusuke Iwaki

fix findbugs issue.

parent 2bf9c53b
...@@ -7,20 +7,28 @@ import chat.rocket.android.fragment.oauth.GitHubOAuthFragment; ...@@ -7,20 +7,28 @@ import chat.rocket.android.fragment.oauth.GitHubOAuthFragment;
import chat.rocket.android.fragment.oauth.GoogleOAuthFragment; import chat.rocket.android.fragment.oauth.GoogleOAuthFragment;
import chat.rocket.android.fragment.oauth.TwitterOAuthFragment; import chat.rocket.android.fragment.oauth.TwitterOAuthFragment;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
/**
* View model for OAuth login button.
*/
public class OAuthProviderInfo { public class OAuthProviderInfo {
public String serviceName; public String serviceName;
public int buttonId; public int buttonId;
public Class<? extends AbstractOAuthFragment> fragmentClass; public Class<? extends AbstractOAuthFragment> fragmentClass;
public OAuthProviderInfo(String serviceName, int buttonId, /**
* Constructor with required parameters.
*/
private OAuthProviderInfo(String serviceName, int buttonId,
Class<? extends AbstractOAuthFragment> fragmentClass) { Class<? extends AbstractOAuthFragment> fragmentClass) {
this.serviceName = serviceName; this.serviceName = serviceName;
this.buttonId = buttonId; this.buttonId = buttonId;
this.fragmentClass = fragmentClass; this.fragmentClass = fragmentClass;
} }
public static final ArrayList<OAuthProviderInfo> LIST = new ArrayList<OAuthProviderInfo>() { private static final ArrayList<OAuthProviderInfo> _LIST = new ArrayList<OAuthProviderInfo>() {
{ {
add(new OAuthProviderInfo( add(new OAuthProviderInfo(
"twitter", R.id.btn_login_with_twitter, TwitterOAuthFragment.class)); "twitter", R.id.btn_login_with_twitter, TwitterOAuthFragment.class));
...@@ -32,4 +40,6 @@ public class OAuthProviderInfo { ...@@ -32,4 +40,6 @@ public class OAuthProviderInfo {
"facebook", R.id.btn_login_with_facebook, FacebookOAuthFragment.class)); "facebook", R.id.btn_login_with_facebook, FacebookOAuthFragment.class));
} }
}; };
public static final List<OAuthProviderInfo> LIST = Collections.unmodifiableList(_LIST);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment