Merge "Replace no error code '0' for SMS with '-1'"

This commit is contained in:
Treehugger Robot
2019-07-03 18:08:28 +00:00
committed by Gerrit Code Review
2 changed files with 3 additions and 2 deletions

View File

@@ -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

View File

@@ -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);