Skip to content

Commit 846d77f

Browse files
committed
EmulatorView library: tidy up public API
GrowableIntArray and TextStyle are part of the library's internals and not exposed through any of the intended public APIs, so they should be marked package-private.
1 parent bed0d54 commit 846d77f

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

libraries/emulatorview/src/jackpal/androidterm/emulatorview/GrowableIntArray.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
package jackpal.androidterm.emulatorview;
22

3-
public class GrowableIntArray {
4-
public GrowableIntArray(int initalCapacity) {
3+
class GrowableIntArray {
4+
GrowableIntArray(int initalCapacity) {
55
mData = new int[initalCapacity];
66
mLength = 0;
77
}
88

9-
public void append(int i) {
9+
void append(int i) {
1010
if (mLength + 1 > mData.length) {
1111
int newLength = Math.max((mData.length * 3) >> 1, 16);
1212
int[] temp = new int[newLength];

libraries/emulatorview/src/jackpal/androidterm/emulatorview/TextStyle.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package jackpal.androidterm.emulatorview;
22

3-
public final class TextStyle {
3+
final class TextStyle {
44
// Effect bitmasks:
55
final static int fxNormal = 0;
66
final static int fxBold = 1; // Originally Bright
@@ -36,4 +36,9 @@ static int decodeBackColor(int encodedColor) {
3636
static int decodeEffect(int encodedColor) {
3737
return (encodedColor >> 18) & 0x3f;
3838
}
39+
40+
private TextStyle() {
41+
// Prevent instantiation
42+
throw new UnsupportedOperationException();
43+
}
3944
}

0 commit comments

Comments
 (0)