Loading AndroidManifest.xml +2 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ <!-- Allows Eleven to start services in foreground --> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" /> <!-- Accelerometer feature for shake to play --> <uses-feature android:name="android.hardware.sensor.accelerometer" /> Loading Loading @@ -220,6 +221,7 @@ <service android:name="org.lineageos.eleven.MusicPlaybackService" android:exported="true" android:foregroundServiceType="mediaPlayback" android:label="@string/app_name" android:process=":main"> <intent-filter> Loading src/org/lineageos/eleven/MusicPlaybackService.java +3 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.content.pm.ServiceInfo; import android.database.ContentObserver; import android.database.Cursor; import android.database.MatrixCursor; Loading Loading @@ -1017,7 +1018,8 @@ public class MusicPlaybackService extends MediaBrowserService } if (newNotifyMode == NOTIFY_MODE_FOREGROUND) { startForeground(NOTIFICATION_ID, buildNotification()); startForeground(NOTIFICATION_ID, buildNotification(), ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK); } else if (newNotifyMode == NOTIFY_MODE_BACKGROUND) { mNotificationManager.notify(NOTIFICATION_ID, buildNotification()); } Loading Loading
AndroidManifest.xml +2 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ <!-- Allows Eleven to start services in foreground --> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <uses-permission android:name="android.permission.FOREGROUND_SERVICE_MEDIA_PLAYBACK" /> <!-- Accelerometer feature for shake to play --> <uses-feature android:name="android.hardware.sensor.accelerometer" /> Loading Loading @@ -220,6 +221,7 @@ <service android:name="org.lineageos.eleven.MusicPlaybackService" android:exported="true" android:foregroundServiceType="mediaPlayback" android:label="@string/app_name" android:process=":main"> <intent-filter> Loading
src/org/lineageos/eleven/MusicPlaybackService.java +3 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,7 @@ import android.content.Intent; import android.content.IntentFilter; import android.content.SharedPreferences; import android.content.pm.PackageManager; import android.content.pm.ServiceInfo; import android.database.ContentObserver; import android.database.Cursor; import android.database.MatrixCursor; Loading Loading @@ -1017,7 +1018,8 @@ public class MusicPlaybackService extends MediaBrowserService } if (newNotifyMode == NOTIFY_MODE_FOREGROUND) { startForeground(NOTIFICATION_ID, buildNotification()); startForeground(NOTIFICATION_ID, buildNotification(), ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK); } else if (newNotifyMode == NOTIFY_MODE_BACKGROUND) { mNotificationManager.notify(NOTIFICATION_ID, buildNotification()); } Loading