Replace no error code '0' for SMS with '-1'
Use '-1' for no error instead of '0' since the '0' has been one of the valid error codes in 3GPP2. Test: Manual Change-Id: I02ba391a5cd178491868565c10bb3a35ba88e19a Signed-off-by: Taesu Lee <taesu82.lee@samsung.com>
This commit is contained in:
@@ -52,7 +52,7 @@ public class SendStatusReceiver extends BroadcastReceiver {
|
|||||||
public static final String EXTRA_PART_ID = "partId";
|
public static final String EXTRA_PART_ID = "partId";
|
||||||
public static final String EXTRA_SUB_ID = "subId";
|
public static final String EXTRA_SUB_ID = "subId";
|
||||||
|
|
||||||
public static final int NO_ERROR_CODE = 0;
|
public static final int NO_ERROR_CODE = -1;
|
||||||
public static final int NO_PART_ID = -1;
|
public static final int NO_PART_ID = -1;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -186,7 +186,8 @@ public final class SmsReceiver extends BroadcastReceiver {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
final int errorCode = intent.getIntExtra(EXTRA_ERROR_CODE, 0);
|
final int errorCode =
|
||||||
|
intent.getIntExtra(EXTRA_ERROR_CODE, SendStatusReceiver.NO_ERROR_CODE);
|
||||||
// Always convert negative subIds into -1
|
// Always convert negative subIds into -1
|
||||||
int subId = PhoneUtils.getDefault().getEffectiveIncomingSubIdFromSystem(
|
int subId = PhoneUtils.getDefault().getEffectiveIncomingSubIdFromSystem(
|
||||||
intent, EXTRA_SUB_ID);
|
intent, EXTRA_SUB_ID);
|
||||||
|
|||||||
Reference in New Issue
Block a user