Give Samuel heart attack by removing Dagger
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
@@ -16,28 +16,23 @@ import com.wireguard.android.BuildConfig;
|
||||
import com.wireguard.android.R;
|
||||
import com.wireguard.android.backend.GoBackend;
|
||||
import com.wireguard.android.backend.WgQuickBackend;
|
||||
import com.wireguard.android.util.RootShell;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import java9.util.concurrent.CompletionStage;
|
||||
|
||||
public class VersionPreference extends Preference {
|
||||
private String versionSummary;
|
||||
|
||||
public VersionPreference(final Context context, final AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
if (Application.getComponent().getBackendType() == GoBackend.class) {
|
||||
if (Application.getBackendType() == GoBackend.class) {
|
||||
versionSummary = getContext().getString(R.string.version_userspace_summary, GoBackend.getVersion());
|
||||
} else if (Application.getComponent().getBackendType() == WgQuickBackend.class) {
|
||||
} else if (Application.getBackendType() == WgQuickBackend.class) {
|
||||
versionSummary = getContext().getString(R.string.version_kernel_summary_checking);
|
||||
Application.getComponent().getAsyncWorker().supplyAsync(() -> {
|
||||
Application.getAsyncWorker().supplyAsync(() -> {
|
||||
final List<String> output = new ArrayList<>();
|
||||
if (Application.getComponent().getRootShell()
|
||||
if (Application.getRootShell()
|
||||
.run(output, "cat /sys/module/wireguard/version") != 0 || output.isEmpty())
|
||||
throw new RuntimeException("Unable to determine kernel module version");
|
||||
return output.get(0);
|
||||
|
||||
Reference in New Issue
Block a user