This repository was archived by the owner on Oct 5, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
app/src/main/java/com/grarak/kerneladiutor/utils/kernel/sound Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -354,13 +354,15 @@ public static boolean supported() {
354354 || hasMicrophoneGain () || hasVolumeGain ();
355355 }
356356
357- private static int getChecksum (int arg0 , int arg1 ) {
358- return 0xff & (Integer .MAX_VALUE ^ ( arg0 & 0xff ) + ( arg1 & 0xff ) );
357+ private static long getChecksum (int a , int b ) {
358+ return (Integer .MAX_VALUE * 2L + 1L ) ^ ( a + b );
359359 }
360360
361361 private static void fauxRun (String value , String path , String id , Context context ) {
362- int checksum = value .contains (" " ) ? getChecksum (Utils .strToInt (value .split (" " )[0 ]),
363- Utils .strToInt (value .split (" " )[1 ])) : getChecksum (Utils .strToInt (value ), 0 );
362+ long checksum = value .contains (" " ) ?
363+ getChecksum (Utils .strToInt (value .split (" " )[0 ]),
364+ Utils .strToInt (value .split (" " )[1 ])) :
365+ getChecksum (Utils .strToInt (value ), 0 );
364366 run (Control .write (value + " " + checksum , path ), id , context );
365367 run (Control .write (value , path ), id + "nochecksum" , context );
366368 }
You can’t perform that action at this time.
0 commit comments