summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEtan Cohen <etancohen@google.com>2014-08-03 20:38:30 -0700
committerEtan Cohen <etancohen@google.com>2014-08-04 22:57:15 +0000
commit572d25398297049a4da3042d58b1ccecf3514e4d (patch)
treec2bd81543d1083e4f1c2ad6d2e48b64aeebfd28f
parent86163b6bcd8da9ea77ef6a3f3cf84ab31780246d (diff)
downloadpackages_apps_Settings-572d25398297049a4da3042d58b1ccecf3514e4d.zip
packages_apps_Settings-572d25398297049a4da3042d58b1ccecf3514e4d.tar.gz
packages_apps_Settings-572d25398297049a4da3042d58b1ccecf3514e4d.tar.bz2
Radio Information UI for enabling/disabling debug settings of MO over VoLTE
Change-Id: Ib05ff460ac6001c511113e80a63707a073908637
-rw-r--r--res/layout/radio_info.xml8
-rw-r--r--res/values/strings.xml5
-rw-r--r--src/com/android/settings/RadioInfo.java33
3 files changed, 46 insertions, 0 deletions
diff --git a/res/layout/radio_info.xml b/res/layout/radio_info.xml
index d81dad6..760cf80 100644
--- a/res/layout/radio_info.xml
+++ b/res/layout/radio_info.xml
@@ -234,6 +234,14 @@
android:layout_height="wrap_content"
/>
+ <!-- Dial over PS (i.e. MO VoLTE) -->
+ <Button android:id="@+id/mo_over_volte"
+ android:textSize="14sp"
+ android:layout_marginTop="8dip"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ />
+
<!-- LTE ram dump -->
<Button android:id="@+id/lte_ram_dump"
android:textSize="14sp"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 40a45ec..75024e9 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -67,6 +67,11 @@
<!-- Phone SMS over IMS off. Only shown in diagnostic screen, so precise translation is not needed. -->
<string name="sms_over_ims_off">Turn off SMS over IMS</string>
+ <!-- MO over PS/VoLTE. Only shown in diagnostic screen, so precise translation is not needed. -->
+ <string name="mo_over_volte_on">Enable MO over PS/VoLTE</string>
+ <!-- MO over PS/VoLTE. Only shown in diagnostic screen, so precise translation is not needed. -->
+ <string name="mo_over_volte_off">Disable MO over PS/VoLTE</string>
+
<!-- Phone SMS over IMS IMS registration required on. Only shown in diagnostic screen, so precise translation is not needed. -->
<string name="ims_reg_required_on">Turn on IMS registration required</string>
<!-- Phone IMS registration required off. Only shown in diagnostic screen, so precise translation is not needed. -->
diff --git a/src/com/android/settings/RadioInfo.java b/src/com/android/settings/RadioInfo.java
index b0a4a53..75de222 100644
--- a/src/com/android/settings/RadioInfo.java
+++ b/src/com/android/settings/RadioInfo.java
@@ -303,6 +303,9 @@ public class RadioInfo extends Activity {
imsRegRequiredButton = (Button) findViewById(R.id.ims_reg_required);
imsRegRequiredButton.setOnClickListener(mImsRegRequiredHandler);
+ moOverVolteButton = (Button) findViewById(R.id.mo_over_volte);
+ moOverVolteButton.setOnClickListener(mMoOverVolteHandler);
+
smsOverImsButton = (Button) findViewById(R.id.sms_over_ims);
smsOverImsButton.setOnClickListener(mSmsOverImsHandler);
@@ -360,6 +363,7 @@ public class RadioInfo extends Activity {
updatePowerState();
updateCellInfoListRate();
updateImsRegRequiredState();
+ updateMoOverImsState();
updateSmsOverImsState();
updateLteRamDumpState();
updateProperties();
@@ -985,6 +989,35 @@ public class RadioInfo extends Activity {
imsRegRequiredButton.setText(buttonText);
}
+ private Button moOverVolteButton;
+ OnClickListener mMoOverVolteHandler = new OnClickListener() {
+ @Override
+ public void onClick(View v) {
+ boolean moOverVolteEnabled = isMoOverVolteEnabled();
+ log(String.format("toggle %s: currently %s",
+ TelephonyProperties.PROPERTY_DBG_IMS_VOLTE_ENABLE,
+ (moOverVolteEnabled ? "on" : "off")));
+ boolean newValue = !moOverVolteEnabled;
+ SystemProperties.set(TelephonyProperties.PROPERTY_DBG_IMS_VOLTE_ENABLE,
+ newValue ? "1" : "0");
+ updateMoOverImsState();
+ }
+ };
+
+ private boolean isMoOverVolteEnabled() {
+ return SystemProperties.getInt(TelephonyProperties.PROPERTY_DBG_IMS_VOLTE_ENABLE,
+ TelephonyProperties.PROPERTY_DBG_IMS_VOLTE_ENABLE_DEAFULT) == 1;
+ }
+
+ private void updateMoOverImsState() {
+ boolean moOverVolteEnabled = isMoOverVolteEnabled();
+ log("updateMoOverImsState isMoOverVolteEnabled()=" + moOverVolteEnabled);
+ String buttonText = moOverVolteEnabled ?
+ getString(R.string.mo_over_volte_off) :
+ getString(R.string.mo_over_volte_on);
+ moOverVolteButton.setText(buttonText);
+ }
+
private Button smsOverImsButton;
static final String PROPERTY_SMS_OVER_IMS = "persist.radio.imsallowmtsms";
OnClickListener mSmsOverImsHandler = new OnClickListener() {