зеркало из https://github.com/mozilla/gecko-dev.git
new routines for isp phone number
This commit is contained in:
Родитель
7f0bb45128
Коммит
8e466f2022
|
@ -242,6 +242,29 @@ public class CPGenerator
|
|||
return null;
|
||||
}
|
||||
|
||||
public static String getISPModemNumber( String ispName, int popIndex )
|
||||
{
|
||||
ISPDynamicData ispData = getISPDynamicData( ispName );
|
||||
|
||||
if ( ispData == null )
|
||||
{
|
||||
//Trace.TRACE( "isp not found: " + isp );
|
||||
return null;
|
||||
}
|
||||
|
||||
int size = ispData.getDynamicDataSize();
|
||||
|
||||
//Trace.TRACE( "size: " + size );
|
||||
|
||||
if ( size < popIndex )
|
||||
return null;
|
||||
|
||||
NameValueSet nvSet = ispData.getDynamicData( popIndex );
|
||||
String phoneNum = nvSet.getValue( "phone" );
|
||||
|
||||
return phoneNum;
|
||||
}
|
||||
|
||||
/*
|
||||
Takes the given inputFile and looks for strings in the form
|
||||
"@@@string_to_replace@@@" and replaces them with the value
|
||||
|
|
|
@ -110,7 +110,7 @@ public class ISPDynamicData
|
|||
throw e;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public String getName()
|
||||
{
|
||||
if ( name != null )
|
||||
|
@ -159,16 +159,6 @@ public class ISPDynamicData
|
|||
return this.getDynamicData( 0 );
|
||||
}
|
||||
|
||||
public int getDynamicDataSize()
|
||||
{
|
||||
if ( dynamicData == null )
|
||||
this.parseDynamicData();
|
||||
if ( dynamicData == null )
|
||||
return 0;
|
||||
|
||||
return dynamicData.size();
|
||||
}
|
||||
|
||||
public NameValueSet getDynamicData( int index )
|
||||
{
|
||||
|
||||
|
@ -190,6 +180,16 @@ public class ISPDynamicData
|
|||
}
|
||||
|
||||
|
||||
public int getDynamicDataSize()
|
||||
{
|
||||
if ( dynamicData == null )
|
||||
this.parseDynamicData();
|
||||
if ( dynamicData == null )
|
||||
return 0;
|
||||
|
||||
return dynamicData.size();
|
||||
}
|
||||
|
||||
public void parseDynamicData()
|
||||
{
|
||||
if ( reggieData != null )
|
||||
|
|
|
@ -330,6 +330,14 @@ public class SetupPlugin extends Plugin
|
|||
return null;
|
||||
}
|
||||
|
||||
final public String GetISPModemNumber( String isp, int popIndex )
|
||||
{
|
||||
if ( privilegeCheck() == true )
|
||||
return CPGenerator.getISPModemNumber( isp, popIndex );
|
||||
else
|
||||
return null;
|
||||
}
|
||||
|
||||
final public String GetCurrentProfileDirectory()
|
||||
{
|
||||
if ( privilegeCheck() == true )
|
||||
|
|
Загрузка…
Ссылка в новой задаче