Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fe366f31 authored by Georg Veichtlbauer's avatar Georg Veichtlbauer
Browse files

Eleven: Set type for FGS

Required by U.

Change-Id: Icc6ea6b4b522c50f4b6900347dd53f4390ac5583
parent 9fcc8d3c
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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" />
@@ -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>
+3 −1
Original line number Diff line number Diff line
@@ -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;
@@ -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());
        }