Merge "Fix MMS Config issues in Debug menu" am: 0e3986db52 am: eb4206aea1

am: f9b474c443

Change-Id: Ieb39c568893cde8c8b1fb880368a13967aff1c8d
This commit is contained in:
Taesu Lee
2019-06-21 15:52:33 -07:00
committed by android-build-merger
3 changed files with 22 additions and 2 deletions

View File

@@ -174,7 +174,7 @@ public interface CarrierConfigValuesLoader {
/**
* String value: name for the user agent profile HTTP header
*/
public static final String CONFIG_UA_PROF_TAG_NAME = "mUaProfTagName";
public static final String CONFIG_UA_PROF_TAG_NAME = "uaProfTagName";
public static final String CONFIG_UA_PROF_TAG_NAME_DEFAULT = "x-wap-profile";
/**
* String value: additional HTTP headers for MMS HTTP requests.
@@ -195,4 +195,14 @@ public interface CarrierConfigValuesLoader {
*/
public static final String CONFIG_NAI_SUFFIX = "naiSuffix";
public static final String CONFIG_NAI_SUFFIX_DEFAULT = null;
/**
* String value: Url for user agent profile
*/
public static final String CONFIG_UA_PROF_URL = "uaProfUrl";
public static final String CONFIG_UA_PROF_URL_DEFAULT = null;
/**
* String value: user agent
*/
public static final String CONFIG_USER_AGENT = "userAgent";
public static final String CONFIG_USER_AGENT_DEFAULT = null;
}

View File

@@ -90,6 +90,8 @@ public class MmsConfig {
sKeyTypeMap.put(CarrierConfigValuesLoader.CONFIG_HTTP_PARAMS, KEY_TYPE_STRING);
sKeyTypeMap.put(CarrierConfigValuesLoader.CONFIG_EMAIL_GATEWAY_NUMBER, KEY_TYPE_STRING);
sKeyTypeMap.put(CarrierConfigValuesLoader.CONFIG_NAI_SUFFIX, KEY_TYPE_STRING);
sKeyTypeMap.put(CarrierConfigValuesLoader.CONFIG_UA_PROF_URL, KEY_TYPE_STRING);
sKeyTypeMap.put(CarrierConfigValuesLoader.CONFIG_USER_AGENT, KEY_TYPE_STRING);
}
// A map that stores all MmsConfigs, one per active subscription. For pre-LMSim, this will

View File

@@ -39,6 +39,7 @@ import com.android.messaging.util.PhoneUtils;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
/**
@@ -103,6 +104,13 @@ public class DebugMmsConfigFragment extends Fragment {
mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
mMmsConfig = MmsConfig.get(subId);
mKeys = new ArrayList<>(mMmsConfig.keySet());
Iterator<String> it = mKeys.iterator();
while (it.hasNext()) {
// Remove a config if the MmsConfig.sKeyTypeMap doesn't have it.
if (MmsConfig.getKeyType(it.next()) == null) {
it.remove();
}
}
Collections.sort(mKeys);
}
@@ -125,7 +133,7 @@ public class DebugMmsConfigFragment extends Fragment {
@Override
public void onValueChanged(String key, String keyType, String value) {
mMmsConfig.update(key, value, keyType);
mMmsConfig.update(keyType, key, value);
notifyDataSetChanged();
}