mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-12-30 22:16:38 +00:00
Replace general resources with platform
This commit is contained in:
@@ -25,7 +25,7 @@ open class SplashActivity : Activity() {
|
||||
AlertDialog.Builder(this)
|
||||
.setTitle(R.string.unsupport_magisk_title)
|
||||
.setMessage(R.string.unsupport_magisk_message)
|
||||
.setNegativeButton(R.string.ok, null)
|
||||
.setNegativeButton(android.R.string.ok, null)
|
||||
.setOnDismissListener { finish() }
|
||||
.show()
|
||||
} else {
|
||||
|
||||
@@ -87,8 +87,8 @@ class HomeFragment : BaseFragment<HomeViewModel, FragmentMagiskBinding>(),
|
||||
.setTitle(R.string.proprietary_title)
|
||||
.setMessage(R.string.proprietary_notice)
|
||||
.setCancelable(false)
|
||||
.setPositiveButton(R.string.yes) { _, _ -> download() }
|
||||
.setNegativeButton(R.string.no_thanks) { _, _ -> viewModel.finishSafetyNetCheck(-2) }
|
||||
.setPositiveButton(android.R.string.yes) { _, _ -> download() }
|
||||
.setNegativeButton(android.R.string.no) { _, _ -> viewModel.finishSafetyNetCheck(-2) }
|
||||
.show()
|
||||
}
|
||||
|
||||
|
||||
@@ -295,8 +295,8 @@ class SettingsFragment : BasePreferenceFragment() {
|
||||
AlertDialog.Builder(requireActivity())
|
||||
.setTitle(R.string.settings_update_custom)
|
||||
.setView(v)
|
||||
.setPositiveButton(R.string.ok) { _, _ -> onSuccess(url.text.toString()) }
|
||||
.setNegativeButton(R.string.close) { _, _ -> onCancel() }
|
||||
.setPositiveButton(android.R.string.ok) { _, _ -> onSuccess(url.text.toString()) }
|
||||
.setNegativeButton(android.R.string.cancel) { _, _ -> onCancel() }
|
||||
.setOnCancelListener { onCancel() }
|
||||
.show()
|
||||
}
|
||||
@@ -320,11 +320,11 @@ class SettingsFragment : BasePreferenceFragment() {
|
||||
AlertDialog.Builder(requireActivity())
|
||||
.setTitle(R.string.settings_download_path_title)
|
||||
.setView(binding.root)
|
||||
.setPositiveButton(R.string.ok) { _, _ ->
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
Utils.ensureDownloadPath(data.text.value)?.let { onSuccess(data.text.value) }
|
||||
?: Utils.toast(R.string.settings_download_path_error, Toast.LENGTH_SHORT)
|
||||
}
|
||||
.setNegativeButton(R.string.close, null)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
|
||||
@@ -339,12 +339,12 @@ class SettingsFragment : BasePreferenceFragment() {
|
||||
AlertDialog.Builder(requireActivity())
|
||||
.setTitle(R.string.settings_app_name)
|
||||
.setView(view.root)
|
||||
.setPositiveButton(R.string.ok) { _, _ ->
|
||||
.setPositiveButton(android.R.string.ok) { _, _ ->
|
||||
if (view.dialogNameInput.error.isNullOrBlank()) {
|
||||
onSuccess(data.name.value)
|
||||
}
|
||||
}
|
||||
.setNegativeButton(R.string.close, null)
|
||||
.setNegativeButton(android.R.string.cancel, null)
|
||||
.show()
|
||||
}
|
||||
|
||||
|
||||
@@ -84,8 +84,8 @@ class SuperuserViewModel(
|
||||
CustomAlertDialog(this)
|
||||
.setTitle(R.string.su_revoke_title)
|
||||
.setMessage(getString(R.string.su_revoke_msg, item.item.appName))
|
||||
.setPositiveButton(R.string.yes) { _, _ -> updateState() }
|
||||
.setNegativeButton(R.string.no_thanks, null)
|
||||
.setPositiveButton(android.R.string.yes) { _, _ -> updateState() }
|
||||
.setNegativeButton(android.R.string.no, null)
|
||||
.setCancelable(true)
|
||||
.show()
|
||||
}
|
||||
@@ -144,4 +144,4 @@ class SuperuserViewModel(
|
||||
private fun deletePolicy(policy: MagiskPolicy) =
|
||||
policyDB.delete(policy.uid).andThen(Single.just(policy))
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ object MarkDownWindow : KoinComponent {
|
||||
AlertDialog.Builder(activity)
|
||||
.setTitle(title)
|
||||
.setView(mv)
|
||||
.setNegativeButton(R.string.close) { dialog, _ -> dialog.dismiss() }
|
||||
.setNegativeButton(android.R.string.cancel) { dialog, _ -> dialog.dismiss() }
|
||||
.show()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class EnvFixDialog(activity: Activity) : CustomAlertDialog(activity) {
|
||||
setTitle(R.string.env_fix_title)
|
||||
setMessage(R.string.env_fix_msg)
|
||||
setCancelable(true)
|
||||
setPositiveButton(R.string.yes) { _, _ ->
|
||||
setPositiveButton(android.R.string.yes) { _, _ ->
|
||||
val pd = ProgressDialog.show(activity,
|
||||
activity.getString(R.string.setup_title),
|
||||
activity.getString(R.string.setup_msg))
|
||||
@@ -46,6 +46,6 @@ class EnvFixDialog(activity: Activity) : CustomAlertDialog(activity) {
|
||||
}
|
||||
}.exec()
|
||||
}
|
||||
setNegativeButton(R.string.no_thanks, null)
|
||||
setNegativeButton(android.R.string.no, null)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ class FingerprintAuthDialog(activity: Activity, private val callback: () -> Unit
|
||||
binding.message.compoundDrawablePadding = Utils.dpInPx(20)
|
||||
binding.message.gravity = Gravity.CENTER
|
||||
setMessage(R.string.auth_fingerprint)
|
||||
setNegativeButton(R.string.close) { _, _ ->
|
||||
setNegativeButton(android.R.string.cancel) { _, _ ->
|
||||
helper?.cancel()
|
||||
failureCallback?.invoke()
|
||||
}
|
||||
|
||||
@@ -62,12 +62,12 @@ internal class InstallMethodDialog(activity: BaseActivity<*, *>, options: List<S
|
||||
.setTitle(R.string.warning)
|
||||
.setMessage(R.string.install_inactive_slot_msg)
|
||||
.setCancelable(true)
|
||||
.setPositiveButton(R.string.yes) { _, _ ->
|
||||
.setPositiveButton(android.R.string.yes) { _, _ ->
|
||||
DownloadService(activity) {
|
||||
subject = DownloadSubject.Magisk(Configuration.Flash.Secondary)
|
||||
}
|
||||
}
|
||||
.setNegativeButton(R.string.no_thanks, null)
|
||||
.setNegativeButton(android.R.string.no, null)
|
||||
.show()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user