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

Commit a5f3556c authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 5849705 from 9c1740ab to qt-qpr1-release

Change-Id: Ic78a90e7752e7f6f31fca13207f28689c5801d7d
parents 17f88df5 9c1740ab
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@
    <string name="incoming_file_confirm_ok" msgid="281462442932231475">"అంగీకరిస్తున్నాను"</string>
    <string name="incoming_file_confirm_timeout_ok" msgid="1414676773249857278">"సరే"</string>
    <string name="incoming_file_confirm_timeout_content" msgid="172779756093975981">"\"<xliff:g id="SENDER">%1$s</xliff:g>\" పంపిన ఇన్‌కమింగ్ ఫైల్‌ను అంగీకరిస్తున్నప్పుడు గడువు సమయం ముగిసింది"</string>
    <string name="incoming_file_confirm_Notification_title" msgid="5573329005298936903">"ఫైల్ స్వీకరణ"</string>
    <string name="incoming_file_confirm_Notification_title" msgid="5573329005298936903">"ఇన్‌క‌మింగ్‌ ఫైల్"</string>
    <string name="incoming_file_confirm_Notification_content" msgid="3359694069319644738">"<xliff:g id="SENDER">%1$s</xliff:g> <xliff:g id="FILE">%2$s</xliff:g> ఫైల్ పంపడానికి సిద్ధంగా ఉన్నారు"</string>
    <string name="notification_receiving" msgid="4674648179652543984">"బ్లూటూత్ భాగస్వామ్యం: <xliff:g id="FILE">%1$s</xliff:g>ను స్వీకరిస్తోంది"</string>
    <string name="notification_received" msgid="3324588019186687985">"బ్లూటూత్ భాగస్వామ్యం: <xliff:g id="FILE">%1$s</xliff:g> స్వీకరించబడింది"</string>
@@ -104,7 +104,7 @@
    <string name="opp_notification_group" msgid="3486303082135789982">"బ్లూటూత్ భాగస్వామ్యం"</string>
    <string name="download_success" msgid="7036160438766730871">"<xliff:g id="FILE_SIZE">%1$s</xliff:g> స్వీకరించడం పూర్తయింది."</string>
    <string name="upload_success" msgid="4014469387779648949">"<xliff:g id="FILE_SIZE">%1$s</xliff:g> పంపడం పూర్తయింది."</string>
    <string name="inbound_history_title" msgid="6940914942271327563">"స్వీకృత బదిలీలు"</string>
    <string name="inbound_history_title" msgid="6940914942271327563">"ఇన్‌బౌండ్ బదిలీలు"</string>
    <string name="outbound_history_title" msgid="4279418703178140526">"అవుట్‌బౌండ్ బదిలీలు"</string>
    <string name="no_transfers" msgid="3482965619151865672">"బదిలీ చరిత్ర ఖాళీగా ఉంది."</string>
    <string name="transfer_clear_dlg_msg" msgid="1712376797268438075">"జాబితా నుండి అన్ని అంశాలు క్లియర్ చేయబడతాయి."</string>
+4 −1
Original line number Diff line number Diff line
@@ -24,6 +24,8 @@ import android.media.AudioFocusRequest;
import android.media.AudioManager;
import android.media.AudioManager.OnAudioFocusChangeListener;
import android.media.MediaPlayer;
import android.media.session.PlaybackState;

import android.os.Handler;
import android.os.Message;
import android.util.Log;
@@ -225,7 +227,8 @@ public class A2dpSinkStreamHandler extends Handler {
                break;

            case DELAYED_PAUSE:
                if (mStreamAvailable && !inCallFromStreamingDevice()) {
                if (BluetoothMediaBrowserService.getPlaybackState()
                            == PlaybackState.STATE_PLAYING && !inCallFromStreamingDevice()) {
                    sendAvrcpPause();
                    mSentPause = true;
                    mStreamAvailable = false;
+14 −0
Original line number Diff line number Diff line
@@ -176,6 +176,20 @@ public class BluetoothMediaBrowserService extends MediaBrowserService {
        }
    }

    /**
     * Get playback state
     */
    public static synchronized int getPlaybackState() {
        if (sBluetoothMediaBrowserService != null) {
            PlaybackState currentPlaybackState =
                    sBluetoothMediaBrowserService.mSession.getController().getPlaybackState();
            if (currentPlaybackState != null) {
                return currentPlaybackState.getState();
            }
        }
        return PlaybackState.STATE_ERROR;
    }

    /**
     * Get object for controlling playback
     */
+18 −0
Original line number Diff line number Diff line
@@ -194,6 +194,24 @@ public class A2dpSinkStreamHandlerTest {
        verify(mMockA2dpSink, times(1)).informAudioTrackGainNative(0);
    }

    @Test
    public void testFocusGainTransient() {
        // Focus was lost then regained.
        testSnkPlay();
        mStreamHandler.handleMessage(
                mStreamHandler.obtainMessage(A2dpSinkStreamHandler.AUDIO_FOCUS_CHANGE,
                        AudioManager.AUDIOFOCUS_LOSS_TRANSIENT));
        mStreamHandler.handleMessage(
                mStreamHandler.obtainMessage(A2dpSinkStreamHandler.DELAYED_PAUSE));
        mStreamHandler.handleMessage(
                mStreamHandler.obtainMessage(A2dpSinkStreamHandler.AUDIO_FOCUS_CHANGE,
                        AudioManager.AUDIOFOCUS_GAIN));
        verify(mMockAudioManager, times(0)).abandonAudioFocus(any());
        verify(mMockA2dpSink, times(0)).informAudioFocusStateNative(0);
        verify(mMockA2dpSink, times(1)).informAudioTrackGainNative(0);
        verify(mMockA2dpSink, times(2)).informAudioTrackGainNative(1.0f);
    }

    @Test
    public void testFocusLost() {
        // Focus was lost permanently, expect streaming to stop.
+1 −1

File changed.

Contains only whitespace changes.