Merge "Moved 5G+ PCO related code to data modules"

This commit is contained in:
Sarah Chin
2022-03-19 00:36:17 +00:00
committed by Gerrit Code Review
2 changed files with 24 additions and 1 deletions

View File

@@ -19,6 +19,9 @@ package android.telephony;
import android.os.Parcel;
import android.os.Parcelable;
import java.util.Arrays;
import java.util.Objects;
/**
* Contains Carrier-specific (and opaque) Protocol configuration Option
* Data. In general this is only passed on to carrier-specific applications
@@ -84,4 +87,22 @@ public class PcoData implements Parcelable {
return "PcoData(" + cid + ", " + bearerProto + ", " + pcoId + ", contents[" +
contents.length + "])";
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
PcoData pcoData = (PcoData) o;
return cid == pcoData.cid
&& pcoId == pcoData.pcoId
&& Objects.equals(bearerProto, pcoData.bearerProto)
&& Arrays.equals(contents, pcoData.contents);
}
@Override
public int hashCode() {
int result = Objects.hash(cid, bearerProto, pcoId);
result = 31 * result + Arrays.hashCode(contents);
return result;
}
}

View File

@@ -253,8 +253,10 @@ public class DataServiceCallback {
return "RESULT_ERROR_BUSY";
case RESULT_ERROR_ILLEGAL_STATE:
return "RESULT_ERROR_ILLEGAL_STATE";
case RESULT_ERROR_TEMPORARILY_UNAVAILABLE:
return "RESULT_ERROR_TEMPORARILY_UNAVAILABLE";
default:
return "Missing case for result code=" + resultCode;
return "Unknown(" + resultCode + ")";
}
}