Update SetupQemuActivity.java

This commit is contained in:
Noureldeen Elsayed 2024-03-24 18:48:06 +02:00 committed by GitHub
parent a545510893
commit 93a6462f7c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -65,7 +65,7 @@ public class SetupQemuActivity extends AppCompatActivity implements View.OnClick
public void onClick(View v) {
int id = v.getId();
if (id == R.id.btnDownload) {
String qe = AppConfig.vectrasPkg;
String qe = AppConfig.getSetupFiles();
Intent q = new Intent(Intent.ACTION_VIEW);
q.setData(Uri.parse(qe));
startActivity(q);
@ -94,8 +94,6 @@ public class SetupQemuActivity extends AppCompatActivity implements View.OnClick
String setupFilesUrl = AppConfig.getSetupFiles();
tvSelectedPath.setText(setupFilesUrl);
String filesDir = activity.getFilesDir().getAbsolutePath();
if (!com.vectras.vm.utils.FileUtils.readFromFile(activity, new File(filesDir + "/distro/etc/apk/repositories")).contains("http://dl-cdn.alpinelinux.org/alpine/edge/testing"))
executeShellCommand("echo \"http://dl-cdn.alpinelinux.org/alpine/edge/testing\" >> /etc/apk/repositories");
@ -308,4 +306,4 @@ public class SetupQemuActivity extends AppCompatActivity implements View.OnClick
}
}).start(); // Execute the command in a separate thread to prevent blocking the UI thread
}
}
}