[automerger skipped] Merge "Import translations. DO NOT MERGE ANYWHERE" into udc-dev am: b39199d825 -s ours am: 24eefaaf0d -s ours
am skip reason: subject contains skip directive
Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/services/Telephony/+/23787322
Change-Id: I8ce5ae7fb41b625c6ef004384c41cfc6fedaae0e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
diff --git a/res/values-cs/strings.xml b/res/values-cs/strings.xml
index 520c0de..34cf960 100644
--- a/res/values-cs/strings.xml
+++ b/res/values-cs/strings.xml
@@ -599,7 +599,7 @@
<string name="rtt_mode_title" msgid="3075948111362818043">"Hovor, během něhož můžete posílat zprávy (RTT)"</string>
<string name="rtt_mode_summary" msgid="8631541375609989562">"Povolit posílání zpráv během hlasového hovoru"</string>
<string name="rtt_mode_more_information" msgid="587500128658756318">"Funkce Okamžitý text (RTT) pomáhá volajícím, kteří neslyší, jsou nedoslýchaví, mají řečovou vadu, případně potřebují víc než jen hlas z jiného důvodu.<br> <a href=<xliff:g id="URL">http://support.google.com/mobile?p=telephony_rtt</xliff:g>>Další informace</a>\n <br><br> – Text poslaný během hovoru se uloží jako přepis zpráv\n <br> – Tato funkce není dostupná při videohovorech"</string>
- <string name="no_rtt_when_roaming" msgid="5268008247378355389">"Použít: Funkce Okamžitý text není dostupná při roamingu"</string>
+ <string name="no_rtt_when_roaming" msgid="5268008247378355389">"Použít: Funkce SMS během hovoru není dostupná při roamingu"</string>
<string-array name="tty_mode_entries">
<item msgid="3238070884803849303">"TTY vypnuto"</item>
<item msgid="1449091874731375214">"Úplný režim TTY"</item>
diff --git a/res/values-fa/strings.xml b/res/values-fa/strings.xml
index b582c63..5eb0da3 100644
--- a/res/values-fa/strings.xml
+++ b/res/values-fa/strings.xml
@@ -661,7 +661,7 @@
<string name="description_dial_button" msgid="8614631902795087259">"شماره گیری"</string>
<string name="description_dialpad_button" msgid="7395114120463883623">"نمایش صفحه شماره گیری"</string>
<string name="pane_title_emergency_dialpad" msgid="3627372514638694401">"صفحه شمارهگیری اضطراری"</string>
- <string name="voicemail_visual_voicemail_switch_title" msgid="6610414098912832120">"پست صوتی دیداری"</string>
+ <string name="voicemail_visual_voicemail_switch_title" msgid="6610414098912832120">"پست صوتی تصویری"</string>
<string name="voicemail_set_pin_dialog_title" msgid="7005128605986960003">"تنظیم پین"</string>
<string name="voicemail_change_pin_dialog_title" msgid="4633077715231764435">"تغییر پین"</string>
<string name="preference_category_ringtone" msgid="8787281191375434976">"آهنگ زنگ و لرزش"</string>
diff --git a/res/values-te/strings.xml b/res/values-te/strings.xml
index f0f50bb..750f848 100644
--- a/res/values-te/strings.xml
+++ b/res/values-te/strings.xml
@@ -561,7 +561,7 @@
<string name="emergency_information_hint" msgid="9208897544917793012">"అత్యవసర సమాచారం"</string>
<string name="emergency_information_owner_hint" msgid="6256909888049185316">"యజమాని"</string>
<string name="emergency_information_confirm_hint" msgid="5109017615894918914">"సమాచారాన్ని చూడడానికి మళ్లీ నొక్కండి"</string>
- <string name="emergency_enable_radio_dialog_title" msgid="2667568200755388829">"ఎమర్జెన్సీ కాల్"</string>
+ <string name="emergency_enable_radio_dialog_title" msgid="2667568200755388829">"అత్యవసర కాల్"</string>
<string name="single_emergency_number_title" msgid="8413371079579067196">"అత్యవసర నంబర్"</string>
<string name="numerous_emergency_numbers_title" msgid="8972398932506755510">"అత్యవసర నంబర్లు"</string>
<string name="emergency_call_shortcut_hint" msgid="1290485125107779500">"<xliff:g id="EMERGENCY_NUMBER">%s</xliff:g>కు కాల్ చేయడానికి మళ్లీ నొక్కండి"</string>
diff --git a/src/com/android/phone/slice/PremiumNetworkEntitlementResponse.java b/src/com/android/phone/slice/PremiumNetworkEntitlementResponse.java
index ba44581..6b7e945 100644
--- a/src/com/android/phone/slice/PremiumNetworkEntitlementResponse.java
+++ b/src/com/android/phone/slice/PremiumNetworkEntitlementResponse.java
@@ -25,19 +25,19 @@
*
* The relationship between entitlement status (left column) and provision status (top row)
* is defined in the table below:
- * +--------------+-----------------+-------------------+-------------------+---------------+
- * | | Not Provisioned | Provisioned | Not Available | In Progress |
- * +--------------+-----------------+-------------------+-------------------+---------------+
- * | Disabled | Check failed | Check failed | Check failed | Check failed |
- * +--------------+-----------------+-------------------+-------------------+---------------+
- * | Enabled | Carrier error | Display webview | Display webview | Carrier error |
- * +--------------+-----------------+-------------------+-------------------+---------------+
- * | Incompatible | Check failed | Check failed | Check failed | Check failed |
- * +--------------+-----------------+-------------------+-------------------+---------------+
- * | Provisioning | Carrier error | Carrier error | In Progress | In Progress |
- * +--------------+-----------------+-------------------+-------------------+---------------+
- * | Included | Carrier error | Already purchased | Already purchased | Carrier error |
- * +--------------+-----------------+-------------------+-------------------+---------------+
+ * +--------------+-----------------+-------------------+-------------------+-----------------+
+ * | | Not Provisioned | Provisioned | Not Available | In Progress |
+ * +--------------+-----------------+-------------------+-------------------+-----------------+
+ * | Disabled | Check failed | Check failed | Check failed | Check failed |
+ * +--------------+-----------------+-------------------+-------------------+-----------------+
+ * | Enabled | Display webview | Already purchased | Already purchased | In progress |
+ * +--------------+-----------------+-------------------+-------------------+-----------------+
+ * | Incompatible | Check failed | Check failed | Check failed | Check failed |
+ * +--------------+-----------------+-------------------+-------------------+-----------------+
+ * | Provisioning | Carrier error | Carrier error | In progress | In progress |
+ * +--------------+-----------------+-------------------+-------------------+-----------------+
+ * | Included | Carrier error | Already purchased | Already purchased | Carrier error |
+ * +--------------+-----------------+-------------------+-------------------+-----------------+
*/
public class PremiumNetworkEntitlementResponse {
public static final int PREMIUM_NETWORK_ENTITLEMENT_STATUS_DISABLED = 0;
@@ -74,11 +74,16 @@
@NonNull public String mServiceFlowUserData;
/**
- * @return {@code true} if the premium network is provisioned and {@code false} otherwise.
+ * @return {@code true} if the premium network is already purchased and {@code false} otherwise.
*/
- public boolean isProvisioned() {
- return !isInvalidResponse()
- && mEntitlementStatus == PREMIUM_NETWORK_ENTITLEMENT_STATUS_INCLUDED;
+ public boolean isAlreadyPurchased() {
+ switch (mEntitlementStatus) {
+ case PREMIUM_NETWORK_ENTITLEMENT_STATUS_ENABLED:
+ case PREMIUM_NETWORK_ENTITLEMENT_STATUS_INCLUDED:
+ return mProvisionStatus == PREMIUM_NETWORK_PROVISION_STATUS_PROVISIONED
+ || mProvisionStatus == PREMIUM_NETWORK_PROVISION_STATUS_NOT_AVAILABLE;
+ }
+ return false;
}
/**
@@ -86,8 +91,14 @@
* {@code false} otherwise.
*/
public boolean isProvisioningInProgress() {
- return !isInvalidResponse()
- && mEntitlementStatus == PREMIUM_NETWORK_ENTITLEMENT_STATUS_PROVISIONING;
+ switch (mEntitlementStatus) {
+ case PREMIUM_NETWORK_ENTITLEMENT_STATUS_ENABLED:
+ return mProvisionStatus == PREMIUM_NETWORK_PROVISION_STATUS_IN_PROGRESS;
+ case PREMIUM_NETWORK_ENTITLEMENT_STATUS_PROVISIONING:
+ return mProvisionStatus == PREMIUM_NETWORK_PROVISION_STATUS_IN_PROGRESS
+ || mProvisionStatus == PREMIUM_NETWORK_PROVISION_STATUS_NOT_AVAILABLE;
+ }
+ return false;
}
/**
@@ -108,7 +119,6 @@
*/
public boolean isInvalidResponse() {
switch (mEntitlementStatus) {
- case PREMIUM_NETWORK_ENTITLEMENT_STATUS_ENABLED:
case PREMIUM_NETWORK_ENTITLEMENT_STATUS_INCLUDED:
return mProvisionStatus == PREMIUM_NETWORK_PROVISION_STATUS_NOT_PROVISIONED
|| mProvisionStatus == PREMIUM_NETWORK_PROVISION_STATUS_IN_PROGRESS;
diff --git a/src/com/android/phone/slice/SlicePurchaseController.java b/src/com/android/phone/slice/SlicePurchaseController.java
index b1abe56..33736db 100644
--- a/src/com/android/phone/slice/SlicePurchaseController.java
+++ b/src/com/android/phone/slice/SlicePurchaseController.java
@@ -92,12 +92,10 @@
public static final int FAILURE_CODE_UNKNOWN = 0;
/** Performance boost purchase failed because the carrier URL is unavailable. */
public static final int FAILURE_CODE_CARRIER_URL_UNAVAILABLE = 1;
- /** Performance boost purchase failed because the server is unreachable. */
- public static final int FAILURE_CODE_SERVER_UNREACHABLE = 2;
/** Performance boost purchase failed because user authentication failed. */
- public static final int FAILURE_CODE_AUTHENTICATION_FAILED = 3;
+ public static final int FAILURE_CODE_AUTHENTICATION_FAILED = 2;
/** Performance boost purchase failed because the payment failed. */
- public static final int FAILURE_CODE_PAYMENT_FAILED = 4;
+ public static final int FAILURE_CODE_PAYMENT_FAILED = 3;
/**
* Failure codes that the carrier website can return when a premium capability purchase fails.
@@ -106,7 +104,6 @@
@IntDef(prefix = { "FAILURE_CODE_" }, value = {
FAILURE_CODE_UNKNOWN,
FAILURE_CODE_CARRIER_URL_UNAVAILABLE,
- FAILURE_CODE_SERVER_UNREACHABLE,
FAILURE_CODE_AUTHENTICATION_FAILED,
FAILURE_CODE_PAYMENT_FAILED})
public @interface FailureCode {}
@@ -690,6 +687,17 @@
private void onStartSlicePurchaseApplication(
@TelephonyManager.PremiumCapability int capability) {
+ updateNotificationCounts();
+ if (mMonthlyCount >= getCarrierConfigs().getInt(
+ CarrierConfigManager.KEY_PREMIUM_CAPABILITY_MAXIMUM_MONTHLY_NOTIFICATION_COUNT_INT)
+ || mDailyCount >= getCarrierConfigs().getInt(
+ CarrierConfigManager.KEY_PREMIUM_CAPABILITY_MAXIMUM_DAILY_NOTIFICATION_COUNT_INT)) {
+ logd("Reached maximum number of performance boost notifications.");
+ handlePurchaseResult(capability,
+ TelephonyManager.PURCHASE_PREMIUM_CAPABILITY_RESULT_THROTTLED, false);
+ return;
+ }
+
final PremiumNetworkEntitlementApi premiumNetworkEntitlementApi =
getPremiumNetworkEntitlementApi();
PremiumNetworkEntitlementResponse premiumNetworkEntitlementResponse =
@@ -711,8 +719,8 @@
return;
}
- if (premiumNetworkEntitlementResponse.isProvisioned()) {
- logd("Entitlement Check: Already provisioned.");
+ if (premiumNetworkEntitlementResponse.isAlreadyPurchased()) {
+ logd("Entitlement Check: Already purchased/provisioned.");
handlePurchaseResult(capability,
PURCHASE_PREMIUM_CAPABILITY_RESULT_ALREADY_PURCHASED, true);
return;
@@ -734,17 +742,6 @@
return;
}
- updateNotificationCounts();
- if (mMonthlyCount >= getCarrierConfigs().getInt(
- CarrierConfigManager.KEY_PREMIUM_CAPABILITY_MAXIMUM_MONTHLY_NOTIFICATION_COUNT_INT)
- || mDailyCount >= getCarrierConfigs().getInt(
- CarrierConfigManager.KEY_PREMIUM_CAPABILITY_MAXIMUM_DAILY_NOTIFICATION_COUNT_INT)) {
- logd("Reached maximum number of performance boost notifications.");
- handlePurchaseResult(capability,
- TelephonyManager.PURCHASE_PREMIUM_CAPABILITY_RESULT_THROTTLED, false);
- return;
- }
-
// Start timeout for purchase completion.
long timeout = getCarrierConfigs().getLong(CarrierConfigManager
.KEY_PREMIUM_CAPABILITY_NOTIFICATION_DISPLAY_TIMEOUT_MILLIS_LONG);
@@ -1094,7 +1091,6 @@
switch (failureCode) {
case FAILURE_CODE_UNKNOWN: return "UNKNOWN";
case FAILURE_CODE_CARRIER_URL_UNAVAILABLE: return "CARRIER_URL_UNAVAILABLE";
- case FAILURE_CODE_SERVER_UNREACHABLE: return "SERVER_UNREACHABLE";
case FAILURE_CODE_AUTHENTICATION_FAILED: return "AUTHENTICATION_FAILED";
case FAILURE_CODE_PAYMENT_FAILED: return "PAYMENT_FAILED";
default:
diff --git a/src/com/android/services/telephony/TelephonyConnection.java b/src/com/android/services/telephony/TelephonyConnection.java
index 6d136b0..7aa0e7b 100644
--- a/src/com/android/services/telephony/TelephonyConnection.java
+++ b/src/com/android/services/telephony/TelephonyConnection.java
@@ -149,6 +149,8 @@
private static final int MSG_DTMF_DONE = 22;
private static final int MSG_MEDIA_ATTRIBUTES_CHANGED = 23;
private static final int MSG_ON_RTT_INITIATED = 24;
+ private static final int MSG_HOLD = 25;
+ private static final int MSG_UNHOLD = 26;
private static final String JAPAN_COUNTRY_CODE_WITH_PLUS_SIGN = "+81";
private static final String JAPAN_ISO_COUNTRY_CODE = "JP";
@@ -344,6 +346,12 @@
}
sendRttInitiationSuccess();
break;
+ case MSG_HOLD:
+ performHold();
+ break;
+ case MSG_UNHOLD:
+ performUnhold();
+ break;
}
}
};
@@ -1049,12 +1057,12 @@
@Override
public void onHold() {
- performHold();
+ mHandler.obtainMessage(MSG_HOLD).sendToTarget();
}
@Override
public void onUnhold() {
- performUnhold();
+ mHandler.obtainMessage(MSG_UNHOLD).sendToTarget();
}
@Override
diff --git a/tests/src/com/android/phone/slice/SlicePurchaseControllerTest.java b/tests/src/com/android/phone/slice/SlicePurchaseControllerTest.java
index b2a4a9f..e9a2e90 100644
--- a/tests/src/com/android/phone/slice/SlicePurchaseControllerTest.java
+++ b/tests/src/com/android/phone/slice/SlicePurchaseControllerTest.java
@@ -578,7 +578,7 @@
intent.putExtra(SlicePurchaseController.EXTRA_PREMIUM_CAPABILITY,
TelephonyManager.PREMIUM_CAPABILITY_PRIORITIZE_LATENCY);
intent.putExtra(SlicePurchaseController.EXTRA_FAILURE_CODE,
- SlicePurchaseController.FAILURE_CODE_SERVER_UNREACHABLE);
+ SlicePurchaseController.FAILURE_CODE_CARRIER_URL_UNAVAILABLE);
mContext.getBroadcastReceiver().onReceive(mContext, intent);
mTestableLooper.processAllMessages();
assertEquals(TelephonyManager.PURCHASE_PREMIUM_CAPABILITY_RESULT_CARRIER_ERROR, mResult);
@@ -726,7 +726,7 @@
mEntitlementResponse.mEntitlementStatus =
PremiumNetworkEntitlementResponse.PREMIUM_NETWORK_ENTITLEMENT_STATUS_ENABLED;
mEntitlementResponse.mProvisionStatus =
- PremiumNetworkEntitlementResponse.PREMIUM_NETWORK_PROVISION_STATUS_PROVISIONED;
+ PremiumNetworkEntitlementResponse.PREMIUM_NETWORK_PROVISION_STATUS_NOT_PROVISIONED;
// send purchase request
mSlicePurchaseController.purchasePremiumCapability(