Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NMS] Run v2 Support #728

Merged
merged 82 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
36cc6f8
Initial protorype for DW Media Probe
aanorbel Dec 12, 2022
bd06bc6
added sample logo
aanorbel Dec 13, 2022
87191eb
Merge branch 'master' of github.com:ooni/probe-android into dw-media-…
aanorbel Dec 14, 2022
2c1887b
updated with actual project information
aanorbel Dec 20, 2022
2097475
Merge branch 'master' of github.com:ooni/probe-android into dw-media-…
aanorbel Dec 21, 2022
0b17422
modified preferences
aanorbel Dec 21, 2022
383a55f
modified default preferrences
aanorbel Dec 26, 2022
9dfe80d
updated logo scaling for info page
aanorbel Jan 11, 2023
28885eb
Merge branch 'master' of github.com:ooni/probe-android into dw-media-…
aanorbel Feb 20, 2023
39b485f
updated version system
aanorbel Feb 20, 2023
50bc494
updated enabled categories
aanorbel Feb 23, 2023
013c5fd
Merge branch 'master' of github.com:ooni/probe-android into dw-media-…
aanorbel Feb 24, 2023
f02efb7
changed provider authorities
aanorbel Feb 28, 2023
4da10f3
Merge branch 'master' of github.com:ooni/probe-android into dw-media-…
aanorbel Mar 20, 2023
d49ed61
Merge branch 'master' of github.com:ooni/probe-android into dw-media-…
aanorbel Mar 30, 2023
1d14339
fix: webconectivity progress error and updated default database for d…
aanorbel Apr 3, 2023
f8fe1c5
Merge branch 'master' of github.com:ooni/probe-android into dw-media-…
aanorbel Jun 29, 2023
47175e5
Merge branch 'master' of github.com:ooni/probe-android into dw-media-…
aanorbel Jul 28, 2023
50b4fa6
changed overides based on new properties in app
aanorbel Jul 28, 2023
dfc2753
Updated logo
aanorbel Aug 1, 2023
f006382
Merge branch 'issue/1989-update' of github.com:ooni/probe-android int…
aanorbel Aug 1, 2023
6b7b0a9
updated preference intents
aanorbel Aug 1, 2023
1e9e3dc
updated onboarding page
aanorbel Aug 1, 2023
981699c
updated info activity
aanorbel Aug 1, 2023
d4390cf
updated theme with night mode colors
aanorbel Aug 1, 2023
9c34754
updated dialog and strings
aanorbel Aug 2, 2023
782e5f9
Updated dashboard logo to use xml file and update dashboard layout
aanorbel Aug 7, 2023
254322a
Updated string overides for onboarding pages
aanorbel Aug 11, 2023
bf75c4b
Updated the theme for `WebConnectivity` to use the base color theme f…
aanorbel Sep 6, 2023
d3a51bf
Updated dashboard to remove disabled cards based on build config
aanorbel Sep 7, 2023
69b7170
Updated about activity
aanorbel Sep 8, 2023
90d1326
Updated copy to use latest from DW Team
aanorbel Sep 11, 2023
8e7b12e
Updated copy
aanorbel Sep 11, 2023
dd58288
Updated copy and removed unnecesary text
aanorbel Sep 11, 2023
1a3751b
Updated asset animation and about page
aanorbel Sep 21, 2023
39cb657
Updated icon and resource file
aanorbel Sep 21, 2023
9e1cf64
Updated version code
aanorbel Sep 21, 2023
bb5f327
Merge branch 'master' of github.com:ooni/probe-android into dw-media-…
aanorbel Nov 17, 2023
4964560
Update app for release 3.8.5
aanorbel Nov 28, 2023
4650b5a
Merge branch 'releases/3.8.5' of github.com:ooni/probe-android into d…
aanorbel Nov 28, 2023
50f9d4b
Chore: Updated flavor definition to allow resource separation (#634)
aanorbel Dec 5, 2023
38d85b5
Merge branch 'master' of github.com:ooni/probe-android into dw-media-…
aanorbel Dec 5, 2023
a16dd05
Updated app to display disabled dashboard items based on build config
aanorbel Dec 5, 2023
b919961
Updated translations
aanorbel Feb 13, 2024
57a90cb
Merge branch 'master' of github.com:ooni/probe-android into dw-media-…
aanorbel Feb 13, 2024
b0d0f5d
Merge branch 'master' of github.com:ooni/probe-android into dw-media-…
aanorbel Mar 26, 2024
ca23927
chore: Updated translations for News Media Scan
aanorbel Mar 27, 2024
2f1406f
Merge branch 'master' of github.com:ooni/probe-android into dw-media-…
aanorbel Apr 10, 2024
7fbfd60
fix(NMS): update supported languages
aanorbel Apr 11, 2024
ca5ee3f
chore: remove bundle splitting for languages.
aanorbel Apr 29, 2024
f150e8d
chore: update language code
aanorbel Apr 29, 2024
6906084
fix: language decoding from string representation
aanorbel Apr 30, 2024
2a30bc4
chore: updated ci flow to include news media scan
aanorbel Apr 30, 2024
598eea9
Merge branch 'dev/ooni-run-v2' of github.com:ooni/probe-android into …
aanorbel May 8, 2024
7a38cd7
feat: Customize app to add default descriptors.
aanorbel May 9, 2024
103851a
chore(OONI Run v2): update preference structure.
aanorbel May 10, 2024
099ad51
chore: Update `RunTestsExpandableListViewAdapter.kt` to have an overi…
aanorbel May 10, 2024
ecbca71
feat: remove title for dashboard when there is no `ooni` provided test
aanorbel May 13, 2024
815c4f1
chore: update default data
aanorbel May 16, 2024
ae52f02
Merge branch 'dev/ooni-run-v2' of github.com:ooni/probe-android into …
aanorbel May 16, 2024
c420e36
chore: add `OONI_API_BASE_URL` for stable flavor
aanorbel May 17, 2024
d9be2bc
Merge branch 'dev/ooni-run-v2' of github.com:ooni/probe-android into …
aanorbel May 21, 2024
4662fc9
Merge branch 'dev/ooni-run-v2' of github.com:ooni/probe-android into …
aanorbel May 22, 2024
6533bec
Merge branch 'dev/ooni-run-v2' of github.com:ooni/probe-android into …
aanorbel May 24, 2024
b7a5252
Merge branch 'dev/ooni-run-v2' of github.com:ooni/probe-android into …
aanorbel May 24, 2024
64fc8d6
Merge branch 'dev/ooni-run-v2' of github.com:ooni/probe-android into …
aanorbel May 24, 2024
abfd9be
Merge branch 'dev/ooni-run-v2' of github.com:ooni/probe-android into …
aanorbel May 27, 2024
a0ed22e
fix: update `nms` to enable tests by default
aanorbel May 27, 2024
e70f0ba
Merge branch 'dev/ooni-run-v2' of github.com:ooni/probe-android into …
aanorbel May 27, 2024
720ddb9
Merge branch 'dev/ooni-run-v2' of github.com:ooni/probe-android into …
aanorbel May 28, 2024
920ed00
fix: NMS: Further UI Tweaks to test overview screen (#746)
aanorbel May 28, 2024
e64e567
feat: add filter support for run v2 links
aanorbel May 29, 2024
12f3a65
Merge branch 'feat/test-result-filter' of github.com:ooni/probe-andro…
aanorbel May 29, 2024
502d3b8
feat: update filter value
aanorbel May 29, 2024
24bf59c
Merge branch 'dev/ooni-run-v2' of github.com:ooni/probe-android into …
aanorbel Jun 5, 2024
4145e50
feat: remove automatic update from `NMS` app
aanorbel Jun 5, 2024
2a4e7e0
feat: add `dw` run v2 links (#756)
aanorbel Jun 13, 2024
1623de2
Merge branch 'dev/ooni-run-v2' of github.com:ooni/probe-android into …
aanorbel Jun 13, 2024
4b02212
Merge branch 'dw/ooni-run-v2' of github.com:ooni/probe-android into d…
aanorbel Jun 13, 2024
a4cc55c
Merge branch 'dev/ooni-run-v2' of github.com:ooni/probe-android into …
aanorbel Jun 13, 2024
0c5b933
Merge branch 'dev/ooni-run-v2' of github.com:ooni/probe-android into …
aanorbel Jun 13, 2024
7db7880
Merge branch 'dev/ooni-run-v2' of github.com:ooni/probe-android into …
aanorbel Jul 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ android {
stable {
dimension 'testing'
buildConfigField 'String', 'BASE_SOFTWARE_NAME', '"ooniprobe-android"'
buildConfigField 'String', 'OONI_API_BASE_URL', '"https://api.prod.ooni.io/"'
buildConfigField 'String', 'OONI_API_BASE_URL', '"https://api.prod.ooni.io"'
buildConfigField 'String', 'OONI_RUN_DASHBOARD_URL', '"https://run-v2.ooni.org"'
}
dev {
Expand Down
312 changes: 312 additions & 0 deletions app/src/dw/assets/descriptors.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,312 @@
[
{
"name": "Trusted International Media",
"short_description": "The most reliable international media outlets.",
"description": "In this list you will find the largest, most reliable international media outlets in the world.",
"author": "internet-freedom@dw.com",
"nettests": [
{
"test_name": "web_connectivity",
"inputs": [
"https://www.dw.com",
"https://www.francemediasmonde.com/",
"https://www.mc-doualiya.com/",
"https://www.dw.com/",
"https://www.bbc.com/",
"http://www.lemonde.fr/",
"https://www.rferl.org/",
"http://www.rfi.fr/",
"http://www.voanews.com/",
"https://ici.radio-canada.ca/rci/en",
"https://www.rfa.org/english/",
"https://www.france24.com/en/",
"https://www3.nhk.or.jp/nhkworld/",
"https://www.abc.net.au/news",
"https://www.swissinfo.ch/eng/",
"https://www.srgssr.ch/en/home/"
],
"options": {},
"backend_options": {},
"is_background_run_enabled_default": false,
"is_manual_run_enabled_default": false
}
],
"name_intl": {
"de": "Vertrauenswürdige Internationale Medien",
"en": "Trusted international media",
"ru": "Доверенные международные СМИ"
},
"short_description_intl": {},
"description_intl": {},
"icon": "FaShield",
"color": "#68bc00",
"expiration_date": "2027-07-24T00:00:00.000000Z",
"oonirun_link_id": "10004",
"date_created": "2024-06-06T14:35:13.000000Z",
"date_updated": "2024-06-06T14:56:44.000000Z",
"revision": "2",
"is_mine": false,
"is_expired": false
},
{
"name": "Selected (inter)national media",
"short_description": "Selected national and international media outlets.",
"description": "Selected national and international media outlets. \nWarning: This could also include biased and/or propagandistic media.",
"author": "internet-freedom@dw.com",
"nettests": [
{
"test_name": "web_connectivity",
"inputs": [
"https://dartcenter.org/",
"https://ourworldindata.org/",
"https://www.propublica.org/",
"http://www.1tv.ru/",
"http://www.vesti.ru/",
"https://sputnikglobe.com/",
"https://rtr-planeta.com/",
"https://www.ntv.ru/",
"https://www.rtarabic.com/",
"https://vgtrk.ru/",
"https://www.currenttime.tv/",
"https://www.dailywire.com/",
"https://timcast.com/",
"https://www.projectveritas.com/",
"https://www.francemediasmonde.com/",
"https://www.france24.com/ar/",
"https://www.mc-doualiya.com/",
"https://www.washingtonpost.com/",
"https://www.spiegel.de/",
"https://www.icij.org/",
"https://foreignpolicy.com/",
"https://www.reuters.com/",
"https://sputniknews.com/",
"https://www.sbs.com.au/language/coronavirus?cid=infocus",
"http://www.ftchinese.com/",
"http://www.sputniknews.cn/",
"http://www.dailymail.co.uk/",
"https://www.theatlantic.com/",
"https://www.nbcnews.com/",
"https://www.aljazeera.com/",
"https://www.urduvoa.com/",
"https://www.dw.com/",
"https://www.nbc.com/",
"http://abc.go.com/",
"https://theintercept.com/",
"https://www.bbc.com/",
"https://www.bbc.co.uk/",
"https://www.chinadaily.com.cn/",
"https://news.google.com/",
"https://nypost.com/",
"https://www.wsj.com/",
"https://timesofindia.indiatimes.com/",
"https://wikileaks.org/",
"https://www.afp.com/",
"https://www.alarabiya.net/",
"https://www.aljazeera.net/",
"https://www.cbc.ca/",
"https://www.cbsnews.com/",
"https://www.chinatimes.com/",
"https://edition.cnn.com/",
"https://www.foxnews.com/",
"https://www.ft.com/",
"http://www.granma.cu/",
"https://www.haaretz.com/",
"http://www.indiatimes.com/",
"http://www.irna.ir/",
"http://www.kcna.kp/",
"http://www.lemonde.fr/",
"http://www.mainichi.co.jp/",
"http://www.mizzima.com/",
"https://www.nytimes.com/",
"http://www.people.com.cn/",
"http://www.pravda.ru/",
"https://www.rambler.ru/",
"https://www.reddit.com/",
"http://www.repubblica.com/",
"https://www.rferl.org/",
"http://www.rfi.fr/",
"https://www.rt.com/",
"https://www.telegraph.co.uk/",
"http://www.theepochtimes.com/",
"https://www.theguardian.com/",
"http://www.voanews.com/",
"http://www.washingtontimes.com/",
"http://www.xinhuanet.com/",
"http://www.zeit.de/"
],
"options": {},
"backend_options": {},
"is_background_run_enabled_default": false,
"is_manual_run_enabled_default": false
}
],
"name_intl": {},
"short_description_intl": {},
"description_intl": {},
"icon": "FaBookOpenReader",
"color": "#000000",
"expiration_date": "2027-07-24T00:00:00.000000Z",
"oonirun_link_id": "10005",
"date_created": "2024-06-06T14:37:53.000000Z",
"date_updated": "2024-06-06T14:37:53.000000Z",
"revision": "2",
"is_mine": false,
"is_expired": false
},
{
"name": "Global media ",
"short_description": "A wide range of global media.",
"description": "This is the largest collection of media worldwide.\n\nAttention: This list will most likely contain propagandistic and influenced media outlets.",
"author": "internet-freedom@dw.com",
"nettests": [
{
"test_name": "web_connectivity",
"inputs": [
"https://dartcenter.org/",
"https://ourworldindata.org/",
"https://www.propublica.org/",
"https://www.vesti.ru/",
"http://ren.tv/",
"http://smotrim.ru/",
"http://www.1tv.ru/",
"http://www.tvc.ru/",
"http://www.vesti.ru/",
"https://sputnikglobe.com/",
"https://rtr-planeta.com/",
"https://www.ntv.ru/",
"https://www.rtarabic.com/",
"https://vgtrk.ru/",
"https://www.currenttime.tv/",
"http://www.freeexpression.org/",
"https://www.dailywire.com/",
"https://timcast.com/",
"https://wearechange.org/",
"https://reclaimthenet.org/",
"https://www.muckrock.com/",
"https://www.projectveritas.com/",
"https://substack.com/",
"https://www.infowars.com/",
"https://banthis.tv/",
"http://ria.ru/",
"https://www.francemediasmonde.com/",
"https://www.france24.com/ar/",
"https://www.mc-doualiya.com/",
"https://www.usatoday.com/",
"https://www.washingtonpost.com/",
"https://www.spiegel.de/",
"https://www.icij.org/",
"http://www.qhtyzx.com/",
"http://www.qhnews.com/",
"https://liveuamap.com/",
"https://foreignpolicy.com/",
"https://www.reuters.com/",
"https://sputniknews.com/",
"https://www.sbs.com.au/language/coronavirus?cid=infocus",
"http://www.ftchinese.com/",
"http://www.sputniknews.cn/",
"https://www.dailysabah.com/",
"http://www.dailymail.co.uk/",
"https://www.economist.com/",
"https://www.theatlantic.com/",
"https://www.nbcnews.com/",
"https://slate.com/",
"https://www.aljazeera.com/",
"https://globalpressjournal.com/",
"https://www.urduvoa.com/",
"https://www.dw.com/",
"https://www.vice.com/",
"https://tyt.com/",
"https://www.nbc.com/",
"http://abc.go.com/",
"https://theintercept.com/",
"https://www.bbc.com/",
"https://www.bbc.co.uk/",
"https://asiatimes.com/",
"https://boingboing.net/",
"https://www.chinadaily.com.cn/",
"https://creativecommons.org/",
"https://indymedia.org/",
"https://ipi.media/",
"https://jezebel.com/",
"http://www.kabobfest.com/",
"https://news.google.com/",
"https://nypost.com/",
"https://www.wsj.com/",
"http://russia.tv/",
"https://slashdot.org/",
"https://timesofindia.indiatimes.com/",
"https://wikileaks.org/",
"https://www.advocate.com/",
"https://www.afp.com/",
"https://www.ahram.org.eg/",
"https://www.alarabiya.net/",
"https://www.aljazeera.net/",
"https://www.almanar.com.lb/",
"https://www.arabnews.com/",
"https://www.benedelman.org/",
"https://www.cbc.ca/",
"https://www.cbsnews.com/",
"https://www.chinatimes.com/",
"https://edition.cnn.com/",
"https://www.csmonitor.com/",
"https://www.democracynow.org/",
"https://www.dopplr.com/",
"http://www.drudgereport.com/",
"https://www.eluniversal.com/",
"https://www.foxnews.com/",
"https://www.ft.com/",
"https://www.gearthblog.com/",
"http://www.granma.cu/",
"https://www.haaretz.com/",
"https://www.huffpost.com/",
"http://www.indiatimes.com/",
"http://www.irna.ir/",
"http://www.kcna.kp/",
"http://www.lanacion.com.ar/",
"http://www.latimes.com/",
"http://www.lemonde.fr/",
"http://www.mainichi.co.jp/",
"https://www.mideastyouth.com/",
"http://www.mizzima.com/",
"https://www.nytimes.com/",
"http://www.ohmynews.com/",
"http://www.osce.org/",
"http://www.people.com.cn/",
"http://www.pravda.ru/",
"https://www.rambler.ru/",
"https://www.reddit.com/",
"http://www.repubblica.com/",
"https://www.rferl.org/",
"http://www.rfi.fr/",
"https://www.rt.com/",
"https://www.telegraph.co.uk/",
"http://www.theepochtimes.com/",
"https://www.theguardian.com/",
"http://www.theregister.co.uk/",
"http://www.voanews.com/",
"http://www.washingtontimes.com/",
"http://www.wnd.com/",
"http://www.xinhuanet.com/",
"http://www.zeit.de/",
"http://xxx.lanl.gov/"
],
"options": {},
"backend_options": {},
"is_background_run_enabled_default": false,
"is_manual_run_enabled_default": false
}
],
"name_intl": {},
"short_description_intl": {},
"description_intl": {},
"icon": "FaEarthAmericas",
"color": "#000000",
"expiration_date": "2027-07-24T00:00:00.000000Z",
"oonirun_link_id": "10006",
"date_created": "2024-06-06T14:39:02.000000Z",
"date_updated": "2024-06-06T14:39:02.000000Z",
"revision": "2",
"is_mine": false,
"is_expired": false
}
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
package org.openobservatory.ooniprobe.activity.runtests.adapter

import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import android.widget.ImageView
import android.widget.TextView
import org.openobservatory.ooniprobe.R
import org.openobservatory.ooniprobe.activity.runtests.RunTestsViewModel
import org.openobservatory.ooniprobe.activity.runtests.models.ChildItem
import org.openobservatory.ooniprobe.activity.runtests.models.GroupItem
import org.openobservatory.ooniprobe.test.test.AbstractTest


class RunTestsExpandableListViewAdapter(
private val groupedListData: List<Any>,
private val viewModel: RunTestsViewModel
) : AbstractRunTestsExpandableListViewAdapter(groupedListData, viewModel) {

override fun getChildrenCount(groupPosition: Int): Int {
val group = groupedListData[groupPosition]
return if (group is GroupItem && group.nettests.isNotEmpty()) {
group.nettests[0].inputs?.size ?: 0
} else {
0
}
}


override fun getChild(groupPosition: Int, childPosition: Int): ChildItem {

return when (val group = groupedListData[groupPosition]) {
is GroupItem -> {
ChildItem(
name = group.nettests[0].inputs?.get(childPosition)
?: "",
selected = false,
inputs = null
)
}

else -> ChildItem(name = "", selected = false, inputs = null)
}
}

override fun getChildView(
groupPosition: Int,
childPosition: Int,
isLastChild: Boolean,
convertView: View?,
parent: ViewGroup
): View? {
var convertView =
convertView
?: LayoutInflater.from(parent.context)
.inflate(R.layout.run_tests_child_list_item, parent, false)
val childItem = getChild(groupPosition, childPosition)
convertView.findViewById<TextView>(R.id.child_name)?.apply {
text = childItem.name
}
convertView.findViewById<ImageView>(R.id.child_select).apply {
visibility = View.GONE
}
return convertView
}
}
Loading
Loading