Skip to content

Commit 7c1d458

Browse files
committed
Merge branch 'release/5.9.0'
2 parents 7af7c91 + fe2db92 commit 7c1d458

File tree

71 files changed

+1484
-648
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1484
-648
lines changed

.gitmodules

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
[submodule "app/libs/OnionKit"]
2-
path = app/libs/OnionKit
3-
url = https://github.com/guardianproject/NetCipher.git
1+
[submodule "app/src/main/cpp/third-party/bloom_cpp"]
2+
path = app/src/main/cpp/third-party/bloom_cpp
3+
url = https://github.com/duckduckgo/bloom_cpp.git

app/CMakeLists.txt

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,23 @@ add_library( # Sets the name of the library.
1818

1919
# Provides a relative path to your source file(s).
2020
src/main/cpp/adblockclient-lib.cpp
21-
src/main/cpp/ad-block/ad_block_client.cc
22-
src/main/cpp/ad-block/cosmetic_filter.cc
23-
src/main/cpp/ad-block/filter.cc
24-
src/main/cpp/bloom-filter-cpp/BloomFilter.cpp
25-
src/main/cpp/bloom-filter-cpp/hashFn.cpp
26-
src/main/cpp/hashset-cpp/HashSet.cpp
21+
src/main/cpp/third-party/ad-block/ad_block_client.cc
22+
src/main/cpp/third-party/ad-block/cosmetic_filter.cc
23+
src/main/cpp/third-party/ad-block/filter.cc
24+
src/main/cpp/third-party/bloom-filter-cpp/BloomFilter.cpp
25+
src/main/cpp/third-party/bloom-filter-cpp/hashFn.cpp
26+
src/main/cpp/third-party/hashset-cpp/HashSet.cpp
27+
)
28+
29+
add_library( # Sets the name of the library.
30+
https-bloom-lib
31+
32+
# Sets the library as a shared library.
33+
SHARED
34+
35+
# Provides a relative path to your source file(s).
36+
src/main/cpp/https-bloom-lib.cpp
37+
src/main/cpp/third-party/bloom_cpp/src/BloomFilter.cpp
2738
)
2839

2940
# Searches for a specified prebuilt library and stores the path as a

app/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ apply plugin: 'kotlin-kapt'
66
apply from: '../versioning.gradle'
77

88
ext {
9-
VERSION_NAME = "5.8.0"
9+
VERSION_NAME = "5.9.0"
1010
USE_ORCHESTRATOR = project.hasProperty('orchestrator') ? project.property('orchestrator') : false
1111
}
1212

@@ -78,7 +78,7 @@ android {
7878

7979
ext {
8080
supportLibrary = "27.1.1"
81-
architectureComponents = "1.1.0"
81+
architectureComponents = "1.1.1"
8282
architectureComponentsExtensions = "1.1.1"
8383
androidKtx = "0.3"
8484
dagger = "2.14.1"
Lines changed: 302 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,302 @@
1+
{
2+
"formatVersion": 1,
3+
"database": {
4+
"version": 4,
5+
"identityHash": "a80686f1ea7760530a37dec6214a19f4",
6+
"entities": [
7+
{
8+
"tableName": "disconnect_tracker",
9+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`url` TEXT NOT NULL, `category` TEXT NOT NULL, `networkName` TEXT NOT NULL, `networkUrl` TEXT NOT NULL, PRIMARY KEY(`url`))",
10+
"fields": [
11+
{
12+
"fieldPath": "url",
13+
"columnName": "url",
14+
"affinity": "TEXT",
15+
"notNull": true
16+
},
17+
{
18+
"fieldPath": "category",
19+
"columnName": "category",
20+
"affinity": "TEXT",
21+
"notNull": true
22+
},
23+
{
24+
"fieldPath": "networkName",
25+
"columnName": "networkName",
26+
"affinity": "TEXT",
27+
"notNull": true
28+
},
29+
{
30+
"fieldPath": "networkUrl",
31+
"columnName": "networkUrl",
32+
"affinity": "TEXT",
33+
"notNull": true
34+
}
35+
],
36+
"primaryKey": {
37+
"columnNames": [
38+
"url"
39+
],
40+
"autoGenerate": false
41+
},
42+
"indices": [],
43+
"foreignKeys": []
44+
},
45+
{
46+
"tableName": "https_bloom_filter_spec",
47+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `errorRate` REAL NOT NULL, `totalEntries` INTEGER NOT NULL, `sha256` TEXT NOT NULL, PRIMARY KEY(`id`))",
48+
"fields": [
49+
{
50+
"fieldPath": "id",
51+
"columnName": "id",
52+
"affinity": "INTEGER",
53+
"notNull": true
54+
},
55+
{
56+
"fieldPath": "errorRate",
57+
"columnName": "errorRate",
58+
"affinity": "REAL",
59+
"notNull": true
60+
},
61+
{
62+
"fieldPath": "totalEntries",
63+
"columnName": "totalEntries",
64+
"affinity": "INTEGER",
65+
"notNull": true
66+
},
67+
{
68+
"fieldPath": "sha256",
69+
"columnName": "sha256",
70+
"affinity": "TEXT",
71+
"notNull": true
72+
}
73+
],
74+
"primaryKey": {
75+
"columnNames": [
76+
"id"
77+
],
78+
"autoGenerate": false
79+
},
80+
"indices": [],
81+
"foreignKeys": []
82+
},
83+
{
84+
"tableName": "https_whitelisted_domain",
85+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`domain` TEXT NOT NULL, PRIMARY KEY(`domain`))",
86+
"fields": [
87+
{
88+
"fieldPath": "domain",
89+
"columnName": "domain",
90+
"affinity": "TEXT",
91+
"notNull": true
92+
}
93+
],
94+
"primaryKey": {
95+
"columnNames": [
96+
"domain"
97+
],
98+
"autoGenerate": false
99+
},
100+
"indices": [],
101+
"foreignKeys": []
102+
},
103+
{
104+
"tableName": "network_leaderboard",
105+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`networkName` TEXT NOT NULL, `domainVisited` TEXT NOT NULL, PRIMARY KEY(`networkName`, `domainVisited`))",
106+
"fields": [
107+
{
108+
"fieldPath": "networkName",
109+
"columnName": "networkName",
110+
"affinity": "TEXT",
111+
"notNull": true
112+
},
113+
{
114+
"fieldPath": "domainVisited",
115+
"columnName": "domainVisited",
116+
"affinity": "TEXT",
117+
"notNull": true
118+
}
119+
],
120+
"primaryKey": {
121+
"columnNames": [
122+
"networkName",
123+
"domainVisited"
124+
],
125+
"autoGenerate": false
126+
},
127+
"indices": [],
128+
"foreignKeys": []
129+
},
130+
{
131+
"tableName": "site_visited",
132+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`domain` TEXT NOT NULL, PRIMARY KEY(`domain`))",
133+
"fields": [
134+
{
135+
"fieldPath": "domain",
136+
"columnName": "domain",
137+
"affinity": "TEXT",
138+
"notNull": true
139+
}
140+
],
141+
"primaryKey": {
142+
"columnNames": [
143+
"domain"
144+
],
145+
"autoGenerate": false
146+
},
147+
"indices": [],
148+
"foreignKeys": []
149+
},
150+
{
151+
"tableName": "app_configuration",
152+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`key` TEXT NOT NULL, `appConfigurationDownloaded` INTEGER NOT NULL, PRIMARY KEY(`key`))",
153+
"fields": [
154+
{
155+
"fieldPath": "key",
156+
"columnName": "key",
157+
"affinity": "TEXT",
158+
"notNull": true
159+
},
160+
{
161+
"fieldPath": "appConfigurationDownloaded",
162+
"columnName": "appConfigurationDownloaded",
163+
"affinity": "INTEGER",
164+
"notNull": true
165+
}
166+
],
167+
"primaryKey": {
168+
"columnNames": [
169+
"key"
170+
],
171+
"autoGenerate": false
172+
},
173+
"indices": [],
174+
"foreignKeys": []
175+
},
176+
{
177+
"tableName": "tabs",
178+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`tabId` TEXT NOT NULL, `url` TEXT, `title` TEXT, PRIMARY KEY(`tabId`))",
179+
"fields": [
180+
{
181+
"fieldPath": "tabId",
182+
"columnName": "tabId",
183+
"affinity": "TEXT",
184+
"notNull": true
185+
},
186+
{
187+
"fieldPath": "url",
188+
"columnName": "url",
189+
"affinity": "TEXT",
190+
"notNull": false
191+
},
192+
{
193+
"fieldPath": "title",
194+
"columnName": "title",
195+
"affinity": "TEXT",
196+
"notNull": false
197+
}
198+
],
199+
"primaryKey": {
200+
"columnNames": [
201+
"tabId"
202+
],
203+
"autoGenerate": false
204+
},
205+
"indices": [
206+
{
207+
"name": "index_tabs_tabId",
208+
"unique": false,
209+
"columnNames": [
210+
"tabId"
211+
],
212+
"createSql": "CREATE INDEX `index_tabs_tabId` ON `${TABLE_NAME}` (`tabId`)"
213+
}
214+
],
215+
"foreignKeys": []
216+
},
217+
{
218+
"tableName": "tab_selection",
219+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER NOT NULL, `tabId` TEXT, PRIMARY KEY(`id`), FOREIGN KEY(`tabId`) REFERENCES `tabs`(`tabId`) ON UPDATE NO ACTION ON DELETE SET NULL )",
220+
"fields": [
221+
{
222+
"fieldPath": "id",
223+
"columnName": "id",
224+
"affinity": "INTEGER",
225+
"notNull": true
226+
},
227+
{
228+
"fieldPath": "tabId",
229+
"columnName": "tabId",
230+
"affinity": "TEXT",
231+
"notNull": false
232+
}
233+
],
234+
"primaryKey": {
235+
"columnNames": [
236+
"id"
237+
],
238+
"autoGenerate": false
239+
},
240+
"indices": [
241+
{
242+
"name": "index_tab_selection_tabId",
243+
"unique": false,
244+
"columnNames": [
245+
"tabId"
246+
],
247+
"createSql": "CREATE INDEX `index_tab_selection_tabId` ON `${TABLE_NAME}` (`tabId`)"
248+
}
249+
],
250+
"foreignKeys": [
251+
{
252+
"table": "tabs",
253+
"onDelete": "SET NULL",
254+
"onUpdate": "NO ACTION",
255+
"columns": [
256+
"tabId"
257+
],
258+
"referencedColumns": [
259+
"tabId"
260+
]
261+
}
262+
]
263+
},
264+
{
265+
"tableName": "bookmarks",
266+
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `title` TEXT, `url` TEXT NOT NULL)",
267+
"fields": [
268+
{
269+
"fieldPath": "id",
270+
"columnName": "id",
271+
"affinity": "INTEGER",
272+
"notNull": true
273+
},
274+
{
275+
"fieldPath": "title",
276+
"columnName": "title",
277+
"affinity": "TEXT",
278+
"notNull": false
279+
},
280+
{
281+
"fieldPath": "url",
282+
"columnName": "url",
283+
"affinity": "TEXT",
284+
"notNull": true
285+
}
286+
],
287+
"primaryKey": {
288+
"columnNames": [
289+
"id"
290+
],
291+
"autoGenerate": true
292+
},
293+
"indices": [],
294+
"foreignKeys": []
295+
}
296+
],
297+
"setupQueries": [
298+
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
299+
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, \"a80686f1ea7760530a37dec6214a19f4\")"
300+
]
301+
}
302+
}

app/src/androidTest/java/com/duckduckgo/app/FileUtilities.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,8 @@ object FileUtilities {
2121
fun loadText(resourceName: String): String =
2222
javaClass.classLoader.getResource(resourceName).openStream().bufferedReader().use { it.readText() }
2323

24+
25+
fun loadLines(resourceName: String): List<String> =
26+
javaClass.classLoader.getResource(resourceName).openStream().bufferedReader().use { it.readLines() }
27+
2428
}

0 commit comments

Comments
 (0)