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