Skip to content

Commit 01ce0ce

Browse files
author
Wink Saville
committed
Fix calcuation of CMD_TO_STRING_COUNT.
Change-Id: I03ae1a545474d7dcd4e65c58d9befd020d5b9c54
1 parent fe37aca commit 01ce0ce

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

core/java/com/android/internal/util/AsyncChannel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ public class AsyncChannel {
150150
*/
151151
public static final int CMD_CHANNEL_DISCONNECTED = BASE + 4;
152152

153-
private static final int CMD_TO_STRING_COUNT = CMD_CHANNEL_DISCONNECTED + 1;
153+
private static final int CMD_TO_STRING_COUNT = CMD_CHANNEL_DISCONNECTED - BASE + 1;
154154
private static String[] sCmdToString = new String[CMD_TO_STRING_COUNT];
155155
static {
156156
sCmdToString[CMD_CHANNEL_HALF_CONNECTED - BASE] = "CMD_CHANNEL_HALF_CONNECTED";

telephony/java/com/android/internal/telephony/DataConnection.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ public int getRetryOverride() {
209209
protected static final int EVENT_RIL_CONNECTED = BASE + 5;
210210
protected static final int EVENT_DISCONNECT_ALL = BASE + 6;
211211

212-
private static final int CMD_TO_STRING_COUNT = EVENT_DISCONNECT_ALL + 1;
212+
private static final int CMD_TO_STRING_COUNT = EVENT_DISCONNECT_ALL - BASE + 1;
213213
private static String[] sCmdToString = new String[CMD_TO_STRING_COUNT];
214214
static {
215215
sCmdToString[EVENT_CONNECT - BASE] = "EVENT_CONNECT";

telephony/java/com/android/internal/telephony/DataConnectionAc.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ public class DataConnectionAc extends AsyncChannel {
8282
public static final int REQ_GET_RECONNECT_INTENT = BASE + 26;
8383
public static final int RSP_GET_RECONNECT_INTENT = BASE + 27;
8484

85-
private static final int CMD_TO_STRING_COUNT = RSP_GET_RECONNECT_INTENT + 1;
85+
private static final int CMD_TO_STRING_COUNT = RSP_GET_RECONNECT_INTENT - BASE + 1;
8686
private static String[] sCmdToString = new String[CMD_TO_STRING_COUNT];
8787
static {
8888
sCmdToString[REQ_IS_INACTIVE - BASE] = "REQ_IS_INACTIVE";

0 commit comments

Comments
 (0)