Skip to content

Commit

Permalink
revert: adding internal package
Browse files Browse the repository at this point in the history
This change was making PR review more difficult, better to do in a separate PR
  • Loading branch information
wzieba committed Apr 5, 2024
1 parent 2273370 commit 306635d
Show file tree
Hide file tree
Showing 31 changed files with 28 additions and 59 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.example;

import com.parsely.parselyandroid.internal.ParselyTrackerInternal;
import com.parsely.parselyandroid.ParselyTrackerInternal;

import org.jetbrains.annotations.Nullable;

Expand Down
2 changes: 1 addition & 1 deletion example/src/main/java/com/example/MainActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import com.parsely.parselyandroid.ParselyTracker;
import com.parsely.parselyandroid.SiteIdSource;
import com.parsely.parselyandroid.internal.ParselyTrackerInternal;
import com.parsely.parselyandroid.ParselyTrackerInternal;
import com.parsely.parselyandroid.ParselyVideoMetadata;

import java.util.ArrayList;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties
import com.fasterxml.jackson.annotation.JsonProperty
import com.fasterxml.jackson.core.type.TypeReference
import com.fasterxml.jackson.databind.ObjectMapper
import com.parsely.parselyandroid.internal.ParselyTrackerInternal
import java.io.File
import java.io.FileInputStream
import java.io.ObjectInputStream
Expand All @@ -21,7 +20,6 @@ import kotlin.io.path.Path
import kotlin.time.Duration
import kotlin.time.Duration.Companion.hours
import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.parse
import kotlin.time.Duration.Companion.seconds
import kotlinx.coroutines.runBlocking
import kotlinx.coroutines.withTimeoutOrNull
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.parsely.parselyandroid.internal
package com.parsely.parselyandroid

import android.content.Context
import android.provider.Settings
import com.google.android.gms.ads.identifier.AdvertisingIdClient
import com.parsely.parselyandroid.internal.Logging.log
import com.parsely.parselyandroid.Logging.log
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.parsely.parselyandroid.internal
package com.parsely.parselyandroid

import java.util.Calendar
import java.util.TimeZone
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.parsely.parselyandroid.internal
package com.parsely.parselyandroid

import android.content.Context
import android.net.ConnectivityManager
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.parsely.parselyandroid.internal
package com.parsely.parselyandroid

import android.os.Build
import com.parsely.parselyandroid.internal.Logging.log
import com.parsely.parselyandroid.Logging.log

internal interface DeviceInfoRepository{
fun collectDeviceInfo(): Map<String, String>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package com.parsely.parselyandroid.internal
package com.parsely.parselyandroid

import com.parsely.parselyandroid.internal.Logging.log
import com.parsely.parselyandroid.ParselyVideoMetadata
import com.parsely.parselyandroid.Logging.log
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
import kotlinx.coroutines.delay
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.parsely.parselyandroid.internal
package com.parsely.parselyandroid

internal interface EventQueuer {
fun enqueueEvent(event: Map<String, Any>)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.parsely.parselyandroid.internal
package com.parsely.parselyandroid

import com.parsely.parselyandroid.internal.Logging.log
import com.parsely.parselyandroid.ParselyMetadata
import com.parsely.parselyandroid.SiteIdSource
import com.parsely.parselyandroid.Logging.log

internal class EventsBuilder(
private val deviceInfoRepository: DeviceInfoRepository,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.parsely.parselyandroid.internal
package com.parsely.parselyandroid

import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.Job
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.parsely.parselyandroid.internal
package com.parsely.parselyandroid

import com.parsely.parselyandroid.internal.JsonSerializer.toParselyEventsPayload
import com.parsely.parselyandroid.internal.Logging.log
import com.parsely.parselyandroid.JsonSerializer.toParselyEventsPayload
import com.parsely.parselyandroid.Logging.log
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.launch
import kotlinx.coroutines.sync.Mutex
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.parsely.parselyandroid.internal
package com.parsely.parselyandroid

import kotlin.time.Duration
import kotlin.time.Duration.Companion.minutes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.parsely.parselyandroid.internal
package com.parsely.parselyandroid

import com.parsely.parselyandroid.internal.Logging.log
import com.parsely.parselyandroid.Logging.log
import kotlin.time.Duration.Companion.seconds
import kotlinx.coroutines.CoroutineScope
import kotlinx.coroutines.delay
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.parsely.parselyandroid.internal
package com.parsely.parselyandroid

import com.fasterxml.jackson.databind.ObjectMapper
import java.io.IOException
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.parsely.parselyandroid.internal
package com.parsely.parselyandroid

import android.content.Context
import com.parsely.parselyandroid.internal.Logging.log
import com.parsely.parselyandroid.Logging.log
import java.io.EOFException
import java.io.FileNotFoundException
import java.io.ObjectInputStream
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.parsely.parselyandroid.internal
package com.parsely.parselyandroid

import java.util.Formatter

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.parsely.parselyandroid.internal
package com.parsely.parselyandroid

import java.net.HttpURLConnection
import java.net.URL
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.parsely.parselyandroid.internal
package com.parsely.parselyandroid

import kotlinx.coroutines.CoroutineName
import kotlinx.coroutines.CoroutineScope
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package com.parsely.parselyandroid

import android.content.Context
import com.parsely.parselyandroid.internal.ParselyTrackerInternal
import org.jetbrains.annotations.TestOnly

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
package com.parsely.parselyandroid.internal
package com.parsely.parselyandroid

import android.content.Context
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleEventObserver
import androidx.lifecycle.ProcessLifecycleOwner
import com.parsely.parselyandroid.ParselyMetadata
import com.parsely.parselyandroid.ParselyTracker
import com.parsely.parselyandroid.ParselyVideoMetadata
import com.parsely.parselyandroid.SiteIdSource
import java.util.UUID

internal class ParselyTrackerInternal internal constructor(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.parsely.parselyandroid

import com.parsely.parselyandroid.internal.AndroidDeviceInfoRepository
import org.assertj.core.api.Assertions.assertThat
import org.junit.Before
import org.junit.Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package com.parsely.parselyandroid
import android.app.Application
import android.provider.Settings
import androidx.test.core.app.ApplicationProvider
import com.parsely.parselyandroid.internal.AndroidIdProvider
import org.assertj.core.api.Assertions.assertThat
import org.junit.Before
import org.junit.Test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
package com.parsely.parselyandroid

import com.parsely.parselyandroid.internal.Clock
import com.parsely.parselyandroid.internal.EngagementManager
import com.parsely.parselyandroid.internal.EventQueuer
import com.parsely.parselyandroid.internal.HeartbeatIntervalCalculator
import kotlin.time.Duration
import kotlin.time.Duration.Companion.milliseconds
import kotlin.time.Duration.Companion.seconds
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
package com.parsely.parselyandroid

import com.parsely.parselyandroid.internal.Clock
import com.parsely.parselyandroid.internal.DeviceInfoRepository
import com.parsely.parselyandroid.internal.EventsBuilder
import kotlin.time.Duration
import kotlin.time.Duration.Companion.hours
import org.assertj.core.api.Assertions.assertThat
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.parsely.parselyandroid

import com.parsely.parselyandroid.internal.ParselyFlushManager
import kotlin.time.Duration.Companion.seconds
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.advanceTimeBy
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
package com.parsely.parselyandroid

import com.parsely.parselyandroid.internal.ConnectivityStatusProvider
import com.parsely.parselyandroid.internal.FlushManager
import com.parsely.parselyandroid.internal.FlushQueue
import com.parsely.parselyandroid.internal.QueueRepository
import com.parsely.parselyandroid.internal.RestClient
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
package com.parsely.parselyandroid

import com.parsely.parselyandroid.internal.HeartbeatIntervalCalculator.Companion.MAX_TIME_BETWEEN_HEARTBEATS
import com.parsely.parselyandroid.internal.Clock
import com.parsely.parselyandroid.internal.HeartbeatIntervalCalculator
import com.parsely.parselyandroid.HeartbeatIntervalCalculator.Companion.MAX_TIME_BETWEEN_HEARTBEATS
import kotlin.time.Duration
import kotlin.time.Duration.Companion.seconds
import org.assertj.core.api.Assertions.assertThat
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.parsely.parselyandroid

import com.parsely.parselyandroid.internal.InMemoryBuffer
import com.parsely.parselyandroid.internal.QueueRepository
import kotlin.time.Duration.Companion.seconds
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.cancel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package com.parsely.parselyandroid

import android.content.Context
import androidx.test.core.app.ApplicationProvider
import com.parsely.parselyandroid.internal.LocalStorageRepository
import java.io.File
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runCurrent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package com.parsely.parselyandroid

import com.parsely.parselyandroid.internal.ParselyAPIConnection
import kotlinx.coroutines.ExperimentalCoroutinesApi
import kotlinx.coroutines.test.runCurrent
import kotlinx.coroutines.test.runTest
Expand Down

0 comments on commit 306635d

Please sign in to comment.