Add button in "hidden" settings to flip "VoLTE Provisioned" flag
VoLTE Provisioned flag can be lost when new device image is flashed. Currently there is no way to trigger Verizon provisioning update from device. This patch adds button in hidden settings which allow to manually change value of the flag. Bug: 19038362 Change-Id: I23f13004dbcf9eaf711c66261696772b1d7bfd6e
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
LOCAL_PATH:= $(call my-dir)
|
LOCAL_PATH:= $(call my-dir)
|
||||||
include $(CLEAR_VARS)
|
include $(CLEAR_VARS)
|
||||||
|
|
||||||
LOCAL_JAVA_LIBRARIES := bouncycastle conscrypt telephony-common
|
LOCAL_JAVA_LIBRARIES := bouncycastle conscrypt telephony-common ims-common
|
||||||
LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 android-support-v13 jsr305
|
LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 android-support-v13 jsr305
|
||||||
|
|
||||||
LOCAL_MODULE_TAGS := optional
|
LOCAL_MODULE_TAGS := optional
|
||||||
|
@@ -226,6 +226,14 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<!-- VoLTE provisioned -->
|
||||||
|
<Button android:id="@+id/volte_provisioned_flag"
|
||||||
|
android:textSize="14sp"
|
||||||
|
android:layout_marginTop="8dip"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- SMS over IMS -->
|
<!-- SMS over IMS -->
|
||||||
<Button android:id="@+id/sms_over_ims"
|
<Button android:id="@+id/sms_over_ims"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
|
@@ -72,6 +72,11 @@
|
|||||||
<!-- Phone IMS registration required off. Only shown in diagnostic screen, so precise translation is not needed. -->
|
<!-- Phone IMS registration required off. Only shown in diagnostic screen, so precise translation is not needed. -->
|
||||||
<string name="ims_reg_required_off">Turn off IMS registration required</string>
|
<string name="ims_reg_required_off">Turn off IMS registration required</string>
|
||||||
|
|
||||||
|
<!-- VoLTE provisioning flag on. Only shown in diagnostic screen, so precise translation is not needed. -->
|
||||||
|
<string name="volte_provisioned_flag_on">Turn on VoLTE provisioned flag</string>
|
||||||
|
<!-- VoLTE provisioning flag off. Only shown in diagnostic screen, so precise translation is not needed. -->
|
||||||
|
<string name="volte_provisioned_flag_off">Turn off VoLTE provisioned flag</string>
|
||||||
|
|
||||||
<!-- Phone ram dump on. Only shown in diagnostic screen, so precise translation is not needed. -->
|
<!-- Phone ram dump on. Only shown in diagnostic screen, so precise translation is not needed. -->
|
||||||
<string name="lte_ram_dump_on">Turn on lte ram dump</string>
|
<string name="lte_ram_dump_on">Turn on lte ram dump</string>
|
||||||
<!-- Phone ram dump off. Only shown in diagnostic screen, so precise translation is not needed. -->
|
<!-- Phone ram dump off. Only shown in diagnostic screen, so precise translation is not needed. -->
|
||||||
|
@@ -17,6 +17,7 @@
|
|||||||
package com.android.settings;
|
package com.android.settings;
|
||||||
|
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
import android.app.QueuedWork;
|
||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.content.pm.PackageManager;
|
import android.content.pm.PackageManager;
|
||||||
@@ -55,6 +56,9 @@ import com.android.internal.telephony.PhoneConstants;
|
|||||||
import com.android.internal.telephony.PhoneFactory;
|
import com.android.internal.telephony.PhoneFactory;
|
||||||
import com.android.internal.telephony.PhoneStateIntentReceiver;
|
import com.android.internal.telephony.PhoneStateIntentReceiver;
|
||||||
import com.android.internal.telephony.TelephonyProperties;
|
import com.android.internal.telephony.TelephonyProperties;
|
||||||
|
import com.android.ims.ImsConfig;
|
||||||
|
import com.android.ims.ImsException;
|
||||||
|
import com.android.ims.ImsManager;
|
||||||
import org.apache.http.HttpResponse;
|
import org.apache.http.HttpResponse;
|
||||||
import org.apache.http.client.HttpClient;
|
import org.apache.http.client.HttpClient;
|
||||||
import org.apache.http.client.methods.HttpGet;
|
import org.apache.http.client.methods.HttpGet;
|
||||||
@@ -195,6 +199,7 @@ public class RadioInfo extends Activity {
|
|||||||
case EVENT_SERVICE_STATE_CHANGED:
|
case EVENT_SERVICE_STATE_CHANGED:
|
||||||
updateServiceState();
|
updateServiceState();
|
||||||
updatePowerState();
|
updatePowerState();
|
||||||
|
updateImsVoLteProvisionedState();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EVENT_QUERY_PREFERRED_TYPE_DONE:
|
case EVENT_QUERY_PREFERRED_TYPE_DONE:
|
||||||
@@ -303,6 +308,9 @@ public class RadioInfo extends Activity {
|
|||||||
imsRegRequiredButton = (Button) findViewById(R.id.ims_reg_required);
|
imsRegRequiredButton = (Button) findViewById(R.id.ims_reg_required);
|
||||||
imsRegRequiredButton.setOnClickListener(mImsRegRequiredHandler);
|
imsRegRequiredButton.setOnClickListener(mImsRegRequiredHandler);
|
||||||
|
|
||||||
|
imsVoLteProvisionedButton = (Button) findViewById(R.id.volte_provisioned_flag);
|
||||||
|
imsVoLteProvisionedButton.setOnClickListener(mImsVoLteProvisionedHandler);
|
||||||
|
|
||||||
smsOverImsButton = (Button) findViewById(R.id.sms_over_ims);
|
smsOverImsButton = (Button) findViewById(R.id.sms_over_ims);
|
||||||
smsOverImsButton.setOnClickListener(mSmsOverImsHandler);
|
smsOverImsButton.setOnClickListener(mSmsOverImsHandler);
|
||||||
|
|
||||||
@@ -360,6 +368,7 @@ public class RadioInfo extends Activity {
|
|||||||
updatePowerState();
|
updatePowerState();
|
||||||
updateCellInfoListRate();
|
updateCellInfoListRate();
|
||||||
updateImsRegRequiredState();
|
updateImsRegRequiredState();
|
||||||
|
updateImsVoLteProvisionedState();
|
||||||
updateSmsOverImsState();
|
updateSmsOverImsState();
|
||||||
updateLteRamDumpState();
|
updateLteRamDumpState();
|
||||||
updateProperties();
|
updateProperties();
|
||||||
@@ -1002,6 +1011,49 @@ public class RadioInfo extends Activity {
|
|||||||
return SystemProperties.getBoolean(PROPERTY_SMS_OVER_IMS, false);
|
return SystemProperties.getBoolean(PROPERTY_SMS_OVER_IMS, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Button imsVoLteProvisionedButton;
|
||||||
|
OnClickListener mImsVoLteProvisionedHandler = new OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
log(String.format("toggle VoLTE provisioned: currently %s",
|
||||||
|
(isImsVoLteProvisioned() ? "on":"off")));
|
||||||
|
final boolean newValue = !isImsVoLteProvisioned();
|
||||||
|
if (phone != null) {
|
||||||
|
final ImsManager imsManager = ImsManager.getInstance(phone.getContext(), phone.getSubId());
|
||||||
|
if (imsManager != null) {
|
||||||
|
QueuedWork.singleThreadExecutor().submit(new Runnable() {
|
||||||
|
public void run() {
|
||||||
|
try {
|
||||||
|
imsManager.getConfigInterface().setProvisionedValue(
|
||||||
|
ImsConfig.ConfigConstants.VLT_SETTING_ENABLED,
|
||||||
|
newValue? 1 : 0);
|
||||||
|
} catch (ImsException e) {
|
||||||
|
Log.e(TAG, "setImsVoLteProvisioned() exception:", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
updateImsVoLteProvisionedState();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
private boolean isImsVoLteProvisioned() {
|
||||||
|
if (phone != null) {
|
||||||
|
ImsManager imsManager = ImsManager.getInstance(phone.getContext(), phone.getSubId());
|
||||||
|
return imsManager.isVolteProvisionedOnDevice(phone.getContext());
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void updateImsVoLteProvisionedState() {
|
||||||
|
log("updateImsVoLteProvisionedState isImsVoLteProvisioned()=" + isImsVoLteProvisioned());
|
||||||
|
String buttonText = isImsVoLteProvisioned() ?
|
||||||
|
getString(R.string.volte_provisioned_flag_off) :
|
||||||
|
getString(R.string.volte_provisioned_flag_on);
|
||||||
|
imsVoLteProvisionedButton.setText(buttonText);
|
||||||
|
}
|
||||||
|
|
||||||
private void updateSmsOverImsState() {
|
private void updateSmsOverImsState() {
|
||||||
log("updateSmsOverImsState isSmsOverImsEnabled()=" + isSmsOverImsEnabled());
|
log("updateSmsOverImsState isSmsOverImsEnabled()=" + isSmsOverImsEnabled());
|
||||||
String buttonText = isSmsOverImsEnabled() ?
|
String buttonText = isSmsOverImsEnabled() ?
|
||||||
|
Reference in New Issue
Block a user