Skip to content

Commit 145d037

Browse files
committed
Revert "Merge branch 'release/5.218.0'"
This reverts commit 9e3a39f, reversing changes made to d37c5f7.
1 parent 9e3a39f commit 145d037

File tree

4,170 files changed

+1982
-854583
lines changed

Some content is hidden

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

4,170 files changed

+1982
-854583
lines changed

.bundle/config

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/release_create_tag.yml

Lines changed: 0 additions & 50 deletions
This file was deleted.

.github/workflows/release_create_task.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Release - Create Release Task in Asana
1+
name: Create Android App Release Task
22

33
on:
44
workflow_dispatch:

.github/workflows/release_production.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/release_report_error.yml

Lines changed: 0 additions & 27 deletions
This file was deleted.

.github/workflows/release_tests.yml

Lines changed: 0 additions & 84 deletions
This file was deleted.

Gemfile.lock

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,6 @@ GEM
106106
xcodeproj (>= 1.13.0, < 2.0.0)
107107
xcpretty (~> 0.3.0)
108108
xcpretty-travis-formatter (>= 0.0.3)
109-
fastlane-plugin-firebase_app_distribution (0.9.1)
110-
google-apis-firebaseappdistribution_v1 (~> 0.3.0)
111-
google-apis-firebaseappdistribution_v1alpha (~> 0.2.0)
112109
fastlane-plugin-property_file_read (1.0.1)
113110
gh_inspector (1.1.3)
114111
google-apis-androidpublisher_v3 (0.53.0)
@@ -122,10 +119,6 @@ GEM
122119
retriable (>= 2.0, < 4.a)
123120
rexml
124121
webrick
125-
google-apis-firebaseappdistribution_v1 (0.3.0)
126-
google-apis-core (>= 0.11.0, < 2.a)
127-
google-apis-firebaseappdistribution_v1alpha (0.2.0)
128-
google-apis-core (>= 0.11.0, < 2.a)
129122
google-apis-iamcredentials_v1 (0.17.0)
130123
google-apis-core (>= 0.11.0, < 2.a)
131124
google-apis-playcustomapp_v1 (0.13.0)
@@ -220,7 +213,6 @@ PLATFORMS
220213

221214
DEPENDENCIES
222215
fastlane
223-
fastlane-plugin-firebase_app_distribution
224216
fastlane-plugin-property_file_read
225217

226218
BUNDLED WITH

anvil/anvil-compiler/src/main/java/com/duckduckgo/anvil/compiler/ContributesRemoteFeatureCodeGenerator.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ class ContributesRemoteFeatureCodeGenerator : CodeGenerator {
107107
)
108108
.build(),
109109
)
110-
.addParameter("callback", featureTogglesCallback.asClassName(module))
111110
.addParameter("appBuildConfig", appBuildConfig.asClassName(module))
112111
.addParameter("variantManager", variantManager.asClassName(module))
113112
.addCode(
@@ -119,7 +118,6 @@ class ContributesRemoteFeatureCodeGenerator : CodeGenerator {
119118
.featureName(%S)
120119
.appVariantProvider({ appBuildConfig.variantName })
121120
.localeProvider({ appBuildConfig.deviceLocale })
122-
.callback(callback)
123121
// save empty variants will force the default variant to be set
124122
.forceDefaultVariantProvider({ variantManager.updateVariants(emptyList()) })
125123
.build()
@@ -1153,7 +1151,6 @@ class ContributesRemoteFeatureCodeGenerator : CodeGenerator {
11531151
private val context = FqName("android.content.Context")
11541152
private val privacyFeaturePlugin = FqName("com.duckduckgo.privacy.config.api.PrivacyFeaturePlugin")
11551153
private val appBuildConfig = FqName("com.duckduckgo.appbuildconfig.api.AppBuildConfig")
1156-
private val featureTogglesCallback = FqName("com.duckduckgo.feature.toggles.internal.api.FeatureTogglesCallback")
11571154
private val variantManager = FqName("com.duckduckgo.experiments.api.VariantManager")
11581155
private val buildFlavorInternal = FqName("com.duckduckgo.appbuildconfig.api.BuildFlavor.INTERNAL")
11591156
private val moshi = FqName("com.squareup.moshi.Moshi")

app-tracking-protection/vpn-api/src/main/java/com/duckduckgo/mobile/android/vpn/Vpn.kt

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,7 @@ interface Vpn {
2626
suspend fun start()
2727

2828
/**
29-
* Pauses the VPN tunnel.
30-
* All features that were registered to use the VPN tunnel (eg. AppTP, NetP) continue to be registered and so a subsequent
31-
* [start] call will re-enable them all
32-
*/
33-
suspend fun pause()
34-
35-
/**
36-
* Stops the VPN tunnel AND all features registered to use the VPN tunnel (eg. AppTP, NetP). A subsequent call to [start]
37-
* will not re-start the VPN because no feature would be registered.
29+
* Disable the device VPN by stopping the VPN service
3830
*/
3931
suspend fun stop()
4032

app-tracking-protection/vpn-impl/src/main/java/com/duckduckgo/mobile/android/vpn/VpnFeaturesRegistryImpl.kt

Lines changed: 17 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -21,33 +21,20 @@ import android.content.SharedPreferences
2121
import androidx.core.content.edit
2222
import com.duckduckgo.common.utils.DispatcherProvider
2323
import com.duckduckgo.data.store.api.SharedPreferencesProvider
24-
import com.duckduckgo.di.scopes.AppScope
2524
import com.duckduckgo.mobile.android.vpn.service.TrackerBlockingVpnService
26-
import com.squareup.anvil.annotations.ContributesBinding
27-
import dagger.SingleInstanceIn
2825
import java.util.UUID
29-
import javax.inject.Inject
3026
import kotlinx.coroutines.sync.Mutex
3127
import kotlinx.coroutines.withContext
3228
import logcat.logcat
3329

3430
private const val PREFS_FILENAME = "com.duckduckgo.mobile.android.vpn.feature.registry.v1"
3531
private const val IS_INITIALIZED = "IS_INITIALIZED"
3632

37-
@ContributesBinding(
38-
scope = AppScope::class,
39-
boundType = VpnFeaturesRegistry::class,
40-
)
41-
@ContributesBinding(
42-
scope = AppScope::class,
43-
boundType = Vpn::class,
44-
)
45-
@SingleInstanceIn(AppScope::class)
46-
class VpnFeaturesRegistryImpl @Inject constructor(
33+
internal class VpnFeaturesRegistryImpl(
4734
private val vpnServiceWrapper: VpnServiceWrapper,
4835
private val sharedPreferencesProvider: SharedPreferencesProvider,
4936
private val dispatcherProvider: DispatcherProvider,
50-
) : VpnFeaturesRegistry, Vpn {
37+
) : VpnFeaturesRegistry {
5138

5239
private val mutex = Mutex()
5340

@@ -116,34 +103,6 @@ class VpnFeaturesRegistryImpl @Inject constructor(
116103
private fun registeredFeatures(): Map<String, Any?> {
117104
return preferences.all.filter { it.key != IS_INITIALIZED }
118105
}
119-
120-
override suspend fun start() = withContext(dispatcherProvider.io()) {
121-
vpnServiceWrapper.startService()
122-
}
123-
124-
override suspend fun pause() {
125-
vpnServiceWrapper.stopService()
126-
}
127-
128-
override suspend fun stop() {
129-
try {
130-
mutex.lock()
131-
// unregister all features
132-
getRegisteredFeatures().onEach {
133-
preferences.edit(commit = true) {
134-
remove(it.featureName)
135-
}
136-
}
137-
// stop VPN
138-
vpnServiceWrapper.stopService()
139-
} finally {
140-
mutex.unlock()
141-
}
142-
}
143-
144-
override suspend fun snooze(triggerAtMillis: Long) {
145-
vpnServiceWrapper.snoozeService(triggerAtMillis)
146-
}
147106
}
148107

149108
/**
@@ -152,9 +111,10 @@ class VpnFeaturesRegistryImpl @Inject constructor(
152111
*
153112
* The class is marked as open to be able to mock it in tests.
154113
*/
155-
open class VpnServiceWrapper @Inject constructor(
114+
internal open class VpnServiceWrapper(
156115
private val context: Context,
157-
) {
116+
private val dispatcherProvider: DispatcherProvider,
117+
) : Vpn {
158118
open fun restartVpnService(forceRestart: Boolean) {
159119
TrackerBlockingVpnService.restartVpnService(context, forceRestart = forceRestart)
160120
}
@@ -167,11 +127,19 @@ open class VpnServiceWrapper @Inject constructor(
167127
TrackerBlockingVpnService.startService(context)
168128
}
169129

170-
open fun snoozeService(triggerAtMillis: Long) {
171-
TrackerBlockingVpnService.snoozeService(context, triggerAtMillis)
172-
}
173-
174130
open fun isServiceRunning(): Boolean {
175131
return TrackerBlockingVpnService.isServiceRunning(context)
176132
}
133+
134+
override suspend fun start() = withContext(dispatcherProvider.io()) {
135+
startService()
136+
}
137+
138+
override suspend fun stop() = withContext(dispatcherProvider.io()) {
139+
stopService()
140+
}
141+
142+
override suspend fun snooze(triggerAtMillis: Long) {
143+
TrackerBlockingVpnService.snoozeService(context, triggerAtMillis)
144+
}
177145
}

0 commit comments

Comments
 (0)