gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-wallet-android] branch master updated (bf3f54d -> 9c160ac)


From: gnunet
Subject: [taler-wallet-android] branch master updated (bf3f54d -> 9c160ac)
Date: Mon, 09 Dec 2019 19:59:34 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a change to branch master
in repository wallet-android.

    from bf3f54d  pending ops, various tweaks
     new b39914e  allow starting the app via NFC
     new 9c160ac  tos / branding

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .idea/dictionaries/dold.xml                        |   2 +
 app/src/main/ic_launcher-web.png                   | Bin 0 -> 14129 bytes
 .../net/taler/wallet/HostCardEmulatorService.kt    |  11 ++-
 .../main/java/net/taler/wallet/PromptWithdraw.kt   |  10 +++
 .../java/net/taler/wallet/ReviewExchangeTOS.kt     |  76 ++++++++++++++++
 .../main/java/net/taler/wallet/WalletViewModel.kt  |  98 ++++++++++++++++++---
 .../taler/wallet/backend/WalletBackendService.kt   |   2 +-
 .../res/drawable-v24/ic_launcher_foreground.xml    |  34 -------
 .../main/res/drawable/ic_launcher_background.xml   |  74 ----------------
 .../main/res/drawable/ic_launcher_foreground.xml   |  51 +++++++++++
 app/src/main/res/drawable/ic_logo_taler.xml        |  48 ++++++++++
 app/src/main/res/drawable/side_nav_bar.xml         |   5 +-
 .../res/layout/fragment_review_exchange_tos.xml    |  56 ++++++++++++
 app/src/main/res/layout/fragment_settings.xml      |   4 +-
 app/src/main/res/layout/nav_header_main.xml        |   7 +-
 app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml |   2 +-
 .../res/mipmap-anydpi-v26/ic_launcher_round.xml    |   2 +-
 app/src/main/res/mipmap-hdpi/ic_launcher.png       | Bin 2963 -> 1611 bytes
 app/src/main/res/mipmap-hdpi/ic_launcher_round.png | Bin 4905 -> 2898 bytes
 app/src/main/res/mipmap-mdpi/ic_launcher.png       | Bin 2060 -> 1101 bytes
 app/src/main/res/mipmap-mdpi/ic_launcher_round.png | Bin 2783 -> 1836 bytes
 app/src/main/res/mipmap-xhdpi/ic_launcher.png      | Bin 4490 -> 2314 bytes
 .../main/res/mipmap-xhdpi/ic_launcher_round.png    | Bin 6895 -> 4158 bytes
 app/src/main/res/mipmap-xxhdpi/ic_launcher.png     | Bin 6387 -> 3405 bytes
 .../main/res/mipmap-xxhdpi/ic_launcher_round.png   | Bin 10413 -> 6328 bytes
 app/src/main/res/mipmap-xxxhdpi/ic_launcher.png    | Bin 9128 -> 4592 bytes
 .../main/res/mipmap-xxxhdpi/ic_launcher_round.png  | Bin 15132 -> 8828 bytes
 app/src/main/res/navigation/nav_graph.xml          |  14 +++
 app/src/main/res/values/colors.xml                 |   6 +-
 app/src/main/res/values/ic_launcher_background.xml |   4 +
 app/src/main/res/values/strings.xml                |   5 +-
 app/src/main/res/xml/apduservice.xml               |   2 +-
 32 files changed, 374 insertions(+), 139 deletions(-)
 create mode 100644 app/src/main/ic_launcher-web.png
 create mode 100644 app/src/main/java/net/taler/wallet/ReviewExchangeTOS.kt
 delete mode 100644 app/src/main/res/drawable-v24/ic_launcher_foreground.xml
 delete mode 100644 app/src/main/res/drawable/ic_launcher_background.xml
 create mode 100644 app/src/main/res/drawable/ic_launcher_foreground.xml
 create mode 100644 app/src/main/res/drawable/ic_logo_taler.xml
 create mode 100644 app/src/main/res/layout/fragment_review_exchange_tos.xml
 create mode 100644 app/src/main/res/values/ic_launcher_background.xml

diff --git a/.idea/dictionaries/dold.xml b/.idea/dictionaries/dold.xml
index b258635..1beba1b 100644
--- a/.idea/dictionaries/dold.xml
+++ b/.idea/dictionaries/dold.xml
@@ -1,7 +1,9 @@
 <component name="ProjectDictionaryState">
   <dictionary name="dold">
     <words>
+      <w>aiddescription</w>
       <w>apdu</w>
+      <w>servicedesc</w>
       <w>taler</w>
     </words>
   </dictionary>
diff --git a/app/src/main/ic_launcher-web.png b/app/src/main/ic_launcher-web.png
new file mode 100644
index 0000000..f0f6be7
Binary files /dev/null and b/app/src/main/ic_launcher-web.png differ
diff --git a/app/src/main/java/net/taler/wallet/HostCardEmulatorService.kt 
b/app/src/main/java/net/taler/wallet/HostCardEmulatorService.kt
index b099b74..9134df4 100644
--- a/app/src/main/java/net/taler/wallet/HostCardEmulatorService.kt
+++ b/app/src/main/java/net/taler/wallet/HostCardEmulatorService.kt
@@ -1,11 +1,13 @@
 package net.taler.wallet
 
 import android.content.*
+import android.net.Uri
 import android.nfc.cardemulation.HostApduService
 import android.os.Bundle
 import android.util.Log
 import java.io.ByteArrayInputStream
 import java.io.ByteArrayOutputStream
+import java.net.URI
 import java.util.concurrent.ConcurrentLinkedDeque
 
 fun makeApduSuccessResponse(payload: ByteArray): ByteArray {
@@ -123,10 +125,11 @@ class HostCardEmulatorService: HostApduService() {
                     val url = String(bodyBytes, Charsets.UTF_8)
                     Log.v(TAG, "got URL: '$url'")
 
-                    Intent().also { intent ->
-                        intent.action = TRIGGER_PAYMENT_ACTION
-                        intent.putExtra("contractUrl", url)
-                        sendBroadcast(intent)
+                    Intent(this, MainActivity::class.java).also { intent ->
+                        intent.data = Uri.parse(url)
+                        intent.action = Intent.ACTION_VIEW
+                        intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK)
+                        startActivity(intent)
                     }
                 }
                 2 -> {
diff --git a/app/src/main/java/net/taler/wallet/PromptWithdraw.kt 
b/app/src/main/java/net/taler/wallet/PromptWithdraw.kt
index 785da42..57965f5 100644
--- a/app/src/main/java/net/taler/wallet/PromptWithdraw.kt
+++ b/app/src/main/java/net/taler/wallet/PromptWithdraw.kt
@@ -61,6 +61,10 @@ class PromptWithdraw : Fragment() {
             }
             is WithdrawStatus.None -> {
 
+            }
+            is WithdrawStatus.TermsOfServiceReviewRequired -> {
+                val navController = 
requireActivity().findNavController(R.id.nav_host_fragment)
+                
navController.navigate(R.id.action_promptWithdraw_to_reviewExchangeTOS)
             }
             else -> {
                 val bar = Snackbar.make(view, "Bug: Unexpected result", 
Snackbar.LENGTH_SHORT)
@@ -88,6 +92,12 @@ class PromptWithdraw : Fragment() {
             showWithdrawStatus(view, it)
         })
 
+        
view.findViewById<Button>(R.id.button_cancel_withdraw).setOnClickListener {
+            val navController = 
requireActivity().findNavController(R.id.nav_host_fragment)
+            model.cancelCurrentWithdraw()
+            navController.navigateUp()
+        }
+
         
view.findViewById<Button>(R.id.button_confirm_withdraw).setOnClickListener {
             val status = this.model.withdrawStatus.value
             if (status !is WithdrawStatus.ReceivedDetails) {
diff --git a/app/src/main/java/net/taler/wallet/ReviewExchangeTOS.kt 
b/app/src/main/java/net/taler/wallet/ReviewExchangeTOS.kt
new file mode 100644
index 0000000..542b855
--- /dev/null
+++ b/app/src/main/java/net/taler/wallet/ReviewExchangeTOS.kt
@@ -0,0 +1,76 @@
+package net.taler.wallet
+
+
+import android.os.Bundle
+import androidx.fragment.app.Fragment
+import android.view.LayoutInflater
+import android.view.View
+import android.view.ViewGroup
+import android.widget.Button
+import android.widget.CheckBox
+import android.widget.CompoundButton
+import android.widget.TextView
+import androidx.lifecycle.Observer
+import androidx.lifecycle.ViewModelProviders
+import androidx.navigation.findNavController
+
+/**
+ * A simple [Fragment] subclass.
+ */
+class ReviewExchangeTOS : Fragment() {
+
+    private lateinit var acceptButton: Button
+    private lateinit var model: WalletViewModel
+
+    override fun onCreate(savedInstanceState: Bundle?) {
+        super.onCreate(savedInstanceState)
+
+        model = activity?.run {
+            ViewModelProviders.of(this)[WalletViewModel::class.java]
+        } ?: throw Exception("Invalid Activity")
+    }
+
+    private fun onAcceptCheck(checked: Boolean) {
+        acceptButton.isEnabled = checked
+    }
+
+    override fun onCreateView(
+        inflater: LayoutInflater, container: ViewGroup?,
+        savedInstanceState: Bundle?
+    ): View? {
+        // Inflate the layout for this fragment
+        val view = inflater.inflate(R.layout.fragment_review_exchange_tos, 
container, false)
+        val navController = 
requireActivity().findNavController(R.id.nav_host_fragment)
+        view.findViewById<Button>(R.id.button_tos_abort).setOnClickListener {
+            model.cancelCurrentWithdraw()
+            navController.navigateUp()
+        }
+        acceptButton = view.findViewById<Button>(R.id.button_tos_accept)
+        acceptButton.setOnClickListener {
+            model.acceptCurrentTermsOfService()
+        }
+        val checkbox = view.findViewById<CheckBox>(R.id.checkBox_accept_tos)
+        checkbox.isChecked = false
+        checkbox.setOnCheckedChangeListener { buttonView, isChecked ->
+            onAcceptCheck(isChecked)
+        }
+        onAcceptCheck(false)
+        val tosTextField = view.findViewById<TextView>(R.id.text_tos)
+        model.withdrawStatus.observe(this, Observer {
+            when (it) {
+                is WithdrawStatus.TermsOfServiceReviewRequired -> {
+                    tosTextField.text = it.tosText
+                }
+                is WithdrawStatus.Loading -> {
+                    
navController.navigate(R.id.action_reviewExchangeTOS_to_promptWithdraw)
+                }
+                is WithdrawStatus.ReceivedDetails -> {
+                    
navController.navigate(R.id.action_reviewExchangeTOS_to_promptWithdraw)
+                }
+                else -> {
+                }
+            }
+        })
+        return view
+    }
+}
diff --git a/app/src/main/java/net/taler/wallet/WalletViewModel.kt 
b/app/src/main/java/net/taler/wallet/WalletViewModel.kt
index f8acc2d..fd53470 100644
--- a/app/src/main/java/net/taler/wallet/WalletViewModel.kt
+++ b/app/src/main/java/net/taler/wallet/WalletViewModel.kt
@@ -61,6 +61,12 @@ open class PayStatus {
 open class WithdrawStatus {
     class None : WithdrawStatus()
     data class Loading(val talerWithdrawUri: String) : WithdrawStatus()
+    data class TermsOfServiceReviewRequired(
+        val talerWithdrawUri: String,
+        val exchangeBaseUrl: String,
+        val tosText: String,
+        val tosEtag: String
+    ) : WithdrawStatus()
     class Success : WithdrawStatus()
     data class ReceivedDetails(
         val talerWithdrawUri: String,
@@ -118,6 +124,7 @@ class WalletViewModel(val app: Application) : 
AndroidViewModel(app) {
     private var activeGetPending = 0
 
     private var currentPayRequestId = 0
+    private var currentWithdrawRequestId = 0
 
     private val walletBackendApi = WalletBackendApi(app)
 
@@ -299,22 +306,71 @@ class WalletViewModel(val app: Application) : 
AndroidViewModel(app) {
 
         withdrawStatus.value = WithdrawStatus.Loading(talerWithdrawUri)
 
-        walletBackendApi.sendRequest("getWithdrawalInfo", args) { result ->
-            Log.v(TAG, "got getWithdrawalInfo result")
+        this.currentWithdrawRequestId++
+        val myWithdrawRequestId = this.currentWithdrawRequestId
+
+        walletBackendApi.sendRequest("getWithdrawDetailsForUri", args) { 
result ->
+            if (myWithdrawRequestId != this.currentWithdrawRequestId) {
+                return@sendRequest
+            }
+            Log.v(TAG, "got getWithdrawDetailsForUri result")
             val status = withdrawStatus.value
             if (status !is WithdrawStatus.Loading) {
                 Log.v(TAG, "ignoring withdrawal info result, not loading.")
                 return@sendRequest
             }
-            val suggestedExchange = result.getString("suggestedExchange")
-            val amount = Amount.fromJson(result.getJSONObject("amount"))
-            withdrawStatus.postValue(
-                WithdrawStatus.ReceivedDetails(
-                    status.talerWithdrawUri,
-                    amount,
-                    suggestedExchange
+            val wi = result.getJSONObject("bankWithdrawDetails")
+            val suggestedExchange = wi.getString("suggestedExchange")
+            // We just use the suggested exchange, in the future there will be
+            // a selection dialog.
+            getWithdrawalInfoWithExchange(talerWithdrawUri, suggestedExchange)
+        }
+    }
+
+    private fun getWithdrawalInfoWithExchange(talerWithdrawUri: String, 
selectedExchange: String) {
+        val args = JSONObject()
+        args.put("talerWithdrawUri", talerWithdrawUri)
+        args.put("selectedExchange", selectedExchange)
+
+        this.currentWithdrawRequestId++
+        val myWithdrawRequestId = this.currentWithdrawRequestId
+
+        walletBackendApi.sendRequest("getWithdrawDetailsForUri", args) { 
result ->
+            if (myWithdrawRequestId != this.currentWithdrawRequestId) {
+                return@sendRequest
+            }
+            Log.v(TAG, "got getWithdrawDetailsForUri result (with exchange 
details)")
+            val status = withdrawStatus.value
+            if (status !is WithdrawStatus.Loading) {
+                Log.v(TAG, "ignoring withdrawal info result, not loading.")
+                return@sendRequest
+            }
+            val ei = result.getJSONObject("exchangeWithdrawDetails")
+            val termsOfServiceAccepted = 
ei.getBoolean("termsOfServiceAccepted")
+            if (!termsOfServiceAccepted) {
+                val exchange = ei.getJSONObject("exchangeInfo")
+                val tosText = exchange.getString("termsOfServiceText")
+                val tosEtag = exchange.getString("termsOfServiceLastEtag")
+                withdrawStatus.postValue(
+                    WithdrawStatus.TermsOfServiceReviewRequired(
+                        status.talerWithdrawUri,
+                        selectedExchange,
+                        tosText,
+                        tosEtag
+                    )
                 )
-            )
+            } else {
+                val wi = result.getJSONObject("bankWithdrawDetails")
+                val suggestedExchange = wi.getString("suggestedExchange")
+                val amount = Amount.fromJson(wi.getJSONObject("amount"))
+                withdrawStatus.postValue(
+                    WithdrawStatus.ReceivedDetails(
+                        status.talerWithdrawUri,
+                        amount,
+                        suggestedExchange
+                    )
+                )
+            }
         }
     }
 
@@ -343,4 +399,26 @@ class WalletViewModel(val app: Application) : 
AndroidViewModel(app) {
         walletBackendApi.destroy()
         super.onCleared()
     }
+
+    /**
+     * Accept the currently displayed terms of service.
+     */
+    fun acceptCurrentTermsOfService() {
+        when (val s = withdrawStatus.value) {
+            is WithdrawStatus.TermsOfServiceReviewRequired -> {
+                val args = JSONObject()
+                args.put("exchangeBaseUrl", s.exchangeBaseUrl)
+                args.put("etag", s.tosEtag)
+                walletBackendApi.sendRequest("acceptExchangeTermsOfService", 
args) {
+                    // Try withdrawing again with accepted ToS
+                    getWithdrawalInfo(s.talerWithdrawUri)
+                }
+            }
+        }
+    }
+
+    fun cancelCurrentWithdraw() {
+        currentWithdrawRequestId++
+        withdrawStatus.value = WithdrawStatus.None()
+    }
 }
diff --git a/app/src/main/java/net/taler/wallet/backend/WalletBackendService.kt 
b/app/src/main/java/net/taler/wallet/backend/WalletBackendService.kt
index 26420a1..b387c9c 100644
--- a/app/src/main/java/net/taler/wallet/backend/WalletBackendService.kt
+++ b/app/src/main/java/net/taler/wallet/backend/WalletBackendService.kt
@@ -63,7 +63,7 @@ class WalletBackendService : Service() {
         msg.put("operation", "init")
         val args = JSONObject()
         msg.put("args", args)
-        args.put("persistentStoragePath", 
"${application.filesDir}/talerwalletdb-v27.json")
+        args.put("persistentStoragePath", 
"${application.filesDir}/talerwalletdb-v29.json")
         akono.sendMessage(msg.toString())
     }
 
diff --git a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml 
b/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
deleted file mode 100644
index 6348baa..0000000
--- a/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
+++ /dev/null
@@ -1,34 +0,0 @@
-<vector xmlns:android="http://schemas.android.com/apk/res/android";
-        xmlns:aapt="http://schemas.android.com/aapt";
-        android:width="108dp"
-        android:height="108dp"
-        android:viewportHeight="108"
-        android:viewportWidth="108">
-    <path
-            android:fillType="evenOdd"
-            android:pathData="M32,64C32,64 38.39,52.99 44.13,50.95C51.37,48.37 
70.14,49.57 70.14,49.57L108.26,87.69L108,109.01L75.97,107.97L32,64Z"
-            android:strokeColor="#00000000"
-            android:strokeWidth="1">
-        <aapt:attr name="android:fillColor">
-            <gradient
-                    android:endX="78.5885"
-                    android:endY="90.9159"
-                    android:startX="48.7653"
-                    android:startY="61.0927"
-                    android:type="linear">
-                <item
-                        android:color="#44000000"
-                        android:offset="0.0"/>
-                <item
-                        android:color="#00000000"
-                        android:offset="1.0"/>
-            </gradient>
-        </aapt:attr>
-    </path>
-    <path
-            android:fillColor="#FFFFFF"
-            android:fillType="nonZero"
-            android:pathData="M66.94,46.02L66.94,46.02C72.44,50.07 76,56.61 
76,64L32,64C32,56.61 35.56,50.11 40.98,46.06L36.18,41.19C35.45,40.45 35.45,39.3 
36.18,38.56C36.91,37.81 38.05,37.81 38.78,38.56L44.25,44.05C47.18,42.57 
50.48,41.71 54,41.71C57.48,41.71 60.78,42.57 
63.68,44.05L69.11,38.56C69.84,37.81 70.98,37.81 71.71,38.56C72.44,39.3 
72.44,40.45 71.71,41.19L66.94,46.02ZM62.94,56.92C64.08,56.92 65,56.01 
65,54.88C65,53.76 64.08,52.85 62.94,52.85C61.8,52.85 60.88,53.76 60.88,54.88C6 
[...]
-            android:strokeColor="#00000000"
-            android:strokeWidth="1"/>
-</vector>
diff --git a/app/src/main/res/drawable/ic_launcher_background.xml 
b/app/src/main/res/drawable/ic_launcher_background.xml
deleted file mode 100644
index a0ad202..0000000
--- a/app/src/main/res/drawable/ic_launcher_background.xml
+++ /dev/null
@@ -1,74 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<vector
-        xmlns:android="http://schemas.android.com/apk/res/android";
-        android:height="108dp"
-        android:width="108dp"
-        android:viewportHeight="108"
-        android:viewportWidth="108">
-    <path android:fillColor="#008577"
-          android:pathData="M0,0h108v108h-108z"/>
-    <path android:fillColor="#00000000" android:pathData="M9,0L9,108"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M19,0L19,108"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M29,0L29,108"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M39,0L39,108"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M49,0L49,108"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M59,0L59,108"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M69,0L69,108"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M79,0L79,108"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M89,0L89,108"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M99,0L99,108"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M0,9L108,9"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M0,19L108,19"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M0,29L108,29"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M0,39L108,39"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M0,49L108,49"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M0,59L108,59"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M0,69L108,69"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M0,79L108,79"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M0,89L108,89"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M0,99L108,99"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M19,29L89,29"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M19,39L89,39"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M19,49L89,49"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M19,59L89,59"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M19,69L89,69"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M19,79L89,79"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M29,19L29,89"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M39,19L39,89"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M49,19L49,89"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M59,19L59,89"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M69,19L69,89"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-    <path android:fillColor="#00000000" android:pathData="M79,19L79,89"
-          android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
-</vector>
diff --git a/app/src/main/res/drawable/ic_launcher_foreground.xml 
b/app/src/main/res/drawable/ic_launcher_foreground.xml
new file mode 100644
index 0000000..4ab24a4
--- /dev/null
+++ b/app/src/main/res/drawable/ic_launcher_foreground.xml
@@ -0,0 +1,51 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android";
+    android:width="108dp"
+    android:height="108dp"
+    android:viewportWidth="237.28813"
+    android:viewportHeight="237.2881">
+  <group android:translateX="48.64407"
+      android:translateY="48.644062">
+    <path
+        
android:pathData="m31.669,82.748h-4.702v-19.684h-6.041v-4.112h16.783v4.112L31.669,63.064Z"
+        android:strokeWidth="0.81604069"
+        android:fillColor="#ffffff"
+        android:strokeColor="#00000000"
+        android:fillAlpha="1"/>
+    <path
+        android:pathData="m50.301,74.364q-2.614,0 -3.65,0.669 -1.036,0.669 
-1.036,2.295 0,1.211 0.717,1.929 0.717,0.717 1.944,0.717 1.849,0 2.869,-1.387 
1.02,-1.403 1.02,-3.905v-0.319zM56.804,72.563v10.185h-4.638v-1.992q-0.845,1.179 
-2.168,1.817 -1.323,0.638 -2.917,0.638 -3.044,0 -4.75,-1.61 -1.689,-1.61 
-1.689,-4.495 0,-3.124 2.024,-4.606 2.024,-1.498 
6.264,-1.498h3.235v-0.781q0,-1.132 -0.829,-1.705 -0.813,-0.59 -2.407,-0.59 
-1.674,0 -3.251,0.43 -1.562,0.414 -3.267,1.339v-3.985q1.546,-0 [...]
+        android:strokeWidth="0.81604069"
+        android:fillColor="#ffffff"
+        android:strokeColor="#00000000"
+        android:fillAlpha="1"/>
+    <path
+        
android:pathData="m64.964,75.305v-13.771h-4.734v-3.586h9.404v17.357q0,2.104 
0.653,2.98 0.653,0.877 2.215,0.877h3.73v3.586h-5.037q-3.331,0 -4.781,-1.721 
-1.45,-1.721 -1.45,-5.722z"
+        android:strokeWidth="0.81604069"
+        android:fillColor="#ffffff"
+        android:strokeColor="#00000000"
+        android:fillAlpha="1"/>
+    <path
+        android:pathData="m96.012,81.871q-1.626,0.669 -3.315,1.004 
-1.689,0.335 -3.57,0.335 -4.479,0 -6.853,-2.391 -2.359,-2.407 -2.359,-6.917 
0,-4.367 2.279,-6.901 2.279,-2.534 6.216,-2.534 3.969,0 6.152,2.359 2.199,2.343 
2.199,6.614v1.897h-12.097q0.016,2.104 1.243,3.14 1.227,1.036 3.666,1.036 1.61,0 
3.172,-0.462 1.562,-0.462 3.267,-1.466zM92.059,71.83q-0.032,-1.849 
-0.956,-2.789 -0.908,-0.956 -2.694,-0.956 -1.61,0 -2.566,0.988 -0.956,0.972 
-1.132,2.773z"
+        android:strokeWidth="0.81604069"
+        android:fillColor="#ffffff"
+        android:strokeColor="#00000000"
+        android:fillAlpha="1"/>
+    <path
+        android:pathData="m116.445,69.822q-0.765,-0.701 -1.801,-1.052 
-1.02,-0.351 -2.247,-0.351 -1.482,0 -2.598,0.526 -1.1,0.51 -1.705,1.498 
-0.383,0.606 -0.542,1.466 -0.143,0.861 
-0.143,2.614v8.224h-4.67v-17.851h4.67v2.773q0.685,-1.53 2.104,-2.359 
1.419,-0.845 3.315,-0.845 0.956,0 1.865,0.239 0.924,0.223 1.753,0.669z"
+        android:strokeWidth="0.81604069"
+        android:fillColor="#ffffff"
+        android:strokeColor="#00000000"
+        android:fillAlpha="1"/>
+    <path
+        android:pathData="M25.843,97.583L16.433,97.583L0,70.865 
16.433,44.111l9.409,0l-16.522,26.754z"
+        android:strokeWidth="2.03518677"
+        android:fillColor="#ae1010"
+        android:strokeColor="#00000000"
+        android:fillAlpha="1"/>
+    <path
+        android:pathData="m109.483,97.667 l17.087,-27.134 
-17.041,-27.171l9.712,0l17.041,27.171 -17.041,27.134z"
+        android:strokeWidth="2.08855891"
+        android:fillColor="#ae1010"
+        android:strokeColor="#00000000"
+        android:fillAlpha="1"/>
+  </group>
+</vector>
diff --git a/app/src/main/res/drawable/ic_logo_taler.xml 
b/app/src/main/res/drawable/ic_logo_taler.xml
new file mode 100644
index 0000000..2a6cb4f
--- /dev/null
+++ b/app/src/main/res/drawable/ic_logo_taler.xml
@@ -0,0 +1,48 @@
+<vector xmlns:android="http://schemas.android.com/apk/res/android";
+    android:width="14dp"
+    android:height="14dp"
+    android:viewportWidth="140"
+    android:viewportHeight="139.99998">
+  <path
+      
android:pathData="m31.669,82.748h-4.702v-19.684h-6.041v-4.112h16.783v4.112L31.669,63.064Z"
+      android:strokeWidth="0.81604069"
+      android:fillColor="#ffffff"
+      android:strokeColor="#00000000"
+      android:fillAlpha="1"/>
+  <path
+      android:pathData="m50.301,74.364q-2.614,0 -3.65,0.669 -1.036,0.669 
-1.036,2.295 0,1.211 0.717,1.929 0.717,0.717 1.944,0.717 1.849,0 2.869,-1.387 
1.02,-1.403 1.02,-3.905v-0.319zM56.804,72.563v10.185h-4.638v-1.992q-0.845,1.179 
-2.168,1.817 -1.323,0.638 -2.917,0.638 -3.044,0 -4.75,-1.61 -1.689,-1.61 
-1.689,-4.495 0,-3.124 2.024,-4.606 2.024,-1.498 
6.264,-1.498h3.235v-0.781q0,-1.132 -0.829,-1.705 -0.813,-0.59 -2.407,-0.59 
-1.674,0 -3.251,0.43 -1.562,0.414 -3.267,1.339v-3.985q1.546,-0.6 [...]
+      android:strokeWidth="0.81604069"
+      android:fillColor="#ffffff"
+      android:strokeColor="#00000000"
+      android:fillAlpha="1"/>
+  <path
+      
android:pathData="m64.964,75.305v-13.771h-4.734v-3.586h9.404v17.357q0,2.104 
0.653,2.98 0.653,0.877 2.215,0.877h3.73v3.586h-5.037q-3.331,0 -4.781,-1.721 
-1.45,-1.721 -1.45,-5.722z"
+      android:strokeWidth="0.81604069"
+      android:fillColor="#ffffff"
+      android:strokeColor="#00000000"
+      android:fillAlpha="1"/>
+  <path
+      android:pathData="m96.012,81.871q-1.626,0.669 -3.315,1.004 -1.689,0.335 
-3.57,0.335 -4.479,0 -6.853,-2.391 -2.359,-2.407 -2.359,-6.917 0,-4.367 
2.279,-6.901 2.279,-2.534 6.216,-2.534 3.969,0 6.152,2.359 2.199,2.343 
2.199,6.614v1.897h-12.097q0.016,2.104 1.243,3.14 1.227,1.036 3.666,1.036 1.61,0 
3.172,-0.462 1.562,-0.462 3.267,-1.466zM92.059,71.83q-0.032,-1.849 
-0.956,-2.789 -0.908,-0.956 -2.694,-0.956 -1.61,0 -2.566,0.988 -0.956,0.972 
-1.132,2.773z"
+      android:strokeWidth="0.81604069"
+      android:fillColor="#ffffff"
+      android:strokeColor="#00000000"
+      android:fillAlpha="1"/>
+  <path
+      android:pathData="m116.445,69.822q-0.765,-0.701 -1.801,-1.052 
-1.02,-0.351 -2.247,-0.351 -1.482,0 -2.598,0.526 -1.1,0.51 -1.705,1.498 
-0.383,0.606 -0.542,1.466 -0.143,0.861 
-0.143,2.614v8.224h-4.67v-17.851h4.67v2.773q0.685,-1.53 2.104,-2.359 
1.419,-0.845 3.315,-0.845 0.956,0 1.865,0.239 0.924,0.223 1.753,0.669z"
+      android:strokeWidth="0.81604069"
+      android:fillColor="#ffffff"
+      android:strokeColor="#00000000"
+      android:fillAlpha="1"/>
+  <path
+      android:pathData="M25.843,97.583L16.433,97.583L0,70.865 
16.433,44.111l9.409,0l-16.522,26.754z"
+      android:strokeWidth="2.03518677"
+      android:fillColor="#ae1010"
+      android:strokeColor="#00000000"
+      android:fillAlpha="1"/>
+  <path
+      android:pathData="m109.483,97.667 l17.087,-27.134 
-17.041,-27.171l9.712,0l17.041,27.171 -17.041,27.134z"
+      android:strokeWidth="2.08855891"
+      android:fillColor="#ae1010"
+      android:strokeColor="#00000000"
+      android:fillAlpha="1"/>
+</vector>
diff --git a/app/src/main/res/drawable/side_nav_bar.xml 
b/app/src/main/res/drawable/side_nav_bar.xml
index a33798b..ff85523 100644
--- a/app/src/main/res/drawable/side_nav_bar.xml
+++ b/app/src/main/res/drawable/side_nav_bar.xml
@@ -2,8 +2,7 @@
        android:shape="rectangle">
     <gradient
             android:angle="135"
-            android:centerColor="#009688"
-            android:endColor="#00695C"
-            android:startColor="#4DB6AC"
+            android:startColor="@color/colorPrimary"
+            android:endColor="@color/colorPrimaryDark"
             android:type="linear"/>
 </shape>
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_review_exchange_tos.xml 
b/app/src/main/res/layout/fragment_review_exchange_tos.xml
new file mode 100644
index 0000000..6db6587
--- /dev/null
+++ b/app/src/main/res/layout/fragment_review_exchange_tos.xml
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="utf-8"?>
+<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android";
+        xmlns:tools="http://schemas.android.com/tools";
+        android:layout_width="match_parent"
+        android:layout_height="match_parent"
+        android:layout_margin="15dp"
+        tools:context=".ReviewExchangeTOS">
+
+    <LinearLayout
+            android:layout_width="match_parent"
+            android:layout_height="match_parent"
+            android:orientation="vertical">
+
+        <ScrollView
+                android:layout_width="match_parent"
+                android:layout_height="0dp"
+                android:layout_weight="1"
+                android:scrollbars="vertical">
+            <TextView
+                    android:id="@+id/text_tos"
+                    android:layout_width="match_parent"
+                    android:layout_height="wrap_content"
+                    android:text="TextView" />
+        </ScrollView>
+
+        <CheckBox
+                android:id="@+id/checkBox_accept_tos"
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_weight="0"
+                android:text="Accept Terms of Service" />
+
+        <LinearLayout
+                android:layout_width="match_parent"
+                android:layout_height="wrap_content"
+                android:layout_weight="0"
+                android:orientation="horizontal">
+            <Button
+                    android:id="@+id/button_tos_abort"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="Cancel" />
+            <Space
+                    android:layout_width="0dp"
+                    android:layout_height="0dp"
+                    android:layout_weight="1"/>
+
+            <Button
+                    android:id="@+id/button_tos_accept"
+                    android:layout_width="wrap_content"
+                    android:layout_height="wrap_content"
+                    android:text="Continue" />
+        </LinearLayout>
+
+    </LinearLayout>
+</FrameLayout>
\ No newline at end of file
diff --git a/app/src/main/res/layout/fragment_settings.xml 
b/app/src/main/res/layout/fragment_settings.xml
index 73179cb..6534f3f 100644
--- a/app/src/main/res/layout/fragment_settings.xml
+++ b/app/src/main/res/layout/fragment_settings.xml
@@ -36,7 +36,7 @@
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_weight="1"
-                    android:text="0.6.0pre4 (Fri 6 Dec 2019)" />
+                    android:text="0.6.0pre4 (Mon 9 Dec 2019)" />
 
         </LinearLayout>
 
@@ -59,7 +59,7 @@
                     android:layout_width="wrap_content"
                     android:layout_height="wrap_content"
                     android:layout_weight="1"
-                    android:text="0.6.0pre4 (Fri 6 Dec 2019)" />
+                    android:text="0.6.0pre4 (Mon 9 Dec 2019)" />
 
         </LinearLayout>
 
diff --git a/app/src/main/res/layout/nav_header_main.xml 
b/app/src/main/res/layout/nav_header_main.xml
index 92ca611..8f4f926 100644
--- a/app/src/main/res/layout/nav_header_main.xml
+++ b/app/src/main/res/layout/nav_header_main.xml
@@ -14,12 +14,13 @@
         android:gravity="bottom">
 
     <ImageView
+            android:id="@+id/imageView"
             android:layout_width="wrap_content"
             android:layout_height="wrap_content"
-            android:paddingTop="@dimen/nav_header_vertical_spacing"
-            app:srcCompat="@mipmap/ic_launcher_round"
+            android:adjustViewBounds="false"
             android:contentDescription="@string/nav_header_desc"
-            android:id="@+id/imageView"/>
+            android:paddingTop="@dimen/nav_header_vertical_spacing"
+            app:srcCompat="@mipmap/ic_launcher_round" />
 
     <TextView
             android:layout_width="match_parent"
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml 
b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
index bbd3e02..7353dbd 100644
--- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android";>
-    <background android:drawable="@drawable/ic_launcher_background"/>
+    <background android:drawable="@color/ic_launcher_background"/>
     <foreground android:drawable="@drawable/ic_launcher_foreground"/>
 </adaptive-icon>
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml 
b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
index bbd3e02..7353dbd 100644
--- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android";>
-    <background android:drawable="@drawable/ic_launcher_background"/>
+    <background android:drawable="@color/ic_launcher_background"/>
     <foreground android:drawable="@drawable/ic_launcher_foreground"/>
 </adaptive-icon>
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.png 
b/app/src/main/res/mipmap-hdpi/ic_launcher.png
index 898f3ed..2bfb696 100644
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.png and 
b/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png 
b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png
index dffca36..c7ae940 100644
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.png and 
b/app/src/main/res/mipmap-hdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.png 
b/app/src/main/res/mipmap-mdpi/ic_launcher.png
index 64ba76f..c104056 100644
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.png and 
b/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png 
b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png
index dae5e08..1130914 100644
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.png and 
b/app/src/main/res/mipmap-mdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.png 
b/app/src/main/res/mipmap-xhdpi/ic_launcher.png
index e5ed465..7144a11 100644
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.png and 
b/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png 
b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png
index 14ed0af..d63ccd3 100644
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png and 
b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png 
b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
index b0907ca..bc3155e 100644
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and 
b/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png 
b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png
index d8ae031..028fe60 100644
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png and 
b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png 
b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
index 2c18de9..ccc81eb 100644
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and 
b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png 
b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png
index beed3cd..da3ce45 100644
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png and 
b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png differ
diff --git a/app/src/main/res/navigation/nav_graph.xml 
b/app/src/main/res/navigation/nav_graph.xml
index fac49f3..88d64f7 100644
--- a/app/src/main/res/navigation/nav_graph.xml
+++ b/app/src/main/res/navigation/nav_graph.xml
@@ -60,6 +60,10 @@
                 android:id="@+id/action_promptWithdraw_to_withdrawSuccessful"
                 app:destination="@id/withdrawSuccessful"
                 app:popUpTo="@id/showBalance" />
+        <action
+                android:id="@+id/action_promptWithdraw_to_reviewExchangeTOS"
+                app:destination="@id/reviewExchangeTOS"
+                app:popUpTo="@id/showBalance"/>
     </fragment>
     <fragment
             android:id="@+id/withdrawSuccessful"
@@ -69,4 +73,14 @@
     <action
             android:id="@+id/action_global_promptPayment"
             app:destination="@id/promptPayment" />
+    <fragment
+            android:id="@+id/reviewExchangeTOS"
+            android:name="net.taler.wallet.ReviewExchangeTOS"
+            android:label="Exchange's Terms of Service"
+            tools:layout="@layout/fragment_review_exchange_tos" >
+        <action
+                android:id="@+id/action_reviewExchangeTOS_to_promptWithdraw"
+                app:popUpTo="@id/showBalance"
+                app:destination="@id/promptWithdraw" />
+    </fragment>
 </navigation>
\ No newline at end of file
diff --git a/app/src/main/res/values/colors.xml 
b/app/src/main/res/values/colors.xml
index 69b2233..3b6dc88 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
-    <color name="colorPrimary">#008577</color>
-    <color name="colorPrimaryDark">#00574B</color>
-    <color name="colorAccent">#D81B60</color>
+    <color name="colorPrimary">#283593</color>
+    <color name="colorPrimaryDark">#1A237E</color>
+    <color name="colorAccent">#AE1010</color>
 </resources>
diff --git a/app/src/main/res/values/ic_launcher_background.xml 
b/app/src/main/res/values/ic_launcher_background.xml
new file mode 100644
index 0000000..beab31f
--- /dev/null
+++ b/app/src/main/res/values/ic_launcher_background.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <color name="ic_launcher_background">#000000</color>
+</resources>
\ No newline at end of file
diff --git a/app/src/main/res/values/strings.xml 
b/app/src/main/res/values/strings.xml
index 658dc62..b57aadf 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -14,8 +14,9 @@
     <string name="menu_share">Share</string>
     <string name="menu_send">Send</string>
 
-    <!-- TODO: Remove or change this placeholder text -->
-    <string name="hello_blank_fragment">Hello blank fragment</string>
     <string name="servicedesc">my service</string>
     <string name="aiddescription">my aid</string>
+
+    <!-- TODO: Remove or change this placeholder text -->
+    <string name="hello_blank_fragment">Hello blank fragment</string>
 </resources>
diff --git a/app/src/main/res/xml/apduservice.xml 
b/app/src/main/res/xml/apduservice.xml
index ac2aa32..4a48065 100644
--- a/app/src/main/res/xml/apduservice.xml
+++ b/app/src/main/res/xml/apduservice.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <host-apdu-service xmlns:android="http://schemas.android.com/apk/res/android";
         android:description="@string/servicedesc"
-        android:requireDeviceUnlock="false">
+        android:requireDeviceUnlock="true">
     <aid-group android:description="@string/aiddescription"
             android:category="other">
         <aid-filter android:name="F00054414C4552"/>

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]