Xml AOSP-网络属性中CSV的含义

Xml AOSP-网络属性中CSV的含义,xml,android-source,Xml,Android Source,networkAttributes项包含逗号分隔的列表: <string-array translatable="false" name="networkAttributes"> <item>"wifi,1,1,1,-1,true"</item> <item>"ethernet,9,9,9,-1,true"</item> </string-array> wifi,X,Y。。。意思?构造函数接受这些值,位于此

networkAttributes项包含逗号分隔的列表:

<string-array translatable="false" name="networkAttributes">  
  <item>"wifi,1,1,1,-1,true"</item>  
  <item>"ethernet,9,9,9,-1,true"</item>
</string-array>

wifi,X,Y。。。意思?

构造函数接受这些值,位于此处:platform/frameworks/base/core/java/android/net/NetworkConfig.java

看起来像这样:

 /**
 * input string from config.xml resource.  Uses the form:
 * [Connection name],[ConnectivityManager connection type],
 * [associated radio-type],[priority],[dependencyMet]
 */
public NetworkConfig(String init) {
    String fragments[] = init.split(",");
    name = fragments[0].trim().toLowerCase(Locale.ROOT);
    type = Integer.parseInt(fragments[1]);
    radio = Integer.parseInt(fragments[2]);
    priority = Integer.parseInt(fragments[3]);
    restoreTime = Integer.parseInt(fragments[4]);
    dependencyMet = Boolean.parseBoolean(fragments[5]);
}
它用于几个地方,例如: 方法私有上下文中的platform/frameworks/opt/telephony/src/java/com/android/internal/telephony/dataconnection/DcTracker.java

问候