Merge "IMS: Add support for STK CC feature"
am: bc813005b8
Change-Id: I69dcdb09f8e174acfe6268ede87b1f804b0e33f1
This commit is contained in:
@@ -4422,7 +4422,9 @@
|
||||
<string name="stk_cc_ussd_to_dial">USSD request is modified to DIAL request.</string>
|
||||
<string name="stk_cc_ussd_to_ss">USSD request is modified to SS request.</string>
|
||||
<string name="stk_cc_ussd_to_ussd">USSD request is modified to new USSD request.</string>
|
||||
<string name="stk_cc_ussd_to_dial_video">USSD request is modified to Video DIAL request.</string>
|
||||
<string name="stk_cc_ss_to_dial">SS request is modified to DIAL request.</string>
|
||||
<string name="stk_cc_ss_to_dial_video">SS request is modified to Video DIAL request.</string>
|
||||
<string name="stk_cc_ss_to_ussd">SS request is modified to USSD request.</string>
|
||||
<string name="stk_cc_ss_to_ss">SS request is modified to new SS request.</string>
|
||||
|
||||
|
||||
@@ -1031,9 +1031,11 @@
|
||||
<java-symbol type="string" name="stk_cc_ss_to_dial" />
|
||||
<java-symbol type="string" name="stk_cc_ss_to_ss" />
|
||||
<java-symbol type="string" name="stk_cc_ss_to_ussd" />
|
||||
<java-symbol type="string" name="stk_cc_ss_to_dial_video" />
|
||||
<java-symbol type="string" name="stk_cc_ussd_to_dial" />
|
||||
<java-symbol type="string" name="stk_cc_ussd_to_ss" />
|
||||
<java-symbol type="string" name="stk_cc_ussd_to_ussd" />
|
||||
<java-symbol type="string" name="stk_cc_ussd_to_dial_video" />
|
||||
<java-symbol type="string" name="safe_media_volume_warning" />
|
||||
<java-symbol type="string" name="media_route_status_scanning" />
|
||||
<java-symbol type="string" name="media_route_status_connecting" />
|
||||
|
||||
@@ -280,6 +280,36 @@ public class DisconnectCause {
|
||||
* {@hide}
|
||||
*/
|
||||
public static final int NORMAL_UNSPECIFIED = 65;
|
||||
|
||||
/**
|
||||
* Stk Call Control modified DIAL request to video DIAL request.
|
||||
* {@hide}
|
||||
*/
|
||||
public static final int DIAL_MODIFIED_TO_DIAL_VIDEO = 66;
|
||||
|
||||
/**
|
||||
* Stk Call Control modified Video DIAL request to SS request.
|
||||
* {@hide}
|
||||
*/
|
||||
public static final int DIAL_VIDEO_MODIFIED_TO_SS = 67;
|
||||
|
||||
/**
|
||||
* Stk Call Control modified Video DIAL request to USSD request.
|
||||
* {@hide}
|
||||
*/
|
||||
public static final int DIAL_VIDEO_MODIFIED_TO_USSD = 68;
|
||||
|
||||
/**
|
||||
* Stk Call Control modified Video DIAL request to DIAL request.
|
||||
* {@hide}
|
||||
*/
|
||||
public static final int DIAL_VIDEO_MODIFIED_TO_DIAL = 69;
|
||||
|
||||
/**
|
||||
* Stk Call Control modified Video DIAL request to Video DIAL request.
|
||||
* {@hide}
|
||||
*/
|
||||
public static final int DIAL_VIDEO_MODIFIED_TO_DIAL_VIDEO = 70;
|
||||
//*********************************************************************************************
|
||||
// When adding a disconnect type:
|
||||
// 1) Update toString() with the newly added disconnect type.
|
||||
@@ -382,6 +412,16 @@ public class DisconnectCause {
|
||||
return "DIAL_MODIFIED_TO_SS";
|
||||
case DIAL_MODIFIED_TO_DIAL:
|
||||
return "DIAL_MODIFIED_TO_DIAL";
|
||||
case DIAL_MODIFIED_TO_DIAL_VIDEO:
|
||||
return "DIAL_MODIFIED_TO_DIAL_VIDEO";
|
||||
case DIAL_VIDEO_MODIFIED_TO_SS:
|
||||
return "DIAL_VIDEO_MODIFIED_TO_SS";
|
||||
case DIAL_VIDEO_MODIFIED_TO_USSD:
|
||||
return "DIAL_VIDEO_MODIFIED_TO_USSD";
|
||||
case DIAL_VIDEO_MODIFIED_TO_DIAL:
|
||||
return "DIAL_VIDEO_MODIFIED_TO_DIAL";
|
||||
case DIAL_VIDEO_MODIFIED_TO_DIAL_VIDEO:
|
||||
return "DIAL_VIDEO_MODIFIED_TO_DIAL_VIDEO";
|
||||
case ERROR_UNSPECIFIED:
|
||||
return "ERROR_UNSPECIFIED";
|
||||
case OUTGOING_FAILURE:
|
||||
|
||||
@@ -21,6 +21,7 @@ import android.os.RemoteException;
|
||||
|
||||
import com.android.ims.ImsCallForwardInfo;
|
||||
import com.android.ims.ImsReasonInfo;
|
||||
import com.android.ims.ImsSsData;
|
||||
import com.android.ims.ImsSsInfo;
|
||||
import com.android.ims.internal.IImsUt;
|
||||
import com.android.ims.internal.IImsUtListener;
|
||||
@@ -85,4 +86,10 @@ public class ImsUtListenerImplBase extends IImsUtListener.Stub {
|
||||
public void utConfigurationCallWaitingQueried(IImsUt ut, int id, ImsSsInfo[] cwInfo)
|
||||
throws RemoteException {
|
||||
}
|
||||
|
||||
/**
|
||||
* Notifies client when Supplementary Service indication is received
|
||||
*/
|
||||
@Override
|
||||
public void onSupplementaryServiceIndication(ImsSsData ssData) {}
|
||||
}
|
||||
|
||||
@@ -111,6 +111,16 @@ public class ImsReasonInfo implements Parcelable {
|
||||
// and this capability is not supported by the network.
|
||||
public static final int CODE_IMEI_NOT_ACCEPTED = 243;
|
||||
|
||||
//STK CC errors
|
||||
public static final int CODE_DIAL_MODIFIED_TO_USSD = 244;
|
||||
public static final int CODE_DIAL_MODIFIED_TO_SS = 245;
|
||||
public static final int CODE_DIAL_MODIFIED_TO_DIAL = 246;
|
||||
public static final int CODE_DIAL_MODIFIED_TO_DIAL_VIDEO = 247;
|
||||
public static final int CODE_DIAL_VIDEO_MODIFIED_TO_DIAL = 248;
|
||||
public static final int CODE_DIAL_VIDEO_MODIFIED_TO_DIAL_VIDEO = 249;
|
||||
public static final int CODE_DIAL_VIDEO_MODIFIED_TO_SS = 250;
|
||||
public static final int CODE_DIAL_VIDEO_MODIFIED_TO_USSD = 251;
|
||||
|
||||
/**
|
||||
* STATUSCODE (SIP response code) (IMS -> Telephony)
|
||||
*/
|
||||
@@ -217,6 +227,11 @@ public class ImsReasonInfo implements Parcelable {
|
||||
public static final int CODE_UT_OPERATION_NOT_ALLOWED = 803;
|
||||
public static final int CODE_UT_NETWORK_ERROR = 804;
|
||||
public static final int CODE_UT_CB_PASSWORD_MISMATCH = 821;
|
||||
//STK CC errors
|
||||
public static final int CODE_UT_SS_MODIFIED_TO_DIAL = 822;
|
||||
public static final int CODE_UT_SS_MODIFIED_TO_USSD = 823;
|
||||
public static final int CODE_UT_SS_MODIFIED_TO_SS = 824;
|
||||
public static final int CODE_UT_SS_MODIFIED_TO_DIAL_VIDEO = 825;
|
||||
|
||||
/**
|
||||
* ECBM
|
||||
|
||||
19
telephony/java/com/android/ims/ImsSsData.aidl
Normal file
19
telephony/java/com/android/ims/ImsSsData.aidl
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.android.ims;
|
||||
|
||||
parcelable ImsSsData;
|
||||
189
telephony/java/com/android/ims/ImsSsData.java
Normal file
189
telephony/java/com/android/ims/ImsSsData.java
Normal file
@@ -0,0 +1,189 @@
|
||||
/*
|
||||
* Copyright (c) 2017 The Android Open Source Project
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package com.android.ims;
|
||||
|
||||
import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
* Provided STK Call Control Suplementary Service information
|
||||
*
|
||||
* {@hide}
|
||||
*/
|
||||
public class ImsSsData implements Parcelable {
|
||||
|
||||
//ServiceType
|
||||
public static final int SS_CFU = 0;
|
||||
public static final int SS_CF_BUSY = 1;
|
||||
public static final int SS_CF_NO_REPLY = 2;
|
||||
public static final int SS_CF_NOT_REACHABLE = 3;
|
||||
public static final int SS_CF_ALL = 4;
|
||||
public static final int SS_CF_ALL_CONDITIONAL = 5;
|
||||
public static final int SS_CFUT = 6;
|
||||
public static final int SS_CLIP = 7;
|
||||
public static final int SS_CLIR = 8;
|
||||
public static final int SS_COLP = 9;
|
||||
public static final int SS_COLR = 10;
|
||||
public static final int SS_CNAP = 11;
|
||||
public static final int SS_WAIT = 12;
|
||||
public static final int SS_BAOC = 13;
|
||||
public static final int SS_BAOIC = 14;
|
||||
public static final int SS_BAOIC_EXC_HOME = 15;
|
||||
public static final int SS_BAIC = 16;
|
||||
public static final int SS_BAIC_ROAMING = 17;
|
||||
public static final int SS_ALL_BARRING = 18;
|
||||
public static final int SS_OUTGOING_BARRING = 19;
|
||||
public static final int SS_INCOMING_BARRING = 20;
|
||||
public static final int SS_INCOMING_BARRING_DN = 21;
|
||||
public static final int SS_INCOMING_BARRING_ANONYMOUS = 22;
|
||||
|
||||
//SSRequestType
|
||||
public static final int SS_ACTIVATION = 0;
|
||||
public static final int SS_DEACTIVATION = 1;
|
||||
public static final int SS_INTERROGATION = 2;
|
||||
public static final int SS_REGISTRATION = 3;
|
||||
public static final int SS_ERASURE = 4;
|
||||
|
||||
//TeleserviceType
|
||||
public static final int SS_ALL_TELE_AND_BEARER_SERVICES = 0;
|
||||
public static final int SS_ALL_TELESEVICES = 1;
|
||||
public static final int SS_TELEPHONY = 2;
|
||||
public static final int SS_ALL_DATA_TELESERVICES = 3;
|
||||
public static final int SS_SMS_SERVICES = 4;
|
||||
public static final int SS_ALL_TELESERVICES_EXCEPT_SMS = 5;
|
||||
|
||||
// Refer to ServiceType
|
||||
public int serviceType;
|
||||
// Refere to SSRequestType
|
||||
public int requestType;
|
||||
// Refer to TeleserviceType
|
||||
public int teleserviceType;
|
||||
// Service Class
|
||||
public int serviceClass;
|
||||
// Error information
|
||||
public int result;
|
||||
|
||||
public int[] ssInfo; /* Valid for all supplementary services.
|
||||
This field will be empty for RequestType SS_INTERROGATION
|
||||
and ServiceType SS_CF_*, SS_INCOMING_BARRING_DN,
|
||||
SS_INCOMING_BARRING_ANONYMOUS.*/
|
||||
|
||||
public ImsCallForwardInfo[] cfInfo; /* Valid only for supplementary services
|
||||
ServiceType SS_CF_* and RequestType SS_INTERROGATION */
|
||||
|
||||
public ImsSsInfo[] imsSsInfo; /* Valid only for ServiceType SS_INCOMING_BARRING_DN and
|
||||
ServiceType SS_INCOMING_BARRING_ANONYMOUS */
|
||||
|
||||
public ImsSsData() {}
|
||||
|
||||
public ImsSsData(Parcel in) {
|
||||
readFromParcel(in);
|
||||
}
|
||||
|
||||
public static final Creator<ImsSsData> CREATOR = new Creator<ImsSsData>() {
|
||||
@Override
|
||||
public ImsSsData createFromParcel(Parcel in) {
|
||||
return new ImsSsData(in);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ImsSsData[] newArray(int size) {
|
||||
return new ImsSsData[size];
|
||||
}
|
||||
};
|
||||
|
||||
@Override
|
||||
public void writeToParcel(Parcel out, int flags) {
|
||||
out.writeInt(serviceType);
|
||||
out.writeInt(requestType);
|
||||
out.writeInt(teleserviceType);
|
||||
out.writeInt(serviceClass);
|
||||
out.writeInt(result);
|
||||
out.writeIntArray(ssInfo);
|
||||
out.writeParcelableArray(cfInfo, 0);
|
||||
}
|
||||
|
||||
private void readFromParcel(Parcel in) {
|
||||
serviceType = in.readInt();
|
||||
requestType = in.readInt();
|
||||
teleserviceType = in.readInt();
|
||||
serviceClass = in.readInt();
|
||||
result = in.readInt();
|
||||
ssInfo = in.createIntArray();
|
||||
cfInfo = (ImsCallForwardInfo[])in.readParcelableArray(this.getClass().getClassLoader());
|
||||
}
|
||||
|
||||
@Override
|
||||
public int describeContents() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
public boolean isTypeCF() {
|
||||
return (serviceType == SS_CFU || serviceType == SS_CF_BUSY ||
|
||||
serviceType == SS_CF_NO_REPLY || serviceType == SS_CF_NOT_REACHABLE ||
|
||||
serviceType == SS_CF_ALL || serviceType == SS_CF_ALL_CONDITIONAL);
|
||||
}
|
||||
|
||||
public boolean isTypeUnConditional() {
|
||||
return (serviceType == SS_CFU || serviceType == SS_CF_ALL);
|
||||
}
|
||||
|
||||
public boolean isTypeCW() {
|
||||
return (serviceType == SS_WAIT);
|
||||
}
|
||||
|
||||
public boolean isTypeClip() {
|
||||
return (serviceType == SS_CLIP);
|
||||
}
|
||||
|
||||
public boolean isTypeColr() {
|
||||
return (serviceType == SS_COLR);
|
||||
}
|
||||
|
||||
public boolean isTypeColp() {
|
||||
return (serviceType == SS_COLP);
|
||||
}
|
||||
|
||||
public boolean isTypeClir() {
|
||||
return (serviceType == SS_CLIR);
|
||||
}
|
||||
|
||||
public boolean isTypeIcb() {
|
||||
return (serviceType == SS_INCOMING_BARRING_DN ||
|
||||
serviceType == SS_INCOMING_BARRING_ANONYMOUS);
|
||||
}
|
||||
|
||||
public boolean isTypeBarring() {
|
||||
return (serviceType == SS_BAOC || serviceType == SS_BAOIC ||
|
||||
serviceType == SS_BAOIC_EXC_HOME || serviceType == SS_BAIC ||
|
||||
serviceType == SS_BAIC_ROAMING || serviceType == SS_ALL_BARRING ||
|
||||
serviceType == SS_OUTGOING_BARRING || serviceType == SS_INCOMING_BARRING);
|
||||
}
|
||||
|
||||
public boolean isTypeInterrogation() {
|
||||
return (requestType == SS_INTERROGATION);
|
||||
}
|
||||
|
||||
public String toString() {
|
||||
return "[ImsSsData] " + "ServiceType: " + serviceType
|
||||
+ " RequestType: " + requestType
|
||||
+ " TeleserviceType: " + teleserviceType
|
||||
+ " ServiceClass: " + serviceClass
|
||||
+ " Result: " + result;
|
||||
}
|
||||
}
|
||||
@@ -16,6 +16,7 @@
|
||||
|
||||
package com.android.ims;
|
||||
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
|
||||
/**
|
||||
@@ -188,4 +189,18 @@ public interface ImsUtInterface {
|
||||
* Updates the configuration of the COLP supplementary service.
|
||||
*/
|
||||
public void updateCOLP(boolean enable, Message result);
|
||||
|
||||
/**
|
||||
* Register for UNSOL_ON_SS indications.
|
||||
* @param handler the {@link Handler} that is notified when there is an ss indication.
|
||||
* @param event Supplimentary service indication event.
|
||||
* @param Object user object.
|
||||
*/
|
||||
public void registerForSuppServiceIndication(Handler handler, int event, Object object);
|
||||
|
||||
/**
|
||||
* Deregister for UNSOL_ON_SS indications.
|
||||
* @param handler the {@link Handler} that is notified when there is an ss indication.
|
||||
*/
|
||||
public void unregisterForSuppServiceIndication(Handler handler);
|
||||
}
|
||||
|
||||
@@ -19,6 +19,7 @@ package com.android.ims.internal;
|
||||
import android.os.Bundle;
|
||||
|
||||
import com.android.ims.ImsCallForwardInfo;
|
||||
import com.android.ims.ImsSsData;
|
||||
import com.android.ims.ImsSsInfo;
|
||||
import com.android.ims.internal.IImsUt;
|
||||
import com.android.ims.ImsReasonInfo;
|
||||
@@ -56,4 +57,11 @@ oneway interface IImsUtListener {
|
||||
*/
|
||||
void utConfigurationCallWaitingQueried(in IImsUt ut,
|
||||
int id, in ImsSsInfo[] cwInfo);
|
||||
|
||||
/**
|
||||
* Notifies client when Supplementary Service indication is received
|
||||
*
|
||||
* @param ssData Details of SS request and response information
|
||||
*/
|
||||
void onSupplementaryServiceIndication(in ImsSsData ssData);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user