GoBackend: integrate into app
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
@@ -2,9 +2,12 @@ package com.wireguard.android.activity;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceFragment;
|
||||
|
||||
import com.wireguard.android.Application;
|
||||
import com.wireguard.android.R;
|
||||
import com.wireguard.android.backend.WgQuickBackend;
|
||||
|
||||
/**
|
||||
* Interface for changing application-global persistent settings.
|
||||
@@ -26,6 +29,11 @@ public class SettingsActivity extends Activity {
|
||||
public void onCreate(final Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
addPreferencesFromResource(R.xml.preferences);
|
||||
if (Application.getComponent().getBackendType() != WgQuickBackend.class) {
|
||||
final Preference toolsInstaller =
|
||||
getPreferenceManager().findPreference("tools_installer");
|
||||
getPreferenceScreen().removePreference(toolsInstaller);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user