Vrong / ovh_mail_redirections_manager_for_android

Simple OVH mail redirection manager for android
GNU General Public License v3.0
1 stars 0 forks source link

Minimum SDK set to 15 but checking if SDK > 15 in code #4

Closed gagath closed 7 years ago

gagath commented 7 years ago

Almost everything in the title.

The checks in LoginActivity.java for the showProgress method are marked as useless by Android Studio because you check SDK > 15 but minSDK is already set for 15. This warning applies for the @TargetApi(Build.VERSION_CODES.HONEYCOMB_MR2) and if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB_MR2) code.

Proposed solution is either support SDK < 15 (not sure this is what we want) or remove the not needed checks.

Vrong commented 7 years ago

This is part of the auto-generated code, I will take a look whenever I've got time.

Vrong commented 7 years ago

I've taken a look into the issue. This guarantees that the application will still work if run under SDK 15, however as you stated the minimum SDK is set to 15 so it should not happen. Nevertheless this part of code indicates the compatibility level of the wrapped code. This does not make sense on a project point of view but it does on a local one. It's part of the LoginActivity complete behaviour and makes it would still work if ported to a lower SDK level. (for whatever reason, by any contributor of forker) There can be a debate on this, but there is not point as this piece of code doesn't cause any harm.

gagath commented 7 years ago

Ok, seems fair to me.