Merge "Correct Typo on Provision Refactor per API review" into tm-dev
diff --git a/res/layout/radio_info.xml b/res/layout/radio_info.xml
index 866252a..1f137b0 100644
--- a/res/layout/radio_info.xml
+++ b/res/layout/radio_info.xml
@@ -435,40 +435,6 @@
android:layout_toEndOf="@id/smsc_label" />
</RelativeLayout>
- <!-- WFC Entitlement ID -->
- <RelativeLayout android:layout_width="match_parent"
- android:layout_height="wrap_content">
- <TextView android:id="@+id/wfc_entitlement_id"
- android:text="@string/provisioning_info_wfc_entitlement_id"
- android:labelFor="@+id/edit_wfc_entitlement_id"
- android:layout_alignBaseline="@+id/update_wfc_entitlement_id"
- style="@style/info_label" />
- <Button android:id="@+id/refresh_wfc_entitlement_id"
- android:textSize="14sp"
- android:layout_marginTop="8dip"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/refresh_provisioning_info_wfc_entitlement_id"
- android:layout_alignParentEnd="true"
- />
- <Button android:id="@+id/update_wfc_entitlement_id"
- android:textSize="14sp"
- android:layout_marginTop="8dip"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:text="@string/update_provisioning_info_wfc_entitlement_id"
- android:layout_toStartOf="@+id/refresh_wfc_entitlement_id"
- android:layout_alignBaseline="@+id/refresh_wfc_entitlement_id"
- />
- <EditText android:id="@+id/edit_wfc_entitlement_id"
- style="@style/form_value"
- android:autofillHints="@null"
- android:inputType="text"
- android:layout_alignBaseline="@+id/refresh_wfc_entitlement_id"
- android:layout_toStartOf="@id/update_wfc_entitlement_id"
- android:layout_toEndOf="@id/wfc_entitlement_id" />
- </RelativeLayout>
-
<!-- Test setting to ignore bad DNS, useful in lab environments -->
<LinearLayout style="@style/RadioInfo_entry_layout">
<Button android:id="@+id/dns_check_toggle"
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 8112dd5..c17f9b9 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -2185,13 +2185,6 @@
<!-- Trigger Carrier Provisioning [CHAR LIMIT=NONE] -->
<string name="trigger_carrier_provisioning">Trigger Carrier Provisioning</string>
- <!-- Provisionin WFC Entitlement ID -->
- <string name="provisioning_info_wfc_entitlement_id">WFC Entitlement ID:</string>
- <!-- Update Provisionin WFC Entitlement ID -->
- <string name="update_provisioning_info_wfc_entitlement_id">Update</string>
- <!-- Refresh Provisionin WFC Entitlement ID -->
- <string name="refresh_provisioning_info_wfc_entitlement_id">Refresh</string>
-
<!-- details of the message popped up when there is
bad call quality caused by bluetooth connection-->
<string name="call_quality_notification_bluetooth_details">
diff --git a/src/com/android/phone/settings/RadioInfo.java b/src/com/android/phone/settings/RadioInfo.java
index 8d76cae..b4c885e 100644
--- a/src/com/android/phone/settings/RadioInfo.java
+++ b/src/com/android/phone/settings/RadioInfo.java
@@ -71,8 +71,6 @@
import android.telephony.TelephonyDisplayInfo;
import android.telephony.TelephonyManager;
import android.telephony.data.NetworkSlicingConfig;
-import android.telephony.ims.ProvisioningManager;
-import android.telephony.ims.stub.ImsConfigImplBase;
import android.text.TextUtils;
import android.util.Log;
import android.view.Menu;
@@ -188,9 +186,6 @@
private static final int EAB_PROVISIONED_CONFIG_ID =
ImsConfig.ConfigConstants.EAB_SETTING_ENABLED;
- private static final int KEY_VOICE_OVER_WIFI_ENTITLEMENT_ID =
- ProvisioningManager.KEY_VOICE_OVER_WIFI_ENTITLEMENT_ID;
-
//Values in must match CELL_INFO_REFRESH_RATES
private static final String[] CELL_INFO_REFRESH_RATE_LABELS = {
"Disabled",
@@ -217,8 +212,6 @@
private static final int EVENT_QUERY_SMSC_DONE = 1005;
private static final int EVENT_UPDATE_SMSC_DONE = 1006;
private static final int EVENT_PHYSICAL_CHANNEL_CONFIG_CHANGED = 1007;
- private static final int EVENT_QUERY_WFC_ENTILEMENT_ID_DONE = 1008;
- private static final int EVENT_UPDATE_WFC_ENTILEMENT_ID_DONE = 1009;
private static final int MENU_ITEM_SELECT_BAND = 0;
private static final int MENU_ITEM_VIEW_ADN = 1;
@@ -265,7 +258,6 @@
private TextView mNrFrequency;
private TextView mNetworkSlicingConfig;
private EditText mSmsc;
- private EditText mWfcEntitlementId;
private Switch mRadioPowerOnSwitch;
private Button mCellInfoRefreshRateButton;
private Button mDnsCheckToggleButton;
@@ -284,8 +276,6 @@
private Spinner mPreferredNetworkType;
private Spinner mSelectPhoneIndex;
private Spinner mCellInfoRefreshRateSpinner;
- private Button mUpdateWfcEntitlementIdButton;
- private Button mRefreshWfcEntitlementIdButton;
private static final long RUNNABLE_TIMEOUT_MS = 5 * 60 * 1000L;
@@ -295,7 +285,6 @@
private TelephonyManager mTelephonyManager;
private ImsManager mImsManager = null;
private Phone mPhone = null;
- private ProvisioningManager mProvisioningManager = null;
private String mPingHostnameResultV4;
private String mPingHostnameResultV6;
@@ -426,7 +415,6 @@
// update the subId
mTelephonyManager = mTelephonyManager.createForSubscriptionId(subId);
- mProvisioningManager = ProvisioningManager.createForSubscriptionId(subId);
// update the phoneId
mImsManager = ImsManager.getInstance(getApplicationContext(), phoneIndex);
@@ -462,13 +450,6 @@
}
updatePhysicalChannelConfiguration((List<PhysicalChannelConfig>) ar.result);
break;
- case EVENT_QUERY_WFC_ENTILEMENT_ID_DONE:
- mWfcEntitlementId.setText((String) msg.obj);
- break;
- case EVENT_UPDATE_WFC_ENTILEMENT_ID_DONE:
- mUpdateWfcEntitlementIdButton.setEnabled(true);
- mWfcEntitlementId.setText((String) msg.obj);
- break;
default:
super.handleMessage(msg);
break;
@@ -499,8 +480,6 @@
mImsManager = ImsManager.getInstance(getApplicationContext(), mPhone.getPhoneId());
- mProvisioningManager = ProvisioningManager.createForSubscriptionId(mPhone.getSubId());
-
sPhoneIndexLabels = getPhoneIndexLabels(mTelephonyManager);
mDeviceId = (TextView) findViewById(R.id.imei);
@@ -525,8 +504,6 @@
mSent = (TextView) findViewById(R.id.sent);
mReceived = (TextView) findViewById(R.id.received);
mSmsc = (EditText) findViewById(R.id.smsc);
- mWfcEntitlementId = (EditText) findViewById(R.id.edit_wfc_entitlement_id);
- mWfcEntitlementId.setVisibility(!IS_USER_BUILD ? View.VISIBLE : View.GONE);
mDnsCheckState = (TextView) findViewById(R.id.dnsCheckState);
mPingHostnameV4 = (TextView) findViewById(R.id.pingHostnameV4);
mPingHostnameV6 = (TextView) findViewById(R.id.pingHostnameV6);
@@ -608,12 +585,6 @@
mUpdateSmscButton.setOnClickListener(mUpdateSmscButtonHandler);
mRefreshSmscButton = (Button) findViewById(R.id.refresh_smsc);
mRefreshSmscButton.setOnClickListener(mRefreshSmscButtonHandler);
- mUpdateWfcEntitlementIdButton = (Button) findViewById(R.id.update_wfc_entitlement_id);
- mUpdateWfcEntitlementIdButton.setOnClickListener(mUpdateWfcEntitlementIdButtonHandler);
- mUpdateWfcEntitlementIdButton.setVisibility(!IS_USER_BUILD ? View.VISIBLE : View.GONE);
- mRefreshWfcEntitlementIdButton = (Button) findViewById(R.id.refresh_wfc_entitlement_id);
- mRefreshWfcEntitlementIdButton.setOnClickListener(mRefreshWfcEntitlementIdButtonHandler);
- mRefreshWfcEntitlementIdButton.setVisibility(!IS_USER_BUILD ? View.VISIBLE : View.GONE);
mDnsCheckToggleButton = (Button) findViewById(R.id.dns_check_toggle);
mDnsCheckToggleButton.setOnClickListener(mDnsCheckButtonHandler);
mCarrierProvisioningButton = (Button) findViewById(R.id.carrier_provisioning);
@@ -641,9 +612,6 @@
mOemInfoButton.setEnabled(false);
}
- TextView textView = (TextView) findViewById(R.id.wfc_entitlement_id);
- textView.setVisibility(!IS_USER_BUILD ? View.VISIBLE : View.GONE);
-
mCellInfoRefreshRateIndex = 0; //disabled
mPreferredNetworkTypeResult = PREFERRED_NETWORK_LABELS.length - 1; //Unknown
mSelectedPhoneIndex = 0; //phone 0
@@ -735,7 +703,6 @@
mDefaultNetworkRequest, mNetworkCallback, mHandler);
mSmsc.clearFocus();
- mWfcEntitlementId.clearFocus();
}
@Override
@@ -1342,25 +1309,6 @@
});
}
- private void refreshWfcEntitilementId() {
- mQueuedWork.execute(() -> {
- String result = null;
- Message msg = mHandler.obtainMessage(EVENT_QUERY_WFC_ENTILEMENT_ID_DONE);
- try {
- result =
- mProvisioningManager.getProvisioningStringValue(
- KEY_VOICE_OVER_WIFI_ENTITLEMENT_ID);
- if (result == null) {
- result = "key not exist";
- }
- } catch (RuntimeException e) {
- result = "refresh error";
- }
- msg.obj = result;
- msg.sendToTarget();
- });
- }
-
private void updateAllCellInfo() {
mCellInfo.setText("");
@@ -1761,27 +1709,6 @@
}
};
- OnClickListener mUpdateWfcEntitlementIdButtonHandler = v -> {
- mUpdateWfcEntitlementIdButton.setEnabled(false);
- mQueuedWork.execute(() -> {
- String value = mWfcEntitlementId.getText().toString();
- String result = null;
- Message msg = mHandler.obtainMessage(EVENT_UPDATE_WFC_ENTILEMENT_ID_DONE);
- try {
- result = (mProvisioningManager.setProvisioningStringValue(
- KEY_VOICE_OVER_WIFI_ENTITLEMENT_ID, value)
- == ImsConfigImplBase.CONFIG_RESULT_SUCCESS)
- ? value : "update failure";
- } catch (RuntimeException e) {
- result = "update error";
- }
- msg.obj = result;
- msg.sendToTarget();
- });
- };
-
- OnClickListener mRefreshWfcEntitlementIdButtonHandler = v -> refreshWfcEntitilementId();
-
OnClickListener mCarrierProvisioningButtonHandler = v -> {
String carrierProvisioningApp = getCarrierProvisioningAppString();
if (!TextUtils.isEmpty(carrierProvisioningApp)) {