update new sdk
This commit is contained in:
parent
f33907443a
commit
744c72c133
1643 changed files with 83006 additions and 28021 deletions
29
android/frameworks/opt/telephony/src/java/com/android/internal/telephony/InboundSmsHandler.java
Normal file → Executable file
29
android/frameworks/opt/telephony/src/java/com/android/internal/telephony/InboundSmsHandler.java
Normal file → Executable file
|
@ -74,6 +74,7 @@ import java.util.Arrays;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import android.util.EventLog;
|
||||
|
||||
/**
|
||||
* This class broadcasts incoming SMS messages to interested apps after storing them in
|
||||
|
@ -803,6 +804,19 @@ public abstract class InboundSmsHandler extends StateMachine {
|
|||
int destPort = tracker.getDestPort();
|
||||
boolean block = false;
|
||||
|
||||
// Do not process when the message count is invalid.
|
||||
if (messageCount <= 0) {
|
||||
EventLog.writeEvent(
|
||||
0x534e4554 /* snetTagId */,
|
||||
"72298611" /* buganizer id */,
|
||||
-1 /* uid */,
|
||||
String.format(
|
||||
"processMessagePart: invalid messageCount = %d",
|
||||
messageCount));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
if (messageCount == 1) {
|
||||
// single-part message
|
||||
pdus = new byte[][]{tracker.getPdu()};
|
||||
|
@ -838,6 +852,21 @@ public abstract class InboundSmsHandler extends StateMachine {
|
|||
int index = cursor.getInt(PDU_SEQUENCE_PORT_PROJECTION_INDEX_MAPPING
|
||||
.get(SEQUENCE_COLUMN)) - tracker.getIndexOffset();
|
||||
|
||||
// The invalid PDUs can be received and stored in the raw table. The range
|
||||
// check ensures the process not crash even if the seqNumber in the
|
||||
// UserDataHeader is invalid.
|
||||
if (index >= pdus.length || index < 0) {
|
||||
EventLog.writeEvent(
|
||||
0x534e4554 /* snetTagId */,
|
||||
"72298611" /* buganizer id */,
|
||||
-1 /* uid */,
|
||||
String.format(
|
||||
"processMessagePart: invalid seqNumber = %d, messageCount = %d",
|
||||
index + tracker.getIndexOffset(),
|
||||
messageCount));
|
||||
continue;
|
||||
}
|
||||
|
||||
pdus[index] = HexDump.hexStringToByteArray(cursor.getString(
|
||||
PDU_SEQUENCE_PORT_PROJECTION_INDEX_MAPPING.get(PDU_COLUMN)));
|
||||
|
||||
|
|
5
android/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/mocks/ConnectivityServiceMock.java
Normal file → Executable file
5
android/frameworks/opt/telephony/tests/telephonytests/src/com/android/internal/telephony/mocks/ConnectivityServiceMock.java
Normal file → Executable file
|
@ -499,6 +499,11 @@ public class ConnectivityServiceMock extends IConnectivityManager.Stub
|
|||
throw new RuntimeException("not implemented");
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isActiveNetworkMeteredForUid(int uid) {
|
||||
throw new RuntimeException("not implemented");
|
||||
}
|
||||
|
||||
public boolean requestRouteToHostAddress(int networkType, byte[] hostAddress) {
|
||||
throw new RuntimeException("not implemented");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue