Merge "Add ims registration status"

This commit is contained in:
Treehugger Robot
2017-09-11 19:44:31 +00:00
committed by Gerrit Code Review
3 changed files with 37 additions and 0 deletions

View File

@@ -1500,6 +1500,14 @@ public class CarrierConfigManager {
public static final String IMSI_KEY_EXPIRATION_DAYS_TIME_INT =
"imsi_key_expiration_days_time_int";
/**
* Flag specifying whether IMS registration state menu is shown in Status Info setting,
* default to false.
* @hide
*/
public static final String KEY_SHOW_IMS_REGISTRATION_STATUS_BOOL =
"show_ims_registration_status_bool";
/** The default value for every variable. */
private final static PersistableBundle sDefaults;
@@ -1752,6 +1760,7 @@ public class CarrierConfigManager {
sDefaults.putStringArray(KEY_ROAMING_OPERATOR_STRING_ARRAY, null);
sDefaults.putInt(IMSI_KEY_EXPIRATION_DAYS_TIME_INT, IMSI_ENCRYPTION_DAYS_TIME_DISABLED);
sDefaults.putString(IMSI_KEY_DOWNLOAD_URL_STRING, null);
sDefaults.putBoolean(KEY_SHOW_IMS_REGISTRATION_STATUS_BOOL, false);
}
/**

View File

@@ -5795,6 +5795,25 @@ public class TelephonyManager {
}
}
/**
* Returns the IMS Registration Status for a particular Subscription ID
*
* @param subId Subscription ID
* @return true if IMS status is registered, false if the IMS status is not registered or a
* RemoteException occurred.
*
* @hide
*/
public boolean isImsRegistered(int subId) {
try {
return getITelephony().isImsRegisteredForSubscriber(subId);
} catch (RemoteException ex) {
return false;
} catch (NullPointerException ex) {
return false;
}
}
/**
* Returns the Status of Volte
* @hide

View File

@@ -1079,6 +1079,15 @@ interface ITelephony {
*/
boolean isImsRegistered();
/**
* Get IMS Registration Status on a particular subid.
*
* @param subId user preferred subId.
*
* @return {@code true} if the IMS status is registered.
*/
boolean isImsRegisteredForSubscriber(int subId);
/**
* Returns the Status of Wi-Fi Calling
*/