Loading media/java/android/media/flags/media_better_together.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -27,3 +27,10 @@ flag { description: "Disables the broadcast receiver that prevents scanning when the screen is off." bug: "304234628" } flag { namespace: "media_solutions" name: "fallback_to_default_handling_when_media_session_has_fixed_volume_handling" description: "Fallbacks to the default handling for volume adjustment when media session has fixed volume handling and its app is in the foreground and setting a media controller." bug: "293743975" } services/core/java/com/android/server/media/MediaSessionService.java +10 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.media; import static android.Manifest.permission.INTERACT_ACROSS_USERS_FULL; import static android.os.UserHandle.ALL; import static android.os.UserHandle.CURRENT; import static com.android.server.media.MediaKeyDispatcher.KEY_EVENT_LONG_PRESS; import static com.android.server.media.MediaKeyDispatcher.isDoubleTapOverridden; import static com.android.server.media.MediaKeyDispatcher.isLongPressOverridden; Loading Loading @@ -1904,6 +1905,15 @@ public class MediaSessionService extends SystemService implements Monitor { keyEvent, AudioManager.USE_DEFAULT_STREAM_TYPE, false); return; } if (Flags.fallbackToDefaultHandlingWhenMediaSessionHasFixedVolumeHandling() && !record.canHandleVolumeKey()) { Log.d(TAG, "Session with packageName=" + record.getPackageName() + " doesn't support volume adjustment." + " Fallbacks to the default handling."); dispatchVolumeKeyEventLocked(packageName, opPackageName, pid, uid, true, keyEvent, AudioManager.USE_DEFAULT_STREAM_TYPE, false); return; } switch (keyEvent.getAction()) { case KeyEvent.ACTION_DOWN: { int direction = 0; Loading Loading
media/java/android/media/flags/media_better_together.aconfig +7 −0 Original line number Diff line number Diff line Loading @@ -27,3 +27,10 @@ flag { description: "Disables the broadcast receiver that prevents scanning when the screen is off." bug: "304234628" } flag { namespace: "media_solutions" name: "fallback_to_default_handling_when_media_session_has_fixed_volume_handling" description: "Fallbacks to the default handling for volume adjustment when media session has fixed volume handling and its app is in the foreground and setting a media controller." bug: "293743975" }
services/core/java/com/android/server/media/MediaSessionService.java +10 −0 Original line number Diff line number Diff line Loading @@ -19,6 +19,7 @@ package com.android.server.media; import static android.Manifest.permission.INTERACT_ACROSS_USERS_FULL; import static android.os.UserHandle.ALL; import static android.os.UserHandle.CURRENT; import static com.android.server.media.MediaKeyDispatcher.KEY_EVENT_LONG_PRESS; import static com.android.server.media.MediaKeyDispatcher.isDoubleTapOverridden; import static com.android.server.media.MediaKeyDispatcher.isLongPressOverridden; Loading Loading @@ -1904,6 +1905,15 @@ public class MediaSessionService extends SystemService implements Monitor { keyEvent, AudioManager.USE_DEFAULT_STREAM_TYPE, false); return; } if (Flags.fallbackToDefaultHandlingWhenMediaSessionHasFixedVolumeHandling() && !record.canHandleVolumeKey()) { Log.d(TAG, "Session with packageName=" + record.getPackageName() + " doesn't support volume adjustment." + " Fallbacks to the default handling."); dispatchVolumeKeyEventLocked(packageName, opPackageName, pid, uid, true, keyEvent, AudioManager.USE_DEFAULT_STREAM_TYPE, false); return; } switch (keyEvent.getAction()) { case KeyEvent.ACTION_DOWN: { int direction = 0; Loading