mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 21:13:35 +00:00
[android] Fix Metadata IntRange
Discovered while debugging issue #2078 Signed-off-by: eisa01 <eisa01@gmail.com>
This commit is contained in:
@@ -11,6 +11,7 @@ import java.util.Map;
|
|||||||
public class Metadata implements Parcelable
|
public class Metadata implements Parcelable
|
||||||
{
|
{
|
||||||
// Values must correspond to the Metadata definition from indexer/feature_meta.hpp.
|
// Values must correspond to the Metadata definition from indexer/feature_meta.hpp.
|
||||||
|
// Remember to also update IntRange below to match the max ID
|
||||||
public enum MetadataType
|
public enum MetadataType
|
||||||
{
|
{
|
||||||
// Defined by classifier types now.
|
// Defined by classifier types now.
|
||||||
@@ -81,7 +82,7 @@ public class Metadata implements Parcelable
|
|||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
public static MetadataType fromInt(@IntRange(from = 1, to = 49) int metaType)
|
public static MetadataType fromInt(@IntRange(from = 1, to = 56) int metaType)
|
||||||
{
|
{
|
||||||
for (MetadataType type : values())
|
for (MetadataType type : values())
|
||||||
if (type.mMetaType == metaType)
|
if (type.mMetaType == metaType)
|
||||||
|
|||||||
Reference in New Issue
Block a user