summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-06-13 02:55:39 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2024-06-13 02:55:39 +0000
commite092faf83e514fbdf0fc33ec4ef42d5260e2256d (patch)
tree528a57a0deba137eac25ac20714cc138200309c2
parentc3e77427be890919dd870ac8e40d3220d24f7e89 (diff)
parent31dde4f985f6ff275152761762a5a03e04744422 (diff)
Merge "Removed commented out code related to ForegroundAudioControl" into main
-rw-r--r--services/core/java/com/android/server/am/OomAdjuster.java12
1 files changed, 2 insertions, 10 deletions
diff --git a/services/core/java/com/android/server/am/OomAdjuster.java b/services/core/java/com/android/server/am/OomAdjuster.java
index e8af82efecbc..3b73e0690a83 100644
--- a/services/core/java/com/android/server/am/OomAdjuster.java
+++ b/services/core/java/com/android/server/am/OomAdjuster.java
@@ -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;
}