fix: setup change URL
This commit is contained in:
parent
2caf68cf4a
commit
be8d6cf3da
@ -25,7 +25,7 @@ object NeoTermPath {
|
||||
const val SOURCE_FILE = "$USR_PATH/etc/apt/sources.list"
|
||||
const val PACKAGE_LIST_DIR = "$USR_PATH/var/lib/apt/lists"
|
||||
|
||||
private const val SOURCE = "http://193.112.47.241"
|
||||
private const val SOURCE = "http://120.79.193.152"
|
||||
|
||||
val DEFAULT_MAIN_PACKAGE_SOURCE: String
|
||||
|
||||
|
@ -6,6 +6,7 @@ import android.content.Intent
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import android.support.v7.app.AppCompatActivity
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.widget.*
|
||||
import io.neoterm.App
|
||||
@ -142,6 +143,24 @@ class SetupActivity : AppCompatActivity(), View.OnClickListener, ResultListener
|
||||
Toast.makeText(this, R.string.no_file_picker, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
}
|
||||
|
||||
R.id.setup_method_online -> {
|
||||
val view = LayoutInflater.from(this).inflate(R.layout.dialog_edit_text, null, false)
|
||||
view.findViewById<TextView>(R.id.dialog_edit_text_info).text = getString(R.string.input_new_source_url)
|
||||
|
||||
val edit = view.findViewById<EditText>(R.id.dialog_edit_text_editor)
|
||||
|
||||
AlertDialog.Builder(this)
|
||||
.setTitle(R.string.new_source)
|
||||
.setView(view)
|
||||
.setPositiveButton(android.R.string.yes, { _, _ ->
|
||||
val newURL = edit.text.toString()
|
||||
val parameterEditor = findViewById<EditText>(R.id.setup_source_parameter)
|
||||
parameterEditor.setText(newURL)
|
||||
})
|
||||
.setNegativeButton(android.R.string.no, null)
|
||||
.show()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -168,7 +168,7 @@
|
||||
<string name="dangerous_zone">Dangerous Zone</string>
|
||||
<string name="reset_app_warning">You will have to re-setup later, confirm?</string>
|
||||
|
||||
<string name="default_source_url" translatable="false">http://193.112.47.241</string>
|
||||
<string name="default_source_url" translatable="false">http://120.79.193.152</string>
|
||||
|
||||
<string-array name="pref_general_shell_entries" translatable="false">
|
||||
<item>sh</item>
|
||||
|
@ -38,7 +38,7 @@
|
||||
android:title="@string/pref_general_volume_as_control" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:defaultValue="false"
|
||||
android:key="@string/key_general_use_execve_wrapper"
|
||||
android:summary="@string/pref_general_use_execve_wrapper_desc"
|
||||
android:title="@string/pref_general_use_execve_wrapper" />
|
||||
|
Loading…
Reference in New Issue
Block a user