mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-06 02:35:19 +08:00
Fix minor Android Studio inspection warnings
This commit is contained in:
@@ -110,6 +110,7 @@ final class TermuxInstaller {
|
|||||||
outStream.write(buffer, 0, readBytes);
|
outStream.write(buffer, 0, readBytes);
|
||||||
}
|
}
|
||||||
if (zipEntryName.startsWith("bin/") || zipEntryName.startsWith("libexec") || zipEntryName.startsWith("lib/apt/methods")) {
|
if (zipEntryName.startsWith("bin/") || zipEntryName.startsWith("libexec") || zipEntryName.startsWith("lib/apt/methods")) {
|
||||||
|
//noinspection OctalInteger
|
||||||
Os.chmod(targetFile.getAbsolutePath(), 0700);
|
Os.chmod(targetFile.getAbsolutePath(), 0700);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1738,7 +1738,7 @@ public final class TerminalEmulator {
|
|||||||
default:
|
default:
|
||||||
// The ESC character was not followed by a \, so insert the ESC and
|
// The ESC character was not followed by a \, so insert the ESC and
|
||||||
// the current character in arg buffer.
|
// the current character in arg buffer.
|
||||||
collectOSCArgs((byte) 033);
|
collectOSCArgs(27);
|
||||||
collectOSCArgs(b);
|
collectOSCArgs(b);
|
||||||
continueSequence(ESC_OSC);
|
continueSequence(ESC_OSC);
|
||||||
break;
|
break;
|
||||||
|
@@ -12,7 +12,8 @@ public class KeyHandlerTest extends TestCase {
|
|||||||
if (buffer.length() > 0) {
|
if (buffer.length() > 0) {
|
||||||
buffer.append(" ");
|
buffer.append(" ");
|
||||||
}
|
}
|
||||||
buffer.append("0x" + Integer.toHexString(s.charAt(i)));
|
buffer.append("0x");
|
||||||
|
buffer.append(Integer.toHexString(s.charAt(i)));
|
||||||
}
|
}
|
||||||
return buffer.toString();
|
return buffer.toString();
|
||||||
}
|
}
|
||||||
|
@@ -1,6 +1,7 @@
|
|||||||
package com.termux.terminal;
|
package com.termux.terminal;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
import java.util.Random;
|
||||||
|
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
|
||||||
@@ -99,9 +100,10 @@ public class TerminalRowTest extends TestCase {
|
|||||||
|
|
||||||
char[] rawLine = new char[80];
|
char[] rawLine = new char[80];
|
||||||
Arrays.fill(rawLine, ' ');
|
Arrays.fill(rawLine, ' ');
|
||||||
|
Random random = new Random();
|
||||||
for (int i = 0; i < 1000; i++) {
|
for (int i = 0; i < 1000; i++) {
|
||||||
int lineIndex = (int) Math.random() * rawLine.length;
|
int lineIndex = random.nextInt(rawLine.length);
|
||||||
int charIndex = (int) Math.random() * someChars.length;
|
int charIndex = random.nextInt(someChars.length);
|
||||||
rawLine[lineIndex] = someChars[charIndex];
|
rawLine[lineIndex] = someChars[charIndex];
|
||||||
row.setChar(lineIndex, someChars[charIndex], 0);
|
row.setChar(lineIndex, someChars[charIndex], 0);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user