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:
Taesu Lee
2019-06-25 12:31:39 +09:00
parent 5500d33555
commit da8b67be0c
2 changed files with 3 additions and 2 deletions
@@ -52,7 +52,7 @@ public class SendStatusReceiver extends BroadcastReceiver {
public static final String EXTRA_PART_ID = "partId";
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;
@Override
@@ -186,7 +186,8 @@ public final class SmsReceiver extends BroadcastReceiver {
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
int subId = PhoneUtils.getDefault().getEffectiveIncomingSubIdFromSystem(
intent, EXTRA_SUB_ID);