Skip to content

Commit

Permalink
Some NetP cleanup (#3980)
Browse files Browse the repository at this point in the history
<!--
Note: This checklist is a reminder of our shared engineering
expectations.
The items in Bold are required
If your PR involves UI changes:
1. Upload screenshots or screencasts that illustrate the changes before
/ after
2. Add them under the UI changes section (feel free to add more columns
if needed)
If your PR does not involve UI changes, you can remove the **UI
changes** section

At a minimum, make sure your changes are tested in API 23 and one of the
more recent API levels available.
-->

Task/Issue URL:
https://app.asana.com/0/488551667048375/1206101327273496/f

### Description
https://app.asana.com/0/488551667048375/1206101327273496/f

### Steps to test this PR
QA-optional, as long the build successfully builds. Smoke test NetP
  • Loading branch information
karlenDimla authored Dec 11, 2023
1 parent ce3309b commit cf5c2a1
Show file tree
Hide file tree
Showing 42 changed files with 87 additions and 823 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,20 @@ package com.duckduckgo.mobile.android.app.tracking.ui

import com.duckduckgo.navigation.api.GlobalActivityStarter

/**
* Use this class to launch the AppTP Tracker Activity Screen
* ```kotlin
* globalActivityStarter.start(context, DeviceShieldTrackerActivityWithEmptyParams)
* ```
*/
object AppTrackerActivityWithEmptyParams : GlobalActivityStarter.ActivityParams
sealed class AppTrackingProtectionScreens {
/**
* Use this class to launch the AppTP Tracker Activity Screen
* ```kotlin
* globalActivityStarter.start(context, DeviceShieldTrackerActivityWithEmptyParams)
* ```
*/
object AppTrackerActivityWithEmptyParams : GlobalActivityStarter.ActivityParams

/**
* Use this class to launch the AppTP onboarding screen
* ```kotlin
* globalActivityStarter.start(context, AppTrackerOnboardingActivityWithEmptyParamsParams)
* ```
*/
object AppTrackerOnboardingActivityWithEmptyParamsParams : GlobalActivityStarter.ActivityParams
/**
* Use this class to launch the AppTP onboarding screen
* ```kotlin
* globalActivityStarter.start(context, AppTrackerOnboardingActivityWithEmptyParamsParams)
* ```
*/
object AppTrackerOnboardingActivityWithEmptyParamsParams : GlobalActivityStarter.ActivityParams
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ import com.duckduckgo.common.utils.ConflatedJob
import com.duckduckgo.common.utils.DispatcherProvider
import com.duckduckgo.di.scopes.VpnScope
import com.duckduckgo.mobile.android.app.tracking.AppTrackingProtection
import com.duckduckgo.mobile.android.app.tracking.ui.AppTrackerActivityWithEmptyParams
import com.duckduckgo.mobile.android.app.tracking.ui.AppTrackingProtectionScreens.AppTrackerActivityWithEmptyParams
import com.duckduckgo.mobile.android.vpn.R
import com.duckduckgo.mobile.android.vpn.dao.VpnServiceStateStatsDao
import com.duckduckgo.mobile.android.vpn.service.VpnServiceCallbacks
import com.duckduckgo.mobile.android.vpn.state.VpnStateMonitor
import com.duckduckgo.mobile.android.vpn.ui.notification.DeviceShieldAlertNotificationBuilder
import com.duckduckgo.mobile.android.vpn.ui.notification.DeviceShieldNotificationFactory
import com.duckduckgo.navigation.api.GlobalActivityStarter
import com.duckduckgo.networkprotection.api.NetworkProtectionManagementScreenNoParams
import com.duckduckgo.networkprotection.api.NetworkProtectionScreens.NetworkProtectionManagementScreenNoParams
import com.duckduckgo.networkprotection.api.NetworkProtectionState
import com.squareup.anvil.annotations.ContributesMultibinding
import dagger.SingleInstanceIn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ import com.duckduckgo.common.ui.viewbinding.viewBinding
import com.duckduckgo.common.utils.DispatcherProvider
import com.duckduckgo.common.utils.extensions.launchAlwaysOnSystemSettings
import com.duckduckgo.di.scopes.ActivityScope
import com.duckduckgo.mobile.android.app.tracking.ui.AppTrackerOnboardingActivityWithEmptyParamsParams
import com.duckduckgo.mobile.android.app.tracking.ui.AppTrackingProtectionScreens.AppTrackerOnboardingActivityWithEmptyParamsParams
import com.duckduckgo.mobile.android.vpn.AppTpVpnFeature
import com.duckduckgo.mobile.android.vpn.R
import com.duckduckgo.mobile.android.vpn.R.string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import com.duckduckgo.mobile.android.vpn.ui.tracker_activity.AppTPCompanyTracker
import com.duckduckgo.mobile.android.vpn.ui.tracker_activity.AppTPCompanyTrackersViewModel.ViewState
import com.duckduckgo.mobile.android.vpn.ui.util.TextDrawable
import com.duckduckgo.navigation.api.GlobalActivityStarter
import com.duckduckgo.networkprotection.api.NetPAppExclusionListNoParams
import com.duckduckgo.networkprotection.api.NetworkProtectionScreens.NetPAppExclusionListNoParams
import com.google.android.material.snackbar.Snackbar
import javax.inject.Inject
import javax.inject.Provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ import com.duckduckgo.common.ui.viewbinding.viewBinding
import com.duckduckgo.common.utils.DispatcherProvider
import com.duckduckgo.common.utils.extensions.launchAlwaysOnSystemSettings
import com.duckduckgo.di.scopes.ActivityScope
import com.duckduckgo.mobile.android.app.tracking.ui.AppTrackerActivityWithEmptyParams
import com.duckduckgo.mobile.android.app.tracking.ui.AppTrackingProtectionScreens.AppTrackerActivityWithEmptyParams
import com.duckduckgo.mobile.android.vpn.AppTpVpnFeature
import com.duckduckgo.mobile.android.vpn.R
import com.duckduckgo.mobile.android.vpn.VpnFeaturesRegistry
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ import com.duckduckgo.common.utils.AppUrl.Url
import com.duckduckgo.di.scopes.ActivityScope
import com.duckduckgo.mobile.android.R.attr
import com.duckduckgo.navigation.api.GlobalActivityStarter
import com.duckduckgo.networkprotection.api.NetPWaitlistInvitedScreenNoParams
import com.duckduckgo.networkprotection.api.NetworkProtectionScreens.NetPWaitlistInvitedScreenNoParams
import com.google.android.material.snackbar.Snackbar
import javax.inject.Inject
import kotlinx.coroutines.flow.launchIn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ import com.duckduckgo.js.messaging.api.JsCallbackData
import com.duckduckgo.js.messaging.api.JsMessageCallback
import com.duckduckgo.js.messaging.api.JsMessageHelper
import com.duckduckgo.js.messaging.api.JsMessaging
import com.duckduckgo.mobile.android.app.tracking.ui.AppTrackerOnboardingActivityWithEmptyParamsParams
import com.duckduckgo.mobile.android.app.tracking.ui.AppTrackingProtectionScreens.AppTrackerOnboardingActivityWithEmptyParamsParams
import com.duckduckgo.navigation.api.GlobalActivityStarter
import com.duckduckgo.remote.messaging.api.RemoteMessage
import com.duckduckgo.savedsites.api.models.SavedSite
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ import com.duckduckgo.di.DaggerMap
import com.duckduckgo.di.scopes.ActivityScope
import com.duckduckgo.internal.features.api.InternalFeaturePlugin
import com.duckduckgo.macos.api.MacOsScreenWithEmptyParams
import com.duckduckgo.mobile.android.app.tracking.ui.AppTrackerActivityWithEmptyParams
import com.duckduckgo.mobile.android.app.tracking.ui.AppTrackerOnboardingActivityWithEmptyParamsParams
import com.duckduckgo.mobile.android.app.tracking.ui.AppTrackingProtectionScreens.AppTrackerActivityWithEmptyParams
import com.duckduckgo.mobile.android.app.tracking.ui.AppTrackingProtectionScreens.AppTrackerOnboardingActivityWithEmptyParamsParams
import com.duckduckgo.navigation.api.GlobalActivityStarter
import com.duckduckgo.navigation.api.GlobalActivityStarter.ActivityParams
import com.duckduckgo.settings.api.ProSettingsPlugin
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,25 @@
package com.duckduckgo.networkprotection.api

import com.duckduckgo.navigation.api.GlobalActivityStarter.ActivityParams
sealed class NetworkProtectionScreens {
/**
* Use this model to launch the NetworkProtectionManagement screen
*/
object NetworkProtectionManagementScreenNoParams : ActivityParams

/**
* Use this model to launch the NetworkProtectionManagement screen
*/
object NetworkProtectionManagementScreenNoParams : ActivityParams
/**
* Use this model to launch the NetworkProtectionManagement screen
* @param enable `true` if you want to both open the screen and enable NetP in case it's not yet enabled.
*/
data class NetworkProtectionManagementScreenAndEnable(val enable: Boolean) : ActivityParams

/**
* Use this model to launch the NetworkProtectionManagement screen
* @param enable `true` if you want to both open the screen and enable NetP in case it's not yet enabled.
*/
data class NetworkProtectionManagementScreenAndEnable(val enable: Boolean) : ActivityParams
/**
* Use this model to launch the NetPWaitlist screen
*/
object NetPWaitlistInvitedScreenNoParams : ActivityParams

/**
* Use this model to launch the NetPWaitlist screen
*/
object NetPWaitlistInvitedScreenNoParams : ActivityParams

/**
* Use this model to launch the NetP app exclusion list screen
*/
object NetPAppExclusionListNoParams : ActivityParams
/**
* Use this model to launch the NetP app exclusion list screen
*/
object NetPAppExclusionListNoParams : ActivityParams
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import com.duckduckgo.anvil.annotations.InjectWith
import com.duckduckgo.common.ui.DuckDuckGoActivity
import com.duckduckgo.common.ui.viewbinding.viewBinding
import com.duckduckgo.di.scopes.ActivityScope
import com.duckduckgo.networkprotection.impl.about.NetworkProtectionAboutScreens.NetPTermsScreenNoParams
import com.duckduckgo.networkprotection.impl.databinding.ActivityNetpTermsBinding
import com.duckduckgo.networkprotection.impl.pixels.NetworkProtectionPixels
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import com.duckduckgo.anvil.annotations.InjectWith
import com.duckduckgo.common.ui.DuckDuckGoActivity
import com.duckduckgo.common.ui.viewbinding.viewBinding
import com.duckduckgo.di.scopes.ActivityScope
import com.duckduckgo.networkprotection.impl.about.NetworkProtectionAboutScreens.NetPAboutVPNScreenNoParams
import com.duckduckgo.networkprotection.impl.databinding.ActivityNetpInfoVpnBinding
import com.duckduckgo.networkprotection.impl.pixels.NetworkProtectionPixels
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import com.duckduckgo.anvil.annotations.InjectWith
import com.duckduckgo.common.ui.DuckDuckGoActivity
import com.duckduckgo.common.ui.viewbinding.viewBinding
import com.duckduckgo.di.scopes.ActivityScope
import com.duckduckgo.networkprotection.impl.about.NetworkProtectionAboutScreens.NetPFaqsScreenNoParams
import com.duckduckgo.networkprotection.impl.databinding.ActivityNetpFaqsBinding
import com.duckduckgo.networkprotection.impl.pixels.NetworkProtectionPixels
import javax.inject.Inject
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,19 @@ package com.duckduckgo.networkprotection.impl.about

import com.duckduckgo.navigation.api.GlobalActivityStarter.ActivityParams

/**
* Use this model to launch the "What is a VPN" screen
*/
object NetPAboutVPNScreenNoParams : ActivityParams
sealed class NetworkProtectionAboutScreens {
/**
* Use this model to launch the "What is a VPN" screen
*/
object NetPAboutVPNScreenNoParams : ActivityParams

/**
* Use this model to launch the "Network Protection FAQs" screen
*/
object NetPFaqsScreenNoParams : ActivityParams
/**
* Use this model to launch the "Network Protection FAQs" screen
*/
object NetPFaqsScreenNoParams : ActivityParams

/**
* Use this model to launch the "Network Protection" terms and conditions screen
*/
object NetPTermsScreenNoParams : ActivityParams
/**
* Use this model to launch the "Network Protection" terms and conditions screen
*/
object NetPTermsScreenNoParams : ActivityParams
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit cf5c2a1

Please sign in to comment.