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

Commit e092faf8 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Removed commented out code related to ForegroundAudioControl" into main

parents c3e77427 31dde4f9
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;
                    }