summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-02-03 00:00:58 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2024-02-03 00:00:58 +0000
commitbd0fada7f1b9e5676298092679cdabe9f7fcabcd (patch)
tree9d2cfab8020e9e6aeeffa8f322e495ba56687aac
parentaf5c5d1689718e29f149b5fcb0e76de9ea2c8b41 (diff)
parent14c33246f6fd227902ec858874333b133592c595 (diff)
downloadMedia-simpleperf-release.tar.gz
Snap for 11400057 from 14c33246f6fd227902ec858874333b133592c595 to simpleperf-releasesimpleperf-release
Change-Id: I48ad83fd5874b49d56e4be808aec88566df583b2
-rw-r--r--apex/OWNERS1
-rw-r--r--apex/framework/Android.bp22
-rw-r--r--apex/service/Android.bp3
-rw-r--r--apex/service/java/com/android/server/media/MediaCommunicationService.java14
4 files changed, 12 insertions, 28 deletions
diff --git a/apex/OWNERS b/apex/OWNERS
index 2c5965c..6a85773 100644
--- a/apex/OWNERS
+++ b/apex/OWNERS
@@ -3,7 +3,6 @@ hdmoon@google.com
jinpark@google.com
klhyun@google.com
lnilsson@google.com
-sungsoo@google.com
# go/android-fwk-media-solutions for info on areas of ownership.
include platform/frameworks/av:/media/janitors/media_solutions_OWNERS
diff --git a/apex/framework/Android.bp b/apex/framework/Android.bp
index 80595f4..1c347d4 100644
--- a/apex/framework/Android.bp
+++ b/apex/framework/Android.bp
@@ -57,6 +57,9 @@ java_library {
"//frameworks/base",
"//frameworks/base/apex/media/service",
],
+ lint: {
+ baseline_filename: "lint-baseline.xml",
+ },
}
filegroup {
@@ -148,6 +151,7 @@ java_sdk_library {
],
lint: {
strict_updatability_linting: true,
+ baseline_filename: "lint-baseline.xml",
},
min_sdk_version: "29",
permitted_packages: [
@@ -178,21 +182,3 @@ cc_library_shared {
],
min_sdk_version: "29",
}
-
-java_api_contribution {
- name: "framework-media-public-stubs",
- api_surface: "public",
- api_file: "api/current.txt",
- visibility: [
- "//build/orchestrator/apis",
- ],
-}
-
-java_api_contribution {
- name: "framework-media-module-lib-stubs",
- api_surface: "module-lib",
- api_file: "api/module-lib-current.txt",
- visibility: [
- "//build/orchestrator/apis",
- ],
-}
diff --git a/apex/service/Android.bp b/apex/service/Android.bp
index 011cdc6..580c67c 100644
--- a/apex/service/Android.bp
+++ b/apex/service/Android.bp
@@ -33,7 +33,7 @@ java_sdk_library {
defaults: [
"framework-system-server-module-defaults",
"framework-system-server-module-optimize-defaults",
- ],
+ ],
srcs: [
":service-media-s-sources",
],
@@ -48,6 +48,7 @@ java_sdk_library {
min_sdk_version: "29", // TODO: We may need to bump this at some point.
lint: {
strict_updatability_linting: true,
+ baseline_filename: "lint-baseline.xml",
},
apex_available: [
"com.android.media",
diff --git a/apex/service/java/com/android/server/media/MediaCommunicationService.java b/apex/service/java/com/android/server/media/MediaCommunicationService.java
index b88e586..3ebb40b 100644
--- a/apex/service/java/com/android/server/media/MediaCommunicationService.java
+++ b/apex/service/java/com/android/server/media/MediaCommunicationService.java
@@ -272,20 +272,15 @@ public class MediaCommunicationService extends SystemService {
}
}
- void onSessionDied(Session2Record session) {
+ private void removeSessionRecord(Session2Record session) {
if (DEBUG) {
- Log.d(TAG, "Destroying " + session);
- }
- if (session.isClosed()) {
- Log.w(TAG, "Destroying already destroyed session. Ignoring.");
- return;
+ Log.d(TAG, "Removing " + session);
}
FullUserRecord user = session.getFullUser();
if (user != null) {
user.removeSession(session);
}
- session.close();
}
void onSessionPlaybackStateChanged(Session2Record session, boolean promotePriority) {
@@ -681,10 +676,13 @@ public class MediaCommunicationService extends SystemService {
}
synchronized (mSession2RecordLock) {
mIsConnected = false;
+ // As per onDisconnected documentation, we do not need to call close() after
+ // onDisconnected is called.
+ mIsClosed = true;
}
MediaCommunicationService service = mServiceRef.get();
if (service != null) {
- service.onSessionDied(Session2Record.this);
+ service.removeSessionRecord(Session2Record.this);
}
}