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

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

Snap for 6488384 from 816ceadd to rvc-release

Change-Id: I949fbb868f66ead3c9feacb9e4ec2ea0626ebb1a
parents 698e37c7 816ceadd
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -26,10 +26,10 @@
    <string name="airplane_error_title" msgid="2683839635115739939">"विमान मोड"</string>
    <string name="airplane_error_msg" msgid="8698965595254137230">"तुम्ही विमान मोड मध्ये ब्लूटूथ वापरू शकत नाही."</string>
    <string name="bt_enable_title" msgid="8657832550503456572"></string>
    <string name="bt_enable_line1" msgid="7203551583048149">"ब्लूटूथ सेवांचा वापर करण्‍यासाठी, तुम्ही प्रथम ब्लूटूथ चालू करा."</string>
    <string name="bt_enable_line2" msgid="4341936569415937994">"आता ब्लूटूथ चालू करायचे?"</string>
    <string name="bt_enable_line1" msgid="7203551583048149">"ब्लूटूथ सेवांचा वापर करण्‍यासाठी, तुम्ही प्रथम ब्लूटूथ सुरू करा."</string>
    <string name="bt_enable_line2" msgid="4341936569415937994">"आता ब्लूटूथ सुरू करायचे?"</string>
    <string name="bt_enable_cancel" msgid="1988832367505151727">"रद्द करा"</string>
    <string name="bt_enable_ok" msgid="3432462749994538265">"चालू करा"</string>
    <string name="bt_enable_ok" msgid="3432462749994538265">"सुरू करा"</string>
    <string name="incoming_file_confirm_title" msgid="8139874248612182627">"फाइल स्थानांतरण"</string>
    <string name="incoming_file_confirm_content" msgid="2752605552743148036">"येणारी फाईल स्‍वीकारायची?"</string>
    <string name="incoming_file_confirm_cancel" msgid="2973321832477704805">"नकार द्या"</string>
@@ -76,7 +76,7 @@
    <string name="not_exist_file" msgid="3489434189599716133">"फाइल नाही"</string>
    <string name="not_exist_file_desc" msgid="4059531573790529229">"फाइल अस्‍तित्वात नाही. \n"</string>
    <string name="enabling_progress_title" msgid="436157952334723406">"कृपया प्रतीक्षा करा..."</string>
    <string name="enabling_progress_content" msgid="4601542238119927904">"ब्लूटूथ चालू करत आहे…"</string>
    <string name="enabling_progress_content" msgid="4601542238119927904">"ब्लूटूथ सुरू करत आहे…"</string>
    <string name="bt_toast_1" msgid="972182708034353383">"फाइल मिळेल. सूचना पॅनेल मधील प्रगती तपासा."</string>
    <string name="bt_toast_2" msgid="8602553334099066582">"फाइल प्राप्त होऊ शकत नाही."</string>
    <string name="bt_toast_3" msgid="6707884165086862518">"\"<xliff:g id="SENDER">%1$s</xliff:g>\" कडील फाइल प्राप्त करणे थांबविले"</string>
+7 −15
Original line number Diff line number Diff line
@@ -81,6 +81,7 @@ final class HearingAidStateMachine extends StateMachine {
    private Connecting mConnecting;
    private Disconnecting mDisconnecting;
    private Connected mConnected;
    private int mConnectionState = BluetoothProfile.STATE_DISCONNECTED;
    private int mLastConnectionState = -1;

    private HearingAidService mService;
@@ -132,6 +133,7 @@ final class HearingAidStateMachine extends StateMachine {
        public void enter() {
            Log.i(TAG, "Enter Disconnected(" + mDevice + "): " + messageWhatToString(
                    getCurrentMessage().what));
            mConnectionState = BluetoothProfile.STATE_DISCONNECTED;

            removeDeferredMessages(DISCONNECT);

@@ -239,6 +241,7 @@ final class HearingAidStateMachine extends StateMachine {
            Log.i(TAG, "Enter Connecting(" + mDevice + "): "
                    + messageWhatToString(getCurrentMessage().what));
            sendMessageDelayed(CONNECT_TIMEOUT, sConnectTimeoutMs);
            mConnectionState = BluetoothProfile.STATE_CONNECTING;
            broadcastConnectionState(BluetoothProfile.STATE_CONNECTING, mLastConnectionState);
        }

@@ -329,6 +332,7 @@ final class HearingAidStateMachine extends StateMachine {
            Log.i(TAG, "Enter Disconnecting(" + mDevice + "): "
                    + messageWhatToString(getCurrentMessage().what));
            sendMessageDelayed(CONNECT_TIMEOUT, sConnectTimeoutMs);
            mConnectionState = BluetoothProfile.STATE_DISCONNECTING;
            broadcastConnectionState(BluetoothProfile.STATE_DISCONNECTING, mLastConnectionState);
        }

@@ -426,6 +430,7 @@ final class HearingAidStateMachine extends StateMachine {
        public void enter() {
            Log.i(TAG, "Enter Connected(" + mDevice + "): "
                    + messageWhatToString(getCurrentMessage().what));
            mConnectionState = BluetoothProfile.STATE_CONNECTED;
            removeDeferredMessages(CONNECT);
            broadcastConnectionState(BluetoothProfile.STATE_CONNECTED, mLastConnectionState);
        }
@@ -496,20 +501,7 @@ final class HearingAidStateMachine extends StateMachine {
    }

    int getConnectionState() {
        String currentState = getCurrentState().getName();
        switch (currentState) {
            case "Disconnected":
                return BluetoothProfile.STATE_DISCONNECTED;
            case "Connecting":
                return BluetoothProfile.STATE_CONNECTING;
            case "Connected":
                return BluetoothProfile.STATE_CONNECTED;
            case "Disconnecting":
                return BluetoothProfile.STATE_DISCONNECTING;
            default:
                Log.e(TAG, "Bad currentState: " + currentState);
                return BluetoothProfile.STATE_DISCONNECTED;
        }
        return mConnectionState;
    }

    BluetoothDevice getDevice() {
@@ -517,7 +509,7 @@ final class HearingAidStateMachine extends StateMachine {
    }

    synchronized boolean isConnected() {
        return getCurrentState() == mConnected;
        return (getConnectionState() == BluetoothProfile.STATE_CONNECTED);
    }

    // This method does not check for error condition (newState == prevState)
+8 −8
Original line number Diff line number Diff line
@@ -125,6 +125,7 @@ public class HeadsetStateMachine extends StateMachine {
    private final AudioConnecting mAudioConnecting = new AudioConnecting();
    private final AudioDisconnecting mAudioDisconnecting = new AudioDisconnecting();
    private HeadsetStateBase mPrevState;
    private HeadsetStateBase mCurrentState;

    // Run time dependencies
    private final HeadsetService mHeadsetService;
@@ -222,7 +223,7 @@ public class HeadsetStateMachine extends StateMachine {

    public void dump(StringBuilder sb) {
        ProfileService.println(sb, "  mCurrentDevice: " + mDevice);
        ProfileService.println(sb, "  mCurrentState: " + getCurrentState());
        ProfileService.println(sb, "  mCurrentState: " + mCurrentState);
        ProfileService.println(sb, "  mPrevState: " + mPrevState);
        ProfileService.println(sb, "  mConnectionState: " + getConnectionState());
        ProfileService.println(sb, "  mAudioState: " + getAudioState());
@@ -253,6 +254,7 @@ public class HeadsetStateMachine extends StateMachine {
    private abstract class HeadsetStateBase extends State {
        @Override
        public void enter() {
            mCurrentState = this;
            // Crash if mPrevState is null and state is not Disconnected
            if (!(this instanceof Disconnected) && mPrevState == null) {
                throw new IllegalStateException("mPrevState is null on enter()");
@@ -1439,11 +1441,10 @@ public class HeadsetStateMachine extends StateMachine {
     */
    @VisibleForTesting
    public synchronized int getConnectionState() {
        HeadsetStateBase state = (HeadsetStateBase) getCurrentState();
        if (state == null) {
        if (mCurrentState == null) {
            return BluetoothHeadset.STATE_DISCONNECTED;
        }
        return state.getConnectionStateInt();
        return mCurrentState.getConnectionStateInt();
    }

    /**
@@ -1454,11 +1455,10 @@ public class HeadsetStateMachine extends StateMachine {
     * {@link BluetoothHeadset#STATE_AUDIO_CONNECTED}
     */
    public synchronized int getAudioState() {
        HeadsetStateBase state = (HeadsetStateBase) getCurrentState();
        if (state == null) {
        if (mCurrentState == null) {
            return BluetoothHeadset.STATE_AUDIO_DISCONNECTED;
        }
        return state.getAudioStateInt();
        return mCurrentState.getAudioStateInt();
    }

    public long getConnectingTimestampMs() {
@@ -1623,7 +1623,7 @@ public class HeadsetStateMachine extends StateMachine {
        }
        if (volumeType == HeadsetHalConstants.VOLUME_TYPE_SPK) {
            mSpeakerVolume = volume;
            int flag = (getCurrentState() == mAudioOn) ? AudioManager.FLAG_SHOW_UI : 0;
            int flag = (mCurrentState == mAudioOn) ? AudioManager.FLAG_SHOW_UI : 0;
            mSystemInterface.getAudioManager()
                    .setStreamVolume(AudioManager.STREAM_BLUETOOTH_SCO, volume, flag);
        } else if (volumeType == HeadsetHalConstants.VOLUME_TYPE_MIC) {