diff --git a/app/src/main/java/org/openobservatory/ooniprobe/activity/OverviewActivity.java b/app/src/main/java/org/openobservatory/ooniprobe/activity/OverviewActivity.java index ee06af8ab..95ba919a5 100644 --- a/app/src/main/java/org/openobservatory/ooniprobe/activity/OverviewActivity.java +++ b/app/src/main/java/org/openobservatory/ooniprobe/activity/OverviewActivity.java @@ -32,6 +32,7 @@ import com.google.android.material.snackbar.Snackbar; import org.openobservatory.engine.BaseNettest; +import org.openobservatory.ooniprobe.BuildConfig; import org.openobservatory.ooniprobe.R; import org.openobservatory.ooniprobe.activity.customwebsites.CustomWebsiteActivity; import org.openobservatory.ooniprobe.activity.overview.OverviewTestsExpandableListViewAdapter; @@ -156,8 +157,10 @@ protected void onCreate(@Nullable Bundle savedInstanceState) { binding.automaticUpdatesContainer.setVisibility(View.VISIBLE); binding.automaticUpdatesSwitch.setChecked(installedDescriptor.getTestDescriptor().isAutoUpdate()); - if (Objects.equals("contact@openobservatory.org", installedDescriptor.getTestDescriptor().getAuthor())) { + if (BuildConfig.FLAVOR_brand.equals("dw")) { binding.uninstallLink.setVisibility(View.GONE); + binding.revisionsContainer.setVisibility(View.GONE); + binding.headerContainer.setVisibility(View.GONE); } } else { diff --git a/app/src/main/java/org/openobservatory/ooniprobe/activity/overview/OverviewTestsExpandableListViewAdapter.kt b/app/src/main/java/org/openobservatory/ooniprobe/activity/overview/OverviewTestsExpandableListViewAdapter.kt index 1a1b60398..98f6b3deb 100644 --- a/app/src/main/java/org/openobservatory/ooniprobe/activity/overview/OverviewTestsExpandableListViewAdapter.kt +++ b/app/src/main/java/org/openobservatory/ooniprobe/activity/overview/OverviewTestsExpandableListViewAdapter.kt @@ -7,10 +7,12 @@ import android.widget.BaseExpandableListAdapter import android.widget.ImageView import android.widget.TextView import com.google.android.material.checkbox.MaterialCheckBox +import org.openobservatory.ooniprobe.BuildConfig import org.openobservatory.ooniprobe.R import org.openobservatory.ooniprobe.common.OONITests import org.openobservatory.ooniprobe.test.test.AbstractTest import org.openobservatory.ooniprobe.test.test.Experimental +import org.openobservatory.ooniprobe.test.test.WebConnectivity class OverviewTestsExpandableListViewAdapter( private val items: List, @@ -51,9 +53,13 @@ class OverviewTestsExpandableListViewAdapter( else -> { val testSuite = AbstractTest.getTestByName(groupItem.name) - view.findViewById(R.id.group_name).text = when (testSuite is Experimental) { - true -> testSuite.name - false -> parent.context.resources.getText(testSuite.labelResId) + view.findViewById(R.id.group_name).text = when (testSuite) { + is Experimental -> testSuite.name + is WebConnectivity -> when (BuildConfig.FLAVOR_brand == "dw") { + true -> "Test websites automatically" + else -> parent.context.resources.getText(testSuite.labelResId) + } + else -> parent.context.resources.getText(testSuite.labelResId) } when(testSuite.iconResId){ 0 -> view.findViewById(R.id.group_icon).visibility = View.GONE @@ -115,7 +121,7 @@ class OverviewTestsExpandableListViewAdapter( } } - if (groupItem.inputs?.isNotEmpty() == true) { + if (items.count() > 1 && groupItem.inputs?.isNotEmpty() == true) { if (isExpanded) { groupIndicator.setImageResource(R.drawable.expand_less) } else {