mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 03:29:28 +01:00
ignore spotbugs correctness for an android api array access with fixed index
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
10f6f0b02b
commit
925691299a
@ -490,9 +490,13 @@ public class DisplayUtils {
|
||||
* @param color the color
|
||||
* @return true if primaryColor is lighter than MAX_LIGHTNESS
|
||||
*/
|
||||
@SuppressWarnings("correctness")
|
||||
public static boolean lightTheme(int color) {
|
||||
float[] hsl = colorToHSL(color);
|
||||
|
||||
// spotbugs dislikes fixed index access
|
||||
// which is enforced by having such an
|
||||
// array from Android-API itself
|
||||
return hsl[INDEX_LUMINATION] >= MAX_LIGHTNESS;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user