Added service temporarily unavailable support
Added a mechanism for underlying data service to report service temporarily unavailable. In this case, frameworks uses the configured retry timer to retry establishing data connection again. Fix: 184122463 Test: atest DataConnectionTest Change-Id: I57705b720b6438d8f9f0076f83decc1c17782f6b
This commit is contained in:
@@ -1069,6 +1069,13 @@ public final class DataFailCause {
|
||||
*/
|
||||
public static final int NO_DEFAULT_DATA = 0x10008;
|
||||
|
||||
/**
|
||||
* Data service is temporarily unavailable.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public static final int SERVICE_TEMPORARILY_UNAVAILABLE = 0x10009;
|
||||
|
||||
private static final Map<Integer, String> sFailCauseMap;
|
||||
static {
|
||||
sFailCauseMap = new HashMap<>();
|
||||
@@ -1500,6 +1507,7 @@ public final class DataFailCause {
|
||||
sFailCauseMap.put(HANDOVER_FAILED, "HANDOVER_FAILED");
|
||||
sFailCauseMap.put(DUPLICATE_CID, "DUPLICATE_CID");
|
||||
sFailCauseMap.put(NO_DEFAULT_DATA, "NO_DEFAULT_DATA");
|
||||
sFailCauseMap.put(SERVICE_TEMPORARILY_UNAVAILABLE, "SERVICE_TEMPORARILY_UNAVAILABLE");
|
||||
}
|
||||
|
||||
private DataFailCause() {
|
||||
|
||||
@@ -63,6 +63,11 @@ public class DataServiceCallback {
|
||||
public static final int RESULT_ERROR_BUSY = 3;
|
||||
/** Request sent in illegal state */
|
||||
public static final int RESULT_ERROR_ILLEGAL_STATE = 4;
|
||||
/**
|
||||
* Service is temporarily unavailable. Frameworks should retry the request again.
|
||||
* @hide
|
||||
*/
|
||||
public static final int RESULT_ERROR_TEMPORARILY_UNAVAILABLE = 5;
|
||||
|
||||
private final IDataServiceCallback mCallback;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user