Searched refs:Prefs (Results 1 – 2 of 2) sorted by relevance
/development/samples/ToyVpn/src/com/example/android/toyvpn/ |
D | ToyVpnClient.java | 34 public interface Prefs { interface in ToyVpnClient 59 final SharedPreferences prefs = getSharedPreferences(Prefs.NAME, MODE_PRIVATE); in onCreate() 60 serverAddress.setText(prefs.getString(Prefs.SERVER_ADDRESS, "")); in onCreate() 61 int serverPortPrefValue = prefs.getInt(Prefs.SERVER_PORT, 0); in onCreate() 63 sharedSecret.setText(prefs.getString(Prefs.SHARED_SECRET, "")); in onCreate() 64 proxyHost.setText(prefs.getString(Prefs.PROXY_HOSTNAME, "")); in onCreate() 65 int proxyPortPrefValue = prefs.getInt(Prefs.PROXY_PORT, 0); in onCreate() 68 allowed.setChecked(prefs.getBoolean(Prefs.ALLOW, true)); in onCreate() 70 Prefs.PACKAGES, Collections.emptySet()))); in onCreate() 100 .putString(Prefs.SERVER_ADDRESS, serverAddress.getText().toString()) in onCreate() [all …]
|
D | ToyVpnService.java | 104 final SharedPreferences prefs = getSharedPreferences(ToyVpnClient.Prefs.NAME, MODE_PRIVATE); in connect() 105 final String server = prefs.getString(ToyVpnClient.Prefs.SERVER_ADDRESS, ""); in connect() 106 final byte[] secret = prefs.getString(ToyVpnClient.Prefs.SHARED_SECRET, "").getBytes(); in connect() 107 final boolean allow = prefs.getBoolean(ToyVpnClient.Prefs.ALLOW, true); in connect() 109 prefs.getStringSet(ToyVpnClient.Prefs.PACKAGES, Collections.emptySet()); in connect() 110 final int port = prefs.getInt(ToyVpnClient.Prefs.SERVER_PORT, 0); in connect() 111 final String proxyHost = prefs.getString(ToyVpnClient.Prefs.PROXY_HOSTNAME, ""); in connect() 112 final int proxyPort = prefs.getInt(ToyVpnClient.Prefs.PROXY_PORT, 0); in connect()
|