Commit 52448d0
authored
Add native flags (#7047)
Task/Issue URL: https://app.asana.com/1/137249556945/project/72649045549333/task/1211755269770778?focus=true
### Description
### Steps to test this PR
_Feature 1_
- [ ] Apply [patch](https://duckduckgo-my.sharepoint.com/:u:/p/cbarreiro/EQzRDGHt8VVNicoRG-pU560BBVo07vUHvuprNNcneF9Qgg?e=SJ0f8h)
- [ ] Fresh install
- [ ] Filter logs by "Cris"
- [ ] Load http://privacy-test-pages.site/security/badware/malware-download.html and refresh page
- [ ] Check logs for
- [ ] `Blob downloads listener received WebViewCompat message: webViewCompat Ping:http://privacy-test-pages.site/security/badware/malware-download.html 10ms`. Validates `jsSendsInitialPing` and `jsInitialPingDelay`
- [ ] `delaying response by 10 ms`. Validates `initialPingDelay`
- [ ] `Posting response Pong from Native`. Validates `replyToInitialPing`
- [ ] `Sending message PageStarted using reply proxy`. Validates `sendMessageOnPageStarted` and `sendMessagesUsingReplyProxy`
- [ ] `Blob downloads listener received WebViewCompat message: webViewCompat PageStarted from ddgBlobDownloadObj`. Validates `useBlobDownloadsMessageListener` and `jsRepliesToNativeMessages`
- [ ] Open context menu
- [ ] Check logs for
- [ ] `Sending message ContextMenuOpened using reply proxy`. Validates `sendMessageOnContextMenuOpen`
- [ ] `Blob downloads listener received WebViewCompat message: webViewCompat ContextMenuOpened from ddgBlobDownloadObj`. Validates `useBlobDownloadsMessageListener` and `jsRepliesToNativeMessages`
- [ ] Test blob downloads still work
_Feature 2_
- [ ] Apply [patch
](https://duckduckgo-my.sharepoint.com/:u:/p/cbarreiro/EeK6GQN0aK9Fola1TnxLnnABPCzKOQpmcEN5jd5JUNSDuQ?e=xdS2SB)
- [ ] Fresh install
- [ ] Filter logs by "Cris"
- [ ] Load http://privacy-test-pages.site/security/badware/malware-download.html and refresh page
- [ ] Check logs for
- [ ] `webViewCompat message received: webViewCompat Ping:http://privacy-test-pages.site/security/badware/malware-download.html 10ms`. Validates `initialPingDelay` 10ms, `jsSendsInitialPing` enabled, and `useBlobDownloadsMessageListener` disabled
- [ ] No log for `delaying response by 10 ms` nor `Posting response Pong from Native`. Validates `replyToInitialPing` disabled
- [ ] No log for `Sending message PageStarted...`. Validates `sendMessageOnPageStarted` disabled
- [ ] Open context menu
- [ ] Check no logs for `Sending message ContextMenuOpened...`. Validates `sendMessageOnContextMenuOpen` disabled
_Feature 3_
- [ ] Apply [patch](https://duckduckgo-my.sharepoint.com/:u:/p/cbarreiro/EZsVUIl3CNVFkgn4cJYwuLQBdrNHa8ONEHu_264GHUYoVg?e=ZMA438)
- [ ] Fresh install
- [ ] Filter logs by "Cris"
- [ ] Load http://privacy-test-pages.site/security/badware/malware-download.html and refresh page
- [ ] Check logs for
- [ ] `webViewCompat message received: webViewCompat Ping:http://privacy-test-pages.site/security/badware/malware-download.html 10ms`. Validates `initialPingDelay` 10ms, `jsSendsInitialPing` enabled, and `useBlobDownloadsMessageListener` disabled
- [ ] No log for `delaying response by 10 ms` nor `Posting response Pong from Native`. Validates `replyToInitialPing` disabled
- [ ] No log for `Sending message PageStarted...`. Validates `sendMessageOnPageStarted` disabled
- [ ] Open context menu
- [ ] Check logs for `Sending message ContextMenuOpened not using reply proxy`. Validates `sendMessageOnContextMenuOpen` enabled and `sendMessagesUsingReplyProxy` disabled
### UI changes
| Before | After |
| ------ | ----- |
!(Upload before screenshot)|(Upload after screenshot)|1 parent 0770edf commit 52448d0
File tree
6 files changed
+289
-37
lines changed- app/src/main
- java/com/duckduckgo/app/browser
- commands
- webview
- res/raw
6 files changed
+289
-37
lines changedLines changed: 30 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1260 | 1260 | | |
1261 | 1261 | | |
1262 | 1262 | | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
1263 | 1273 | | |
1264 | 1274 | | |
1265 | 1275 | | |
| |||
2344 | 2354 | | |
2345 | 2355 | | |
2346 | 2356 | | |
| 2357 | + | |
2347 | 2358 | | |
2348 | 2359 | | |
2349 | 2360 | | |
| |||
3254 | 3265 | | |
3255 | 3266 | | |
3256 | 3267 | | |
3257 | | - | |
| 3268 | + | |
| 3269 | + | |
| 3270 | + | |
| 3271 | + | |
3258 | 3272 | | |
3259 | 3273 | | |
3260 | 3274 | | |
| |||
3382 | 3396 | | |
3383 | 3397 | | |
3384 | 3398 | | |
3385 | | - | |
| 3399 | + | |
| 3400 | + | |
| 3401 | + | |
| 3402 | + | |
| 3403 | + | |
| 3404 | + | |
| 3405 | + | |
3386 | 3406 | | |
3387 | 3407 | | |
3388 | 3408 | | |
| |||
3407 | 3427 | | |
3408 | 3428 | | |
3409 | 3429 | | |
| 3430 | + | |
| 3431 | + | |
| 3432 | + | |
| 3433 | + | |
| 3434 | + | |
| 3435 | + | |
| 3436 | + | |
| 3437 | + | |
3410 | 3438 | | |
3411 | 3439 | | |
3412 | 3440 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1972 | 1972 | | |
1973 | 1973 | | |
1974 | 1974 | | |
| 1975 | + | |
| 1976 | + | |
1975 | 1977 | | |
1976 | 1978 | | |
1977 | 1979 | | |
| |||
Lines changed: 210 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
19 | 26 | | |
20 | 27 | | |
21 | 28 | | |
| |||
24 | 31 | | |
25 | 32 | | |
26 | 33 | | |
| 34 | + | |
| 35 | + | |
27 | 36 | | |
28 | 37 | | |
29 | 38 | | |
30 | 39 | | |
31 | 40 | | |
32 | 41 | | |
| 42 | + | |
33 | 43 | | |
34 | 44 | | |
35 | | - | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
36 | 58 | | |
37 | 59 | | |
38 | 60 | | |
| |||
44 | 66 | | |
45 | 67 | | |
46 | 68 | | |
| 69 | + | |
| 70 | + | |
47 | 71 | | |
48 | 72 | | |
49 | | - | |
50 | | - | |
51 | | - | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
52 | 85 | | |
53 | | - | |
54 | | - | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
55 | 103 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
60 | 120 | | |
61 | 121 | | |
62 | 122 | | |
63 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
64 | 159 | | |
65 | 160 | | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
66 | 266 | | |
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
| 505 | + | |
505 | 506 | | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
38 | 53 | | |
39 | 54 | | |
40 | 55 | | |
41 | 56 | | |
| 57 | + | |
42 | 58 | | |
0 commit comments