Skip to content

Commit

Permalink
Reorganize packages (#463)
Browse files Browse the repository at this point in the history
  • Loading branch information
luizgrp authored Aug 3, 2022
1 parent e4fdb32 commit 54c1efa
Show file tree
Hide file tree
Showing 25 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion media-sample/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ if (device != null) {
description = "Run on device " + device
dependsOn(":media-sample:installRelease")
description = "Launch App"
commandLine = "adb -s $device shell am start -n com.google.android.horologist.mediasample/com.google.android.horologist.mediasample.components.MediaActivity".split(" ")
commandLine = "adb -s $device shell am start -n com.google.android.horologist.mediasample/com.google.android.horologist.mediasample.ui.app.MediaActivity".split(" ")
}

task offloadStatus(type: Exec) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import com.google.android.horologist.audio.SystemAudioRepository
import com.google.android.horologist.media3.offload.AudioOffloadManager
import com.google.android.horologist.media3.rules.PlaybackRules
import com.google.android.horologist.mediasample.runner.FakeConfigModule
import com.google.android.horologist.mediasample.ui.AppConfig
import com.google.android.horologist.networks.rules.NetworkingRules
import dagger.hilt.android.testing.HiltAndroidRule
import org.junit.After
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import androidx.lifecycle.Lifecycle
import androidx.test.filters.LargeTest
import com.google.android.horologist.media.ui.navigation.MediaNavController.navigateToLibrary
import com.google.android.horologist.media.ui.navigation.MediaNavController.navigateToVolume
import com.google.android.horologist.mediasample.components.MediaActivity
import com.google.android.horologist.mediasample.ui.app.MediaActivity
import org.junit.Ignore
import org.junit.Rule
import org.junit.Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import androidx.media3.session.MediaBrowser
import androidx.media3.session.SessionToken
import com.google.android.horologist.media3.flows.buildSuspend
import com.google.android.horologist.mediasample.BaseContainerTest
import com.google.android.horologist.mediasample.components.PlaybackService
import com.google.android.horologist.mediasample.data.service.playback.PlaybackService
import org.junit.Assume

abstract class BasePlaybackTest : BaseContainerTest() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ import android.os.StrictMode
import com.google.android.horologist.audio.SystemAudioRepository
import com.google.android.horologist.media3.audio.AudioOutputSelector
import com.google.android.horologist.media3.audio.BluetoothSettingsOutputSelector
import com.google.android.horologist.mediasample.AppConfig
import com.google.android.horologist.mediasample.di.CacheDir
import com.google.android.horologist.mediasample.di.ConfigModule
import com.google.android.horologist.mediasample.di.IsEmulator
import com.google.android.horologist.mediasample.util.resetAfter
import com.google.android.horologist.mediasample.ui.AppConfig
import com.google.android.horologist.mediasample.ui.util.resetAfter
import dagger.Module
import dagger.Provides
import dagger.hilt.android.qualifiers.ApplicationContext
Expand Down
10 changes: 5 additions & 5 deletions media-sample/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
android:required="false" />

<application
android:name=".components.MediaApplication"
android:name=".ui.app.MediaApplication"
android:appCategory="audio"
android:allowBackup="false"
android:icon="@drawable/ic_uamp"
Expand All @@ -54,7 +54,7 @@
android:value="true" />

<activity
android:name=".components.MediaActivity"
android:name=".ui.app.MediaActivity"
android:exported="true"
android:label="@string/horologist_sample_media_activity">
<intent-filter>
Expand All @@ -75,7 +75,7 @@
</activity>

<service
android:name=".components.PlaybackService"
android:name=".data.service.playback.PlaybackService"
android:exported="true"
android:foregroundServiceType="mediaPlayback"
>
Expand All @@ -91,7 +91,7 @@
</service>

<service
android:name=".complication.MediaStatusComplicationService"
android:name=".data.service.complication.MediaStatusComplicationService"
android:exported="true"
android:icon="@drawable/ic_uamp"
android:label="@string/horologist_sample_media_collection"
Expand All @@ -109,7 +109,7 @@
</service>

<service
android:name=".tile.MediaCollectionsTileService"
android:name=".data.service.tile.MediaCollectionsTileService"
android:description="@string/horologist_sample_app_name"
android:exported="true"
android:icon="@drawable/ic_uamp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.google.android.horologist.mediasample.system
package com.google.android.horologist.mediasample.data.log

import android.content.res.Resources
import android.util.Log
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.google.android.horologist.mediasample.complication
package com.google.android.horologist.mediasample.data.service.complication

import androidx.media3.common.MediaItem
import androidx.media3.common.Player
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021 The Android Open Source Project
* Copyright 2022 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand All @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.google.android.horologist.mediasample.complication
package com.google.android.horologist.mediasample.data.service.complication

import android.graphics.drawable.Icon
import androidx.media3.common.MediaItem
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.google.android.horologist.mediasample.components
package com.google.android.horologist.mediasample.data.service.playback

import androidx.media3.session.MediaSession
import com.google.android.horologist.media3.service.LifecycleMediaLibraryService
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.google.android.horologist.mediasample.media
package com.google.android.horologist.mediasample.data.service.playback

import androidx.media3.common.MediaItem
import androidx.media3.session.LibraryResult
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

@file:OptIn(ExperimentalHorologistTilesApi::class)

package com.google.android.horologist.mediasample.tile
package com.google.android.horologist.mediasample.data.service.tile

import android.graphics.BitmapFactory
import androidx.compose.runtime.Composable
Expand All @@ -36,8 +36,8 @@ import com.google.android.horologist.media.ui.tiles.MediaCollectionsTileRenderer
import com.google.android.horologist.media.ui.tiles.toTileColors
import com.google.android.horologist.mediasample.BuildConfig
import com.google.android.horologist.mediasample.R
import com.google.android.horologist.mediasample.components.MediaActivity
import com.google.android.horologist.mediasample.domain.PlaylistRepository
import com.google.android.horologist.mediasample.ui.app.MediaActivity
import com.google.android.horologist.mediasample.ui.app.UampColors
import com.google.android.horologist.tiles.CoroutinesTileService
import com.google.android.horologist.tiles.ExperimentalHorologistTilesApi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ import android.os.StrictMode
import com.google.android.horologist.audio.SystemAudioRepository
import com.google.android.horologist.media3.audio.AudioOutputSelector
import com.google.android.horologist.media3.audio.BluetoothSettingsOutputSelector
import com.google.android.horologist.mediasample.AppConfig
import com.google.android.horologist.mediasample.util.resetAfter
import com.google.android.horologist.mediasample.ui.AppConfig
import com.google.android.horologist.mediasample.ui.util.resetAfter
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ import com.google.android.horologist.media3.navigation.IntentBuilder
import com.google.android.horologist.media3.navigation.NavDeepLinkIntentBuilder
import com.google.android.horologist.media3.offload.AudioOffloadManager
import com.google.android.horologist.media3.rules.PlaybackRules
import com.google.android.horologist.mediasample.AppConfig
import com.google.android.horologist.mediasample.complication.DataUpdates
import com.google.android.horologist.mediasample.complication.MediaStatusComplicationService
import com.google.android.horologist.mediasample.data.log.Logging
import com.google.android.horologist.mediasample.data.service.complication.DataUpdates
import com.google.android.horologist.mediasample.data.service.complication.MediaStatusComplicationService
import com.google.android.horologist.mediasample.domain.SettingsRepository
import com.google.android.horologist.mediasample.system.Logging
import com.google.android.horologist.mediasample.util.ResourceProvider
import com.google.android.horologist.mediasample.ui.AppConfig
import com.google.android.horologist.mediasample.ui.util.ResourceProvider
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import coil.decode.SvgDecoder
import coil.disk.DiskCache
import coil.request.CachePolicy
import coil.util.DebugLogger
import com.google.android.horologist.mediasample.AppConfig
import com.google.android.horologist.mediasample.BuildConfig
import com.google.android.horologist.mediasample.data.api.UampService
import com.google.android.horologist.mediasample.data.api.WearArtworkUampService
import com.google.android.horologist.mediasample.ui.AppConfig
import com.google.android.horologist.networks.data.DataRequestRepository
import com.google.android.horologist.networks.data.RequestType
import com.google.android.horologist.networks.logging.NetworkStatusLogger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ import com.google.android.horologist.media3.logging.TransferListener
import com.google.android.horologist.media3.navigation.IntentBuilder
import com.google.android.horologist.media3.offload.AudioOffloadManager
import com.google.android.horologist.media3.rules.PlaybackRules
import com.google.android.horologist.mediasample.AppConfig
import com.google.android.horologist.mediasample.complication.DataUpdates
import com.google.android.horologist.mediasample.media.UampMediaLibrarySessionCallback
import com.google.android.horologist.mediasample.data.service.complication.DataUpdates
import com.google.android.horologist.mediasample.data.service.playback.UampMediaLibrarySessionCallback
import com.google.android.horologist.mediasample.ui.AppConfig
import com.google.android.horologist.networks.data.RequestType
import com.google.android.horologist.networks.okhttp.NetworkAwareCallFactory
import dagger.Module
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ import com.google.android.horologist.media.data.mapper.MediaMapper
import com.google.android.horologist.media.data.repository.PlayerRepositoryImpl
import com.google.android.horologist.media.repository.PlayerRepository
import com.google.android.horologist.media3.flows.buildSuspend
import com.google.android.horologist.mediasample.components.PlaybackService
import com.google.android.horologist.mediasample.data.service.playback.PlaybackService
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@
* limitations under the License.
*/

package com.google.android.horologist.mediasample
package com.google.android.horologist.mediasample.ui

import android.os.Build
import androidx.media3.exoplayer.audio.DefaultAudioSink
import com.google.android.horologist.media3.rules.PlaybackRules
import com.google.android.horologist.mediasample.BuildConfig
import com.google.android.horologist.networks.rules.NetworkingRules
import java.io.File

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
* limitations under the License.
*/

package com.google.android.horologist.mediasample.components
package com.google.android.horologist.mediasample.ui.app

import android.os.Bundle
import androidx.activity.ComponentActivity
import androidx.activity.compose.setContent
import androidx.navigation.NavHostController
import androidx.wear.compose.navigation.rememberSwipeDismissableNavController
import com.google.android.horologist.mediasample.ui.app.UampWearApp
import dagger.hilt.android.AndroidEntryPoint

@AndroidEntryPoint
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@
* limitations under the License.
*/

package com.google.android.horologist.mediasample.components
package com.google.android.horologist.mediasample.ui.app

import android.app.Application
import android.os.StrictMode
import coil.ImageLoader
import coil.ImageLoaderFactory
import com.google.android.horologist.mediasample.AppConfig
import com.google.android.horologist.mediasample.ui.AppConfig
import dagger.hilt.android.HiltAndroidApp
import javax.inject.Inject

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@ import com.google.android.horologist.media.ui.snackbar.SnackbarManager
import com.google.android.horologist.media.ui.snackbar.UiMessage
import com.google.android.horologist.media3.offload.AudioOffloadManager
import com.google.android.horologist.media3.offload.AudioOffloadStatus
import com.google.android.horologist.mediasample.AppConfig
import com.google.android.horologist.mediasample.R
import com.google.android.horologist.mediasample.domain.PlaylistRepository
import com.google.android.horologist.mediasample.domain.SettingsRepository
import com.google.android.horologist.mediasample.domain.model.Settings
import com.google.android.horologist.mediasample.util.ResourceProvider
import com.google.android.horologist.mediasample.ui.AppConfig
import com.google.android.horologist.mediasample.ui.util.ResourceProvider
import com.google.android.horologist.networks.data.DataRequestRepository
import com.google.android.horologist.networks.data.DataUsageReport
import com.google.android.horologist.networks.data.Networks
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import com.google.android.horologist.media.ui.navigation.MediaNavController.navi
import com.google.android.horologist.media.ui.navigation.MediaNavController.navigateToSettings
import com.google.android.horologist.media.ui.navigation.MediaNavController.navigateToVolume
import com.google.android.horologist.media.ui.navigation.MediaPlayerScaffold
import com.google.android.horologist.mediasample.components.MediaActivity
import com.google.android.horologist.mediasample.ui.browse.UampBrowseScreen
import com.google.android.horologist.mediasample.ui.debug.AudioDebugScreen
import com.google.android.horologist.mediasample.ui.debug.MediaInfoTimeText
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import com.google.android.horologist.media.ui.snackbar.UiMessage
import com.google.android.horologist.mediasample.R
import com.google.android.horologist.mediasample.domain.PlaylistRepository
import com.google.android.horologist.mediasample.ui.mapper.PlaylistUiModelMapper
import com.google.android.horologist.mediasample.util.ResourceProvider
import com.google.android.horologist.mediasample.ui.util.ResourceProvider
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.SharingStarted
import kotlinx.coroutines.flow.StateFlow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.google.android.horologist.mediasample.util
package com.google.android.horologist.mediasample.ui.util

import android.content.res.Resources
import androidx.annotation.StringRes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.google.android.horologist.mediasample.util
package com.google.android.horologist.mediasample.ui.util

import android.os.StrictMode

Expand Down

0 comments on commit 54c1efa

Please sign in to comment.