service: unify playback and indexer
Playback and indexing now occur in the same service through a new bridge called AuxioService. AuxioService contains the existing service instances as Fragment implementations, and then forwards typical service events to them (albeit this will drift more and more as I continue to deal with lifecycle issues). This should be the first step in enabling true service independence, as it means that the service will now immediately initialize and load music as soon as possible.
This commit is contained in:
@@ -77,22 +77,12 @@
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
||||
<!--
|
||||
Service handling querying the media database, extracting metadata, and constructing
|
||||
the music library.
|
||||
-->
|
||||
<service
|
||||
android:name=".music.system.IndexerService"
|
||||
android:foregroundServiceType="dataSync"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:exported="false"
|
||||
android:roundIcon="@mipmap/ic_launcher" />
|
||||
|
||||
<!--
|
||||
Service handling music playback, system components, and state saving.
|
||||
-->
|
||||
<service
|
||||
android:name=".playback.system.PlaybackService"
|
||||
android:name=".service.AuxioService"
|
||||
android:foregroundServiceType="mediaPlayback"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:exported="false"
|
||||
@@ -103,7 +93,7 @@
|
||||
See the class for more info.
|
||||
-->
|
||||
<receiver
|
||||
android:name=".playback.system.MediaButtonReceiver"
|
||||
android:name=".playback.service.MediaButtonReceiver"
|
||||
android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MEDIA_BUTTON" />
|
||||
|
||||
Reference in New Issue
Block a user