public class PreferenceControl extends java.lang.Object implements CotServiceRemote.ConnectionListener
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DIRNAME |
static java.lang.String |
DIRPATH |
java.lang.String[] |
PreferenceGroups |
static java.lang.String |
TAG |
Modifier and Type | Method and Description |
---|---|
void |
connect()
Preserves the original intent of connecting.
|
void |
disconnect() |
static void |
dispose() |
java.util.HashMap<java.lang.String,android.content.SharedPreferences> |
getAllPreferences()
Obtains all of the Shared Preferences used by the system.
|
static PreferenceControl |
getInstance(android.content.Context c)
Singleton class for exporting and importing external preferences into the system.
|
boolean |
ingestDefaults()
Loads a new default set of configuration options and then removes the file containing these
values.
|
boolean |
loadPartialSettings(android.content.Context context,
java.io.File configFile,
java.lang.String[] categorySet) |
void |
loadPartialSettings(android.content.Context context,
java.lang.String path,
boolean bCheckConnection,
java.lang.String[] categorySet) |
java.util.List<java.lang.String> |
loadSettings(java.io.File configFile)
Loads the settings, and optionally performs a connection check to see if the
CotServiceRemote is running (leaving that in as legacy)
|
java.util.List<java.lang.String> |
loadSettings(java.io.InputStream is)
Loads the settings, and optionally performs a connection check to see if the
CotServiceRemote is running (leaving that in as legacy)
|
void |
loadSettings(java.lang.String path,
boolean bCheckConnection) |
void |
onCotServiceConnected(android.os.Bundle fullServiceState) |
void |
onCotServiceDisconnected() |
void |
saveSettings(java.lang.String path) |
public static final java.lang.String TAG
public final java.lang.String[] PreferenceGroups
public static final java.lang.String DIRNAME
public static final java.lang.String DIRPATH
public static PreferenceControl getInstance(android.content.Context c)
public static void dispose()
public void connect()
public void disconnect()
public java.util.HashMap<java.lang.String,android.content.SharedPreferences> getAllPreferences()
public void saveSettings(java.lang.String path)
public boolean ingestDefaults()
public void loadSettings(java.lang.String path, boolean bCheckConnection)
public void loadPartialSettings(android.content.Context context, java.lang.String path, boolean bCheckConnection, java.lang.String[] categorySet)
public java.util.List<java.lang.String> loadSettings(java.io.File configFile)
public java.util.List<java.lang.String> loadSettings(java.io.InputStream is) throws java.lang.Exception
java.lang.Exception
public boolean loadPartialSettings(android.content.Context context, java.io.File configFile, java.lang.String[] categorySet)
public void onCotServiceConnected(android.os.Bundle fullServiceState)
onCotServiceConnected
in interface CotServiceRemote.ConnectionListener
fullServiceState
- (Bundle[]) fullServiceState.getParcelableArray("streams") which appears to be and array of
all of the current TAK servers bundle made up of CotPort.DESCRIPTION_KEY,
CotPort.ENABLED_KEY, CotPort.CONNECTED_KEY
lifted from CotStreamListener
fullServiceState can also contain
(Bundle[]) fullServiceState.getParcelableArray(getPortType()) which follows the same rules
above.
lifted from CotPortListActivitypublic void onCotServiceDisconnected()
onCotServiceDisconnected
in interface CotServiceRemote.ConnectionListener