-
- All Implemented Interfaces:
-
cz.mroczis.netmonster.core.feature.postprocess.ICellPostprocessor
public final class SamsungEndiannessPostprocessor implements ICellPostprocessor
Samsung phones (e.g. b0sxeea) on Android 12+ have endianness issue (bytes are incorrectly glued together). This issue is present only for serving cells.
Example:
Input from the new API: 5220 (bin: 000101000 01100100)
Correct value in the old API: 25620 (bin: 01100100 000101000)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classSamsungEndiannessPostprocessor.CellSkeletonSuggested cell metadata that should be used if endianness issues are detected
-
Constructor Summary
Constructors Constructor Description SamsungEndiannessPostprocessor(Function1<Integer, SamsungEndiannessPostprocessor.CellSkeleton> getCellSkeleton, Function0<Unit> setEnabled, Function0<Boolean> isEnabled)
-
Method Summary
Modifier and Type Method Description List<ICell>postprocess(List<ICell> list)Postprocessing method that allows data modification within the list final IntegerflipEndianness(Integer number)Flips endianness assuming 16-bit long number at most final BooleanhasFlippedEndianness(Integer first, Integer second)This method assumes 16-bit long number at most! -
-
Constructor Detail
-
SamsungEndiannessPostprocessor
SamsungEndiannessPostprocessor(Function1<Integer, SamsungEndiannessPostprocessor.CellSkeleton> getCellSkeleton, Function0<Unit> setEnabled, Function0<Boolean> isEnabled)
-
-
Method Detail
-
postprocess
List<ICell> postprocess(List<ICell> list)
Postprocessing method that allows data modification within the list
-
flipEndianness
@VisibleForTesting() final Integer flipEndianness(Integer number)
Flips endianness assuming 16-bit long number at most
-
hasFlippedEndianness
@VisibleForTesting() final Boolean hasFlippedEndianness(Integer first, Integer second)
-
-
-
-