Merge "Added carrier_id support to the carrier_key table in CarrierInformation DB"
This commit is contained in:
@@ -1424,25 +1424,6 @@ public final class Telephony {
|
|||||||
*/
|
*/
|
||||||
public static final String KEY_TYPE = "key_type";
|
public static final String KEY_TYPE = "key_type";
|
||||||
|
|
||||||
/**
|
|
||||||
* MVNO type:
|
|
||||||
* {@code SPN (Service Provider Name), IMSI, GID (Group Identifier Level 1)}.
|
|
||||||
* <P> Type: TEXT </P>
|
|
||||||
*/
|
|
||||||
public static final String MVNO_TYPE = "mvno_type";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* MVNO data.
|
|
||||||
* Use the following examples.
|
|
||||||
* <ul>
|
|
||||||
* <li>SPN: A MOBILE, BEN NL, ...</li>
|
|
||||||
* <li>IMSI: 302720x94, 2060188, ...</li>
|
|
||||||
* <li>GID: 4E, 33, ...</li>
|
|
||||||
* </ul>
|
|
||||||
* <P> Type: TEXT </P>
|
|
||||||
*/
|
|
||||||
public static final String MVNO_MATCH_DATA = "mvno_match_data";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The carrier public key that is used for the IMSI encryption.
|
* The carrier public key that is used for the IMSI encryption.
|
||||||
* <P> Type: TEXT </P>
|
* <P> Type: TEXT </P>
|
||||||
@@ -1469,6 +1450,11 @@ public final class Telephony {
|
|||||||
*/
|
*/
|
||||||
public static final String LAST_MODIFIED = "last_modified";
|
public static final String LAST_MODIFIED = "last_modified";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Carrier ID of the operetor.
|
||||||
|
* <P> Type: TEXT </P>
|
||||||
|
*/
|
||||||
|
public static final String CARRIER_ID = "carrier_id";
|
||||||
/**
|
/**
|
||||||
* The {@code content://} style URL for this table.
|
* The {@code content://} style URL for this table.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -46,16 +46,17 @@ public final class ImsiEncryptionInfo implements Parcelable {
|
|||||||
private final int keyType;
|
private final int keyType;
|
||||||
//Date-Time in UTC when the key will expire.
|
//Date-Time in UTC when the key will expire.
|
||||||
private final Date expirationTime;
|
private final Date expirationTime;
|
||||||
|
private final int carrierId;
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
public ImsiEncryptionInfo(String mcc, String mnc, int keyType, String keyIdentifier,
|
public ImsiEncryptionInfo(String mcc, String mnc, int keyType, String keyIdentifier,
|
||||||
byte[] key, Date expirationTime) {
|
byte[] key, Date expirationTime, int carrierId) {
|
||||||
this(mcc, mnc, keyType, keyIdentifier, makeKeyObject(key), expirationTime);
|
this(mcc, mnc, keyType, keyIdentifier, makeKeyObject(key), expirationTime, carrierId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
public ImsiEncryptionInfo(String mcc, String mnc, int keyType, String keyIdentifier,
|
public ImsiEncryptionInfo(String mcc, String mnc, int keyType, String keyIdentifier,
|
||||||
PublicKey publicKey, Date expirationTime) {
|
PublicKey publicKey, Date expirationTime, int carrierId) {
|
||||||
// todo need to validate that ImsiEncryptionInfo is being created with the correct params.
|
// todo need to validate that ImsiEncryptionInfo is being created with the correct params.
|
||||||
// Including validating that the public key is in "X.509" format. This will be done in
|
// Including validating that the public key is in "X.509" format. This will be done in
|
||||||
// a subsequent CL.
|
// a subsequent CL.
|
||||||
@@ -65,6 +66,7 @@ public final class ImsiEncryptionInfo implements Parcelable {
|
|||||||
this.publicKey = publicKey;
|
this.publicKey = publicKey;
|
||||||
this.keyIdentifier = keyIdentifier;
|
this.keyIdentifier = keyIdentifier;
|
||||||
this.expirationTime = expirationTime;
|
this.expirationTime = expirationTime;
|
||||||
|
this.carrierId = carrierId;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
@@ -78,6 +80,7 @@ public final class ImsiEncryptionInfo implements Parcelable {
|
|||||||
keyIdentifier = in.readString();
|
keyIdentifier = in.readString();
|
||||||
keyType = in.readInt();
|
keyType = in.readInt();
|
||||||
expirationTime = new Date(in.readLong());
|
expirationTime = new Date(in.readLong());
|
||||||
|
carrierId = in.readInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @hide */
|
/** @hide */
|
||||||
@@ -90,6 +93,11 @@ public final class ImsiEncryptionInfo implements Parcelable {
|
|||||||
return this.mcc;
|
return this.mcc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
public int getCarrierId() {
|
||||||
|
return carrierId;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns key identifier, a string that helps the authentication server to locate the
|
* Returns key identifier, a string that helps the authentication server to locate the
|
||||||
* private key to decrypt the permanent identity, or {@code null} when uavailable.
|
* private key to decrypt the permanent identity, or {@code null} when uavailable.
|
||||||
@@ -157,6 +165,7 @@ public final class ImsiEncryptionInfo implements Parcelable {
|
|||||||
dest.writeString(keyIdentifier);
|
dest.writeString(keyIdentifier);
|
||||||
dest.writeInt(keyType);
|
dest.writeInt(keyType);
|
||||||
dest.writeLong(expirationTime.getTime());
|
dest.writeLong(expirationTime.getTime());
|
||||||
|
dest.writeInt(carrierId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -164,10 +173,11 @@ public final class ImsiEncryptionInfo implements Parcelable {
|
|||||||
return "[ImsiEncryptionInfo "
|
return "[ImsiEncryptionInfo "
|
||||||
+ "mcc=" + mcc
|
+ "mcc=" + mcc
|
||||||
+ " mnc=" + mnc
|
+ " mnc=" + mnc
|
||||||
+ " publicKey=" + publicKey
|
+ ", publicKey=" + publicKey
|
||||||
+ ", keyIdentifier=" + keyIdentifier
|
+ ", keyIdentifier=" + keyIdentifier
|
||||||
+ ", keyType=" + keyType
|
+ ", keyType=" + keyType
|
||||||
+ ", expirationTime=" + expirationTime
|
+ ", expirationTime=" + expirationTime
|
||||||
|
+ ", carrier_id=" + carrierId
|
||||||
+ "]";
|
+ "]";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user