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

Commit 31dde4f9 authored by Michael Wachenschwanz's avatar Michael Wachenschwanz
Browse files

Removed commented out code related to ForegroundAudioControl

Bug: 335373208
Test: builds
Change-Id: I0b15030650fe3fbe393a8b8ec307ede4dfccf591
parent d8a22bce
Loading
Loading
Loading
Loading
+2 −10
Original line number Diff line number Diff line
@@ -69,9 +69,7 @@ import static android.app.ActivityManagerInternal.OOM_ADJ_REASON_UNBIND_SERVICE;
import static android.content.Context.BIND_TREAT_LIKE_VISIBLE_FOREGROUND_SERVICE;
import static android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_CAMERA;
import static android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_LOCATION;
import static android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK;
import static android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_MICROPHONE;
import static android.content.pm.ServiceInfo.FOREGROUND_SERVICE_TYPE_PHONE_CALL;
import static android.media.audio.Flags.roForegroundAudioControl;
import static android.os.Process.THREAD_GROUP_BACKGROUND;
import static android.os.Process.THREAD_GROUP_DEFAULT;
@@ -2309,14 +2307,8 @@ public class OomAdjuster {
                                    != 0 ? PROCESS_CAPABILITY_FOREGROUND_LOCATION : 0;

                    if (roForegroundAudioControl()) { // flag check
                        // TODO revisit restriction of FOREGROUND_AUDIO_CONTROL when it can be
                        //      limited to specific FGS types
                        //final int fgsAudioType = FOREGROUND_SERVICE_TYPE_MEDIA_PLAYBACK
                        //        | FOREGROUND_SERVICE_TYPE_CAMERA
                        //        | FOREGROUND_SERVICE_TYPE_MICROPHONE
                        //        | FOREGROUND_SERVICE_TYPE_PHONE_CALL;
                        //capabilityFromFGS |= (psr.getForegroundServiceTypes() & fgsAudioType) != 0
                        //        ? PROCESS_CAPABILITY_FOREGROUND_AUDIO_CONTROL : 0;
                        // TODO(b/335373208) - revisit restriction of FOREGROUND_AUDIO_CONTROL
                        //  when it can be limited to specific FGS types
                        capabilityFromFGS |= PROCESS_CAPABILITY_FOREGROUND_AUDIO_CONTROL;
                    }