Update permission check logic
Godwin Asuquo committed
Jan 18, 2023 at 09:01 UTC
1b92a868429ce4c5e148b5de2583e13892413310
9 files changed
+86
-30
android/.project
+11
@@ -14,4 +14,15 @@
14
<natures>
15
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
16
</natures>
17
+ <filteredResources>
18
+ <filter>
19
+ <id>1673893500381</id>
20
+ <name></name>
21
+ <type>30</type>
22
+ <matcher>
23
+ <id>org.eclipse.core.resources.regexFilterMatcher</id>
24
+ <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
25
+ </matcher>
26
+ </filter>
27
+ </filteredResources>
28
</projectDescription>
android/.settings/org.eclipse.buildship.core.prefs
+12
-1
@@ -1,2 +1,13 @@
1
+arguments=--init-script /var/folders/_g/6xnbffg10l741qh63jr5cds80000gp/T/d146c9752a26f79b52047fb6dc6ed385d064e120494f96f08ca63a317c41f94c.gradle --init-script /var/folders/_g/6xnbffg10l741qh63jr5cds80000gp/T/52cde0cfcf3e28b8b7510e992210d9614505e0911af0c190bd590d7158574963.gradle
2
+auto.sync=false
3
+build.scans.enabled=false
4
+connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
5
connection.project.dir=
2
-eclipse.preferences.version=1
\ No newline at end of file
6
+eclipse.preferences.version=1
7
+gradle.user.home=
8
+java.home=/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home
9
+jvm.arguments=
10
+offline.mode=false
11
+override.workspace.settings=true
12
+show.console.view=true
13
+show.executions.view=true
android/app/.classpath
+1
-1
@@ -1,6 +1,6 @@
1
<?xml version="1.0" encoding="UTF-8"?>
2
<classpath>
3
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
3
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
4
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
5
<classpathentry kind="output" path="bin/default"/>
6
</classpath>
android/app/.project
+11
@@ -20,4 +20,15 @@
20
<nature>org.eclipse.jdt.core.javanature</nature>
21
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
22
</natures>
23
+ <filteredResources>
24
+ <filter>
25
+ <id>1673884227808</id>
26
+ <name></name>
27
+ <type>30</type>
28
+ <matcher>
29
+ <id>org.eclipse.core.resources.regexFilterMatcher</id>
30
+ <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
31
+ </matcher>
32
+ </filter>
33
+ </filteredResources>
34
</projectDescription>
cw_monero/android/.classpath
+1
-1
@@ -1,6 +1,6 @@
1
<?xml version="1.0" encoding="UTF-8"?>
2
<classpath>
3
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11/"/>
3
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
4
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
5
<classpathentry kind="output" path="bin/default"/>
6
</classpath>
cw_monero/android/.project
+11
@@ -20,4 +20,15 @@
20
<nature>org.eclipse.jdt.core.javanature</nature>
21
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
22
</natures>
23
+ <filteredResources>
24
+ <filter>
25
+ <id>1673884227818</id>
26
+ <name></name>
27
+ <type>30</type>
28
+ <matcher>
29
+ <id>org.eclipse.core.resources.regexFilterMatcher</id>
30
+ <arguments>node_modules|\.git|__CREATED_BY_JAVA_LANGUAGE_SERVER__</arguments>
31
+ </matcher>
32
+ </filter>
33
+ </filteredResources>
34
</projectDescription>
ios/Podfile
+1
-1
@@ -1,5 +1,5 @@
1
# Uncomment this line to define a global platform for your project
2
-platform :ios, '11.0'
2
+platform :ios, '13.0'
3
source 'https://github.com/CocoaPods/Specs.git'
4
5
# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ios/Podfile.lock
+31
-17
@@ -7,7 +7,7 @@ PODS:
7
- connectivity (0.0.1):
8
- Flutter
9
- Reachability
10
- - CryptoSwift (1.3.2)
10
+ - CryptoSwift (1.6.0)
11
- cw_haven (0.0.1):
12
- cw_haven/Boost (= 0.0.1)
13
- cw_haven/Haven (= 0.0.1)
@@ -67,14 +67,14 @@ PODS:
67
- Flutter
68
- devicelocale (0.0.1):
69
- Flutter
70
- - DKImagePickerController/Core (4.3.2):
70
+ - DKImagePickerController/Core (4.3.4):
71
- DKImagePickerController/ImageDataManager
72
- DKImagePickerController/Resource
73
- - DKImagePickerController/ImageDataManager (4.3.2)
74
- - DKImagePickerController/PhotoGallery (4.3.2):
73
+ - DKImagePickerController/ImageDataManager (4.3.4)
74
+ - DKImagePickerController/PhotoGallery (4.3.4):
75
- DKImagePickerController/Core
76
- DKPhotoGallery
77
- - DKImagePickerController/Resource (4.3.2)
77
+ - DKImagePickerController/Resource (4.3.4)
78
- DKPhotoGallery (0.0.17):
79
- DKPhotoGallery/Core (= 0.0.17)
80
- DKPhotoGallery/Model (= 0.0.17)
@@ -102,11 +102,19 @@ PODS:
102
- DKImagePickerController/PhotoGallery
103
- Flutter
104
- Flutter (1.0.0)
105
+ - flutter_inappwebview (0.0.1):
106
+ - Flutter
107
+ - flutter_inappwebview/Core (= 0.0.1)
108
+ - OrderedSet (~> 5.0)
109
+ - flutter_inappwebview/Core (0.0.1):
110
+ - Flutter
111
+ - OrderedSet (~> 5.0)
112
- flutter_secure_storage (3.3.1):
113
- Flutter
114
- local_auth_ios (0.0.1):
115
- Flutter
116
- MTBBarcodeScanner (5.0.11)
117
+ - OrderedSet (5.0.0)
118
- package_info (0.0.1):
119
- Flutter
120
- path_provider_ios (0.0.1):
@@ -116,15 +124,15 @@ PODS:
124
- platform_device_id (0.0.1):
125
- Flutter
126
- Reachability (3.2)
119
- - SDWebImage (5.9.1):
120
- - SDWebImage/Core (= 5.9.1)
121
- - SDWebImage/Core (5.9.1)
127
+ - SDWebImage (5.14.2):
128
+ - SDWebImage/Core (= 5.14.2)
129
+ - SDWebImage/Core (5.14.2)
130
- share_plus (0.0.1):
131
- Flutter
132
- shared_preferences_ios (0.0.1):
133
- Flutter
126
- - SwiftProtobuf (1.18.0)
127
- - SwiftyGif (5.3.0)
134
+ - SwiftProtobuf (1.20.3)
135
+ - SwiftyGif (5.4.3)
136
- uni_links (0.0.1):
137
- Flutter
138
- UnstoppableDomainsResolution (4.0.0):
@@ -147,6 +155,7 @@ DEPENDENCIES:
155
- devicelocale (from `.symlinks/plugins/devicelocale/ios`)
156
- file_picker (from `.symlinks/plugins/file_picker/ios`)
157
- Flutter (from `Flutter`)
158
+ - flutter_inappwebview (from `.symlinks/plugins/flutter_inappwebview/ios`)
159
- flutter_secure_storage (from `.symlinks/plugins/flutter_secure_storage/ios`)
160
- local_auth_ios (from `.symlinks/plugins/local_auth_ios/ios`)
161
- package_info (from `.symlinks/plugins/package_info/ios`)
@@ -167,6 +176,7 @@ SPEC REPOS:
176
- DKImagePickerController
177
- DKPhotoGallery
178
- MTBBarcodeScanner
179
+ - OrderedSet
180
- Reachability
181
- SDWebImage
182
- SwiftProtobuf
@@ -194,6 +204,8 @@ EXTERNAL SOURCES:
204
:path: ".symlinks/plugins/file_picker/ios"
205
Flutter:
206
:path: Flutter
207
+ flutter_inappwebview:
208
+ :path: ".symlinks/plugins/flutter_inappwebview/ios"
209
flutter_secure_storage:
210
:path: ".symlinks/plugins/flutter_secure_storage/ios"
211
local_auth_ios:
@@ -221,35 +233,37 @@ SPEC CHECKSUMS:
233
barcode_scan2: 0af2bb63c81b4565aab6cd78278e4c0fa136dbb0
234
BigInt: f668a80089607f521586bbe29513d708491ef2f7
235
connectivity: c4130b2985d4ef6fd26f9702e886bd5260681467
224
- CryptoSwift: 093499be1a94b0cae36e6c26b70870668cb56060
236
+ CryptoSwift: 562f8eceb40e80796fffc668b0cad9313284cfa6
237
cw_haven: b3e54e1fbe7b8e6fda57a93206bc38f8e89b898a
238
cw_monero: 4cf3b96f2da8e95e2ef7d6703dd4d2c509127b7d
239
cw_shared_external: 2972d872b8917603478117c9957dfca611845a92
240
device_display_brightness: 1510e72c567a1f6ce6ffe393dcd9afd1426034f7
241
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175
242
devicelocale: b22617f40038496deffba44747101255cee005b0
231
- DKImagePickerController: b5eb7f7a388e4643264105d648d01f727110fc3d
243
+ DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
244
DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179
245
file_picker: 817ab1d8cd2da9d2da412a417162deee3500fc95
246
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
247
+ flutter_inappwebview: bfd58618f49dc62f2676de690fc6dcda1d6c3721
248
flutter_secure_storage: 7953c38a04c3fdbb00571bcd87d8e3b5ceb9daec
249
local_auth_ios: 0d333dde7780f669e66f19d2ff6005f3ea84008d
250
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
251
+ OrderedSet: aaeb196f7fef5a9edf55d89760da9176ad40b93c
252
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
253
path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02
254
permission_handler_apple: 44366e37eaf29454a1e7b1b7d736c2cceaeb17ce
255
platform_device_id: 81b3e2993881f87d0c82ef151dc274df4869aef5
256
Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96
243
- SDWebImage: a990c053fff71e388a10f3357edb0be17929c9c5
257
+ SDWebImage: b9a731e1d6307f44ca703b3976d18c24ca561e84
258
share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68
259
shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad
246
- SwiftProtobuf: c3c12645230d9b09c72267e0de89468c5543bd86
247
- SwiftyGif: e466e86c660d343357ab944a819a101c4127cb40
260
+ SwiftProtobuf: b02b5075dcf60c9f5f403000b3b0c202a11b6ae1
261
+ SwiftyGif: 6c3eafd0ce693cad58bb63d2b2fb9bacb8552780
262
uni_links: d97da20c7701486ba192624d99bffaaffcfc298a
263
UnstoppableDomainsResolution: c3c67f4d0a5e2437cb00d4bd50c2e00d6e743841
264
url_launcher_ios: 839c58cdb4279282219f5e248c3321761ff3c4de
265
webview_flutter_wkwebview: b7e70ef1ddded7e69c796c7390ee74180182971f
266
253
-PODFILE CHECKSUM: ae71bdf0eb731a1ffc399c122f6aa4dea0cb5f6f
267
+PODFILE CHECKSUM: bf84c4e13798f92b867c8ebcbd04acc127fec6be
268
255
-COCOAPODS: 1.11.3
269
+COCOAPODS: 1.11.2
lib/src/screens/buy/onramper_page.dart
+7
-9
@@ -70,21 +70,19 @@ class OnRamperPageBodyState extends State<OnRamperPageBody> {
70
crossPlatform: InAppWebViewOptions(transparentBackground: true),
71
),
72
initialUrlRequest: URLRequest(
73
- url: Uri.tryParse(
74
- widget.uri.toString(),
75
- ),
73
+ url: widget.uri,
74
),
75
androidOnPermissionRequest: (_, __, resources) async {
78
- bool permissionNotGranted = await Permission.camera.status != PermissionStatus.granted;
79
- if (permissionNotGranted) {
80
- permissionNotGranted = await Permission.camera.request().isGranted;
76
+ bool permissionGranted = await Permission.camera.status == PermissionStatus.granted;
77
+ if (!permissionGranted) {
78
+ permissionGranted = await Permission.camera.request().isGranted;
79
}
80
81
return PermissionRequestResponse(
82
resources: resources,
85
- action: permissionNotGranted
86
- ? PermissionRequestResponseAction.DENY
87
- : PermissionRequestResponseAction.GRANT,
83
+ action: permissionGranted
84
+ ? PermissionRequestResponseAction.GRANT
85
+ : PermissionRequestResponseAction.DENY,
86
);
87
},
88
);