Merge "Add stub for uploading call composer pics"
diff --git a/res/values-uz/strings.xml b/res/values-uz/strings.xml
index 1dd61ed..fa3bd82 100644
--- a/res/values-uz/strings.xml
+++ b/res/values-uz/strings.xml
@@ -28,7 +28,7 @@
<string name="carrier_mmi_msg_title" msgid="6050165242447507034">"<xliff:g id="MMICARRIER">%s</xliff:g> orqali xabar"</string>
<string name="default_carrier_mmi_msg_title" msgid="7754317179938537213">"Operatordan xabar"</string>
<string name="mmiStarted" msgid="9212975136944568623">"MMI kodi ishga tushirildi"</string>
- <string name="ussdRunning" msgid="1163586813106772717">"USSD so‘rov bajarilmoqda…"</string>
+ <string name="ussdRunning" msgid="1163586813106772717">"USSD kod yuborilmoqda…"</string>
<string name="mmiCancelled" msgid="5339191899200678272">"MMI kodi bekor qilindi"</string>
<string name="cancel" msgid="8984206397635155197">"Bekor qilish"</string>
<string name="enter_input" msgid="6193628663039958990">"USSD xabari <xliff:g id="MIN_LEN">%1$d</xliff:g>dan <xliff:g id="MAX_LEN">%2$d</xliff:g>tagacha belgi bo‘lishi kerak. Yana urinib ko‘ring."</string>
@@ -455,7 +455,7 @@
<string name="auto_retry_mode_title" msgid="2985801935424422340">"Avto-qayta urinish"</string>
<string name="auto_retry_mode_summary" msgid="2863919925349511402">"Avto-qayta urinish rejimini yoqish"</string>
<string name="tty_mode_not_allowed_video_call" msgid="6551976083652752815">"Video qo‘ng‘iroq davomida TTY rejimini o‘zgartirish taqiqlangan"</string>
- <string name="menu_add" msgid="5616487894975773141">"Kontakt saqlash"</string>
+ <string name="menu_add" msgid="5616487894975773141">"Kontaktni saqlash"</string>
<string name="menu_edit" msgid="3593856941552460706">"Kontaktni tahrirlash"</string>
<string name="menu_delete" msgid="6326861853830546488">"Kontaktni o‘chirish"</string>
<string name="menu_dial" msgid="4178537318419450012">"Kontaktga qo‘ng‘iroq qilish"</string>
diff --git a/src/com/android/phone/PhoneInterfaceManager.java b/src/com/android/phone/PhoneInterfaceManager.java
index 8d665cb..8d960d9 100755
--- a/src/com/android/phone/PhoneInterfaceManager.java
+++ b/src/com/android/phone/PhoneInterfaceManager.java
@@ -3931,6 +3931,50 @@
}
/**
+ * @return true if the user's setting for Voice over Cross SIM is enabled and false if it is not
+ * Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
+ * @param subId The subscription to use to check the configuration.
+ */
+ @Override
+ public boolean isCrossSimCallingEnabledByUser(int subId) {
+ TelephonyPermissions.enforeceCallingOrSelfReadPrecisePhoneStatePermissionOrCarrierPrivilege(
+ mApp, subId, "isCrossSimCallingEnabledByUser");
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
+ return ImsManager.getInstance(mApp,
+ getSlotIndexOrException(subId)).isCrossSimCallingEnabledByUser();
+ } catch (ImsException e) {
+ throw new ServiceSpecificException(e.getCode());
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
+ /**
+ * Sets the user's setting for whether or not Voice over Cross SIM is enabled.
+ * Requires MODIFY_PHONE_STATE permission.
+ * @param subId The subscription to use to check the configuration.
+ * @param isEnabled true if the user's setting for Voice over Cross SIM is enabled,
+ * false otherwise
+ */
+ @Override
+ public void setCrossSimCallingEnabled(int subId, boolean isEnabled) {
+ TelephonyPermissions.enforceCallingOrSelfModifyPermissionOrCarrierPrivilege(mApp, subId,
+ "setCrossSimCallingEnabled");
+ final long identity = Binder.clearCallingIdentity();
+ try {
+ // TODO: Refactor to remove ImsManager dependence and query through ImsPhone directly.
+ ImsManager.getInstance(mApp, getSlotIndexOrException(subId))
+ .setCrossSimCallingEnabled(isEnabled);
+ } catch (ImsException e) {
+ throw new ServiceSpecificException(e.getCode());
+ } finally {
+ Binder.restoreCallingIdentity(identity);
+ }
+ }
+
+ /**
* Requires carrier privileges or READ_PRECISE_PHONE_STATE permission.
* @param subId The subscription to use to check the configuration.
*/
diff --git a/src/com/android/services/telephony/TelecomAccountRegistry.java b/src/com/android/services/telephony/TelecomAccountRegistry.java
index fcf7f1b..f45b084 100644
--- a/src/com/android/services/telephony/TelecomAccountRegistry.java
+++ b/src/com/android/services/telephony/TelecomAccountRegistry.java
@@ -991,6 +991,9 @@
return mMmTelManager.isAvailable(ImsRegistrationImplBase.REGISTRATION_TECH_LTE,
MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_VOICE)
|| mMmTelManager.isAvailable(ImsRegistrationImplBase.REGISTRATION_TECH_IWLAN,
+ MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_VOICE)
+ || mMmTelManager.isAvailable(
+ ImsRegistrationImplBase.REGISTRATION_TECH_CROSS_SIM,
MmTelFeature.MmTelCapabilities.CAPABILITY_TYPE_VOICE);
}
}
diff --git a/src/com/android/services/telephony/TelephonyConnection.java b/src/com/android/services/telephony/TelephonyConnection.java
index 278e387..4a997a2 100755
--- a/src/com/android/services/telephony/TelephonyConnection.java
+++ b/src/com/android/services/telephony/TelephonyConnection.java
@@ -1302,6 +1302,8 @@
isNetworkIdentifiedEmergencyCall());
newProperties = changeBitmask(newProperties, PROPERTY_IS_ADHOC_CONFERENCE,
isAdhocConferenceCall());
+ newProperties = changeBitmask(newProperties, PROPERTY_CROSS_SIM,
+ isCrossSimCall());
if (getConnectionProperties() != newProperties) {
setTelephonyConnectionProperties(newProperties);
@@ -2378,6 +2380,16 @@
}
/**
+ * Determines if the current connection is cross sim calling
+ */
+ private boolean isCrossSimCall() {
+ return mOriginalConnection != null
+ && mOriginalConnection.getPhoneType() == PhoneConstants.PHONE_TYPE_IMS
+ && mOriginalConnection instanceof ImsPhoneConnection
+ && ((ImsPhoneConnection) mOriginalConnection).isCrossSimCall();
+ }
+
+ /**
* Determines if the current connection is pullable.
*
* A connection is deemed to be pullable if the original connection capabilities state that it
diff --git a/testapps/ImsTestService/src/com/android/phone/testapps/imstestapp/ImsCallingActivity.java b/testapps/ImsTestService/src/com/android/phone/testapps/imstestapp/ImsCallingActivity.java
index 0ff6cc1..477bbc0 100644
--- a/testapps/ImsTestService/src/com/android/phone/testapps/imstestapp/ImsCallingActivity.java
+++ b/testapps/ImsTestService/src/com/android/phone/testapps/imstestapp/ImsCallingActivity.java
@@ -188,6 +188,9 @@
sb.append("}, \nIWLAN: ");
sb.append("{");
sb.append(caps.get(ImsRegistrationImplBase.REGISTRATION_TECH_IWLAN));
+ sb.append("}, \nCROSS-SIM: ");
+ sb.append("{");
+ sb.append(caps.get(ImsRegistrationImplBase.REGISTRATION_TECH_CROSS_SIM));
sb.append("}");
mCapEnabledText.setText(sb.toString());
}