Config: Rename function to make databinding happy
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
b60536222d
commit
f1d97a585a
@ -178,7 +178,7 @@ public class VpnService extends Service {
|
|||||||
protected void onPostExecute(final Boolean result) {
|
protected void onPostExecute(final Boolean result) {
|
||||||
if (!result)
|
if (!result)
|
||||||
return;
|
return;
|
||||||
config.setEnabled(false);
|
config.setIsEnabled(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ public class VpnService extends Service {
|
|||||||
protected void onPostExecute(final Boolean result) {
|
protected void onPostExecute(final Boolean result) {
|
||||||
if (!result)
|
if (!result)
|
||||||
return;
|
return;
|
||||||
config.setEnabled(true);
|
config.setIsEnabled(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,7 +228,7 @@ public class VpnService extends Service {
|
|||||||
try {
|
try {
|
||||||
final Config config = new Config();
|
final Config config = new Config();
|
||||||
config.parseFrom(openFileInput(fileName));
|
config.parseFrom(openFileInput(fileName));
|
||||||
config.setEnabled(interfaces.contains(configName));
|
config.setIsEnabled(interfaces.contains(configName));
|
||||||
config.setName(configName);
|
config.setName(configName);
|
||||||
configs.add(config);
|
configs.add(config);
|
||||||
} catch (IllegalArgumentException | IOException e) {
|
} catch (IllegalArgumentException | IOException e) {
|
||||||
@ -335,7 +335,7 @@ public class VpnService extends Service {
|
|||||||
oldConfig.copyFrom(newConfig);
|
oldConfig.copyFrom(newConfig);
|
||||||
newConfig = oldConfig;
|
newConfig = oldConfig;
|
||||||
}
|
}
|
||||||
newConfig.setEnabled(false);
|
newConfig.setIsEnabled(false);
|
||||||
configurations.put(newName, newConfig);
|
configurations.put(newName, newConfig);
|
||||||
if (shouldConnect)
|
if (shouldConnect)
|
||||||
new ConfigEnabler(newConfig).execute();
|
new ConfigEnabler(newConfig).execute();
|
||||||
|
@ -90,7 +90,7 @@ public class Config extends BaseObservable implements Copyable<Config>, Observab
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setEnabled(final boolean isEnabled) {
|
public void setIsEnabled(final boolean isEnabled) {
|
||||||
this.isEnabled = isEnabled;
|
this.isEnabled = isEnabled;
|
||||||
notifyPropertyChanged(BR.enabled);
|
notifyPropertyChanged(BR.enabled);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user