Changes due to Codacy

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2018-08-14 10:03:31 +02:00
parent eae43cf464
commit b24f6c2d33
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7
5 changed files with 8 additions and 11 deletions

View file

@ -296,7 +296,7 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
mIsFirstAuthAttempt = savedInstanceState.getBoolean(KEY_AUTH_IS_FIRST_ATTEMPT_TAG);
}
String webloginUrl;
String webloginUrl = null;
boolean showLegacyLogin;
if (getIntent().getBooleanExtra(EXTRA_USE_PROVIDER_AS_WEBLOGIN, false)) {
webViewLoginMethod = true;
@ -304,7 +304,6 @@ public class AuthenticatorActivity extends AccountAuthenticatorActivity
showLegacyLogin = false;
} else {
webViewLoginMethod = !TextUtils.isEmpty(getResources().getString(R.string.webview_login_url));
webloginUrl = null;
showLegacyLogin = true;
}

View file

@ -57,8 +57,6 @@ public class FirstRunActivity extends BaseActivity implements ViewPager.OnPageCh
public static final String EXTRA_ALLOW_CLOSE = "ALLOW_CLOSE";
public static final int FIRST_RUN_RESULT_CODE = 199;
private static final String TAG = FirstRunActivity.class.getSimpleName();
private ProgressIndicator mProgress;
@Override

View file

@ -159,7 +159,7 @@ public class WhatsNewActivity extends FragmentActivity implements ViewPager.OnPa
}
static private boolean shouldShow(Context context) {
return !(context instanceof PassCodeActivity) && (getWhatsNew(context).length > 0);
return !(context instanceof PassCodeActivity) && getWhatsNew(context).length > 0;
}
@Override
@ -189,9 +189,9 @@ public class WhatsNewActivity extends FragmentActivity implements ViewPager.OnPa
if (!isFirstRun(context) && MainApp.getVersionCode() >= itemVersionCode
&& lastSeenVersionCode < itemVersionCode) {
return new FeatureItem[]{(new FeatureItem(R.drawable.whats_new_device_credentials,
return new FeatureItem[]{new FeatureItem(R.drawable.whats_new_device_credentials,
R.string.whats_new_device_credentials_title, R.string.whats_new_device_credentials_content,
false, false))};
false, false)};
} else {
return new FeatureItem[0];
}

View file

@ -11,7 +11,7 @@ public class FeaturesViewAdapter extends FragmentPagerAdapter {
private FeatureItem[] mFeatures;
public FeaturesViewAdapter(FragmentManager fm, FeatureItem[] features) {
public FeaturesViewAdapter(FragmentManager fm, FeatureItem... features) {
super(fm);
mFeatures = features;
}
@ -25,4 +25,4 @@ public class FeaturesViewAdapter extends FragmentPagerAdapter {
public int getCount() {
return mFeatures.length;
}
}
}

View file

@ -9,7 +9,7 @@ import com.owncloud.android.ui.fragment.FeatureWebFragment;
public class FeaturesWebViewAdapter extends FragmentPagerAdapter {
private String[] mWebUrls;
public FeaturesWebViewAdapter(FragmentManager fm, String[] webUrls) {
public FeaturesWebViewAdapter(FragmentManager fm, String... webUrls) {
super(fm);
mWebUrls = webUrls;
}
@ -23,4 +23,4 @@ public class FeaturesWebViewAdapter extends FragmentPagerAdapter {
public int getCount() {
return mWebUrls.length;
}
}
}