aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cashier/build.gradle2
-rw-r--r--cashier/src/main/java/net/taler/cashier/ConfigFragment.kt6
-rw-r--r--merchant-terminal/src/main/java/net/taler/merchantpos/MainActivity.kt2
-rw-r--r--merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigFetcherFragment.kt2
-rw-r--r--merchant-terminal/src/main/java/net/taler/merchantpos/config/MerchantConfigFragment.kt4
-rw-r--r--merchant-terminal/src/main/java/net/taler/merchantpos/history/MerchantHistoryFragment.kt2
-rw-r--r--merchant-terminal/src/main/java/net/taler/merchantpos/history/RefundFragment.kt2
-rw-r--r--merchant-terminal/src/main/java/net/taler/merchantpos/payment/ProcessPaymentFragment.kt4
-rw-r--r--merchant-terminal/src/main/res/values/strings.xml6
-rw-r--r--wallet/src/main/java/net/taler/wallet/SettingsFragment.kt4
-rw-r--r--wallet/src/main/java/net/taler/wallet/payment/ProductImageFragment.kt2
-rw-r--r--wallet/src/main/java/net/taler/wallet/pending/PendingOperationsFragment.kt4
-rw-r--r--wallet/src/main/java/net/taler/wallet/transactions/JsonDialogFragment.kt2
13 files changed, 21 insertions, 21 deletions
diff --git a/cashier/build.gradle b/cashier/build.gradle
index e256396..150e277 100644
--- a/cashier/build.gradle
+++ b/cashier/build.gradle
@@ -56,7 +56,7 @@ android {
dependencies {
implementation project(":taler-kotlin-common")
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
- implementation 'androidx.security:security-crypto:1.0.0-beta01'
+ implementation 'androidx.security:security-crypto:1.0.0-rc01'
implementation 'com.google.android.material:material:1.1.0'
implementation "androidx.navigation:navigation-fragment-ktx:$nav_version"
diff --git a/cashier/src/main/java/net/taler/cashier/ConfigFragment.kt b/cashier/src/main/java/net/taler/cashier/ConfigFragment.kt
index 501eed7..71495f3 100644
--- a/cashier/src/main/java/net/taler/cashier/ConfigFragment.kt
+++ b/cashier/src/main/java/net/taler/cashier/ConfigFragment.kt
@@ -132,14 +132,14 @@ class ConfigFragment : Fragment() {
findNavController().navigate(action)
}
ConfigResult.Offline -> {
- Snackbar.make(view!!, R.string.config_error_offline, LENGTH_LONG).show()
+ Snackbar.make(requireView(), R.string.config_error_offline, LENGTH_LONG).show()
}
is ConfigResult.Error -> {
if (result.authError) {
- Snackbar.make(view!!, R.string.config_error_auth, LENGTH_LONG).show()
+ Snackbar.make(requireView(), R.string.config_error_auth, LENGTH_LONG).show()
} else {
val str = getString(R.string.config_error, result.msg)
- Snackbar.make(view!!, str, LENGTH_LONG).show()
+ Snackbar.make(requireView(), str, LENGTH_LONG).show()
}
}
}.exhaustive
diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/MainActivity.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/MainActivity.kt
index 64f6ceb..533c540 100644
--- a/merchant-terminal/src/main/java/net/taler/merchantpos/MainActivity.kt
+++ b/merchant-terminal/src/main/java/net/taler/merchantpos/MainActivity.kt
@@ -48,7 +48,7 @@ class MainActivity : AppCompatActivity(), OnNavigationItemSelectedListener {
private var reallyExit = false
companion object {
- val TAG = "taler-pos"
+ const val TAG = "taler-pos"
}
override fun onCreate(savedInstanceState: Bundle?) {
diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigFetcherFragment.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigFetcherFragment.kt
index 7f322fd..8231052 100644
--- a/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigFetcherFragment.kt
+++ b/merchant-terminal/src/main/java/net/taler/merchantpos/config/ConfigFetcherFragment.kt
@@ -58,7 +58,7 @@ class ConfigFetcherFragment : Fragment() {
}
private fun onNetworkError(msg: String) {
- Snackbar.make(view!!, msg, LENGTH_SHORT).show()
+ Snackbar.make(requireView(), msg, LENGTH_SHORT).show()
navigate(actionConfigFetcherToMerchantSettings())
}
diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/config/MerchantConfigFragment.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/config/MerchantConfigFragment.kt
index a584af8..77a87fb 100644
--- a/merchant-terminal/src/main/java/net/taler/merchantpos/config/MerchantConfigFragment.kt
+++ b/merchant-terminal/src/main/java/net/taler/merchantpos/config/MerchantConfigFragment.kt
@@ -147,13 +147,13 @@ class MerchantConfigFragment : Fragment() {
private fun onConfigReceived(currency: String) {
onResultReceived()
updateView()
- topSnackbar(view!!, getString(R.string.config_changed, currency), LENGTH_LONG)
+ topSnackbar(requireView(), getString(R.string.config_changed, currency), LENGTH_LONG)
navigate(actionSettingsToOrder())
}
private fun onError(msg: String) {
onResultReceived()
- Snackbar.make(view!!, msg, LENGTH_LONG).show()
+ Snackbar.make(requireView(), msg, LENGTH_LONG).show()
}
private fun onResultReceived() {
diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/history/MerchantHistoryFragment.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/history/MerchantHistoryFragment.kt
index 589a549..6da3dd2 100644
--- a/merchant-terminal/src/main/java/net/taler/merchantpos/history/MerchantHistoryFragment.kt
+++ b/merchant-terminal/src/main/java/net/taler/merchantpos/history/MerchantHistoryFragment.kt
@@ -103,7 +103,7 @@ class MerchantHistoryFragment : Fragment(), RefundClickListener {
}
private fun onError() {
- Snackbar.make(view!!, R.string.error_network, LENGTH_SHORT).show()
+ Snackbar.make(requireView(), R.string.error_network, LENGTH_SHORT).show()
}
override fun onRefundClicked(item: HistoryItem) {
diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/history/RefundFragment.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/history/RefundFragment.kt
index 2b85add..eb3d46d 100644
--- a/merchant-terminal/src/main/java/net/taler/merchantpos/history/RefundFragment.kt
+++ b/merchant-terminal/src/main/java/net/taler/merchantpos/history/RefundFragment.kt
@@ -100,7 +100,7 @@ class RefundFragment : Fragment() {
}
private fun onError(@StringRes res: Int) {
- Snackbar.make(view!!, res, LENGTH_LONG).show()
+ Snackbar.make(requireView(), res, LENGTH_LONG).show()
progressBar.fadeOut()
refundButton.fadeIn()
}
diff --git a/merchant-terminal/src/main/java/net/taler/merchantpos/payment/ProcessPaymentFragment.kt b/merchant-terminal/src/main/java/net/taler/merchantpos/payment/ProcessPaymentFragment.kt
index 9c9457c..e947ae2 100644
--- a/merchant-terminal/src/main/java/net/taler/merchantpos/payment/ProcessPaymentFragment.kt
+++ b/merchant-terminal/src/main/java/net/taler/merchantpos/payment/ProcessPaymentFragment.kt
@@ -62,7 +62,7 @@ class ProcessPaymentFragment : Fragment() {
private fun onPaymentStateChanged(payment: Payment) {
if (payment.error) {
- topSnackbar(view!!, R.string.error_network, LENGTH_LONG)
+ topSnackbar(requireView(), R.string.error_network, LENGTH_LONG)
findNavController().navigateUp()
return
}
@@ -88,7 +88,7 @@ class ProcessPaymentFragment : Fragment() {
private fun onPaymentCancel() {
paymentManager.cancelPayment()
findNavController().navigateUp()
- topSnackbar(view!!, R.string.payment_canceled, LENGTH_LONG)
+ topSnackbar(requireView(), R.string.payment_canceled, LENGTH_LONG)
}
}
diff --git a/merchant-terminal/src/main/res/values/strings.xml b/merchant-terminal/src/main/res/values/strings.xml
index 1c76a51..eabe816 100644
--- a/merchant-terminal/src/main/res/values/strings.xml
+++ b/merchant-terminal/src/main/res/values/strings.xml
@@ -1,5 +1,5 @@
<resources>
- <string name="app_name">Taler Merchant PoS Terminal</string>
+ <string name="app_name">GNU Taler Point-of-Sale</string>
<string name="app_name_short">Merchant Terminal</string>
<string name="project_name">GNU Taler</string>
@@ -59,8 +59,8 @@
<string name="refund_error_backend">Error processing refund</string>
<string name="refund_error_deadline">Refund deadline has passed</string>
<string name="refund_error_already_refunded">Already refunded</string>
- <string name="refund_intro_nfc">Please let customer scan QR Code or use NFC to give refund</string>
- <string name="refund_intro">Please let customer scan QR Code to give refund</string>
+ <string name="refund_intro_nfc">Please let customer scan QR Code or use NFC to offer refund</string>
+ <string name="refund_intro">Please let customer scan QR Code to offer refund</string>
<string name="refund_order_ref">Purchase reference: %1$s\n\n%2$s</string>
<string name="error_network">Network error</string>
diff --git a/wallet/src/main/java/net/taler/wallet/SettingsFragment.kt b/wallet/src/main/java/net/taler/wallet/SettingsFragment.kt
index a38a5a3..c4622a6 100644
--- a/wallet/src/main/java/net/taler/wallet/SettingsFragment.kt
+++ b/wallet/src/main/java/net/taler/wallet/SettingsFragment.kt
@@ -77,10 +77,10 @@ class SettingsFragment : PreferenceFragmentCompat() {
.setMessage("Do you really want to reset the wallet and lose all coins and purchases?")
.setPositiveButton("Reset") { _, _ ->
model.dangerouslyReset()
- Snackbar.make(view!!, "Wallet has been reset", LENGTH_SHORT).show()
+ Snackbar.make(requireView(), "Wallet has been reset", LENGTH_SHORT).show()
}
.setNegativeButton("Cancel") { _, _ ->
- Snackbar.make(view!!, "Reset cancelled", LENGTH_SHORT).show()
+ Snackbar.make(requireView(), "Reset cancelled", LENGTH_SHORT).show()
}
.show()
}
diff --git a/wallet/src/main/java/net/taler/wallet/payment/ProductImageFragment.kt b/wallet/src/main/java/net/taler/wallet/payment/ProductImageFragment.kt
index 02414a6..ff70f75 100644
--- a/wallet/src/main/java/net/taler/wallet/payment/ProductImageFragment.kt
+++ b/wallet/src/main/java/net/taler/wallet/payment/ProductImageFragment.kt
@@ -45,7 +45,7 @@ class ProductImageFragment private constructor() : DialogFragment() {
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- val bitmap = arguments!!.getParcelable<Bitmap>(IMAGE)
+ val bitmap = requireArguments().getParcelable<Bitmap>(IMAGE)
productImageView.setImageBitmap(bitmap)
}
diff --git a/wallet/src/main/java/net/taler/wallet/pending/PendingOperationsFragment.kt b/wallet/src/main/java/net/taler/wallet/pending/PendingOperationsFragment.kt
index 2eb8721..293dbdb 100644
--- a/wallet/src/main/java/net/taler/wallet/pending/PendingOperationsFragment.kt
+++ b/wallet/src/main/java/net/taler/wallet/pending/PendingOperationsFragment.kt
@@ -37,9 +37,9 @@ import androidx.recyclerview.widget.RecyclerView
import com.google.android.material.snackbar.Snackbar
import com.google.android.material.snackbar.Snackbar.LENGTH_SHORT
import kotlinx.android.synthetic.main.fragment_pending_operations.*
+import net.taler.wallet.MainViewModel
import net.taler.wallet.R
import net.taler.wallet.TAG
-import net.taler.wallet.MainViewModel
import org.json.JSONObject
interface PendingOperationClickListener {
@@ -109,7 +109,7 @@ class PendingOperationsFragment : Fragment(), PendingOperationClickListener {
}
override fun onPendingOperationClick(type: String, detail: JSONObject) {
- Snackbar.make(view!!, "No detail view for $type implemented yet.", LENGTH_SHORT).show()
+ Snackbar.make(requireView(), "No detail view for $type implemented yet.", LENGTH_SHORT).show()
}
override fun onPendingOperationActionClick(type: String, detail: JSONObject) {
diff --git a/wallet/src/main/java/net/taler/wallet/transactions/JsonDialogFragment.kt b/wallet/src/main/java/net/taler/wallet/transactions/JsonDialogFragment.kt
index 4139da8..2337059 100644
--- a/wallet/src/main/java/net/taler/wallet/transactions/JsonDialogFragment.kt
+++ b/wallet/src/main/java/net/taler/wallet/transactions/JsonDialogFragment.kt
@@ -45,7 +45,7 @@ class JsonDialogFragment : DialogFragment() {
}
override fun onViewCreated(view: View, savedInstanceState: Bundle?) {
- val json = arguments!!.getString("json")
+ val json = requireArguments().getString("json")
jsonView.text = json
}