Merge "Fix MMS Config issues in Debug menu"

This commit is contained in:
Treehugger Robot
2019-06-21 22:09:41 +00:00
committed by Gerrit Code Review
3 changed files with 22 additions and 2 deletions
@@ -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();
}