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

Commit 8648cd94 authored by William Escande's avatar William Escande Committed by Automerger Merge Worker
Browse files

Merge changes Ia3903291,I150d1a5a,I023b567d,I7c15a137,I893db9ca into main am: eb180943

parents e6ffeb21 eb180943
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -326,6 +326,7 @@ android_app {
            "-Xep:AlmostJavadoc:ERROR",
            "-Xep:AlreadyChecked:ERROR",
            "-Xep:AndroidFrameworkBinderIdentity:ERROR",
            "-Xep:AndroidFrameworkEfficientParcelable:ERROR",
            "-Xep:AndroidFrameworkEfficientStrings:ERROR",
            "-Xep:AndroidFrameworkRequiresPermission:ERROR",
            "-Xep:BadImport:ERROR",
@@ -340,12 +341,14 @@ android_app {
            "-Xep:InlineMeInliner:ERROR",
            "-Xep:InvalidBlockTag:ERROR",
            "-Xep:InvalidParam:ERROR",
            "-Xep:JavaUtilDate:ERROR",
            "-Xep:LoopOverCharArray:ERROR",
            "-Xep:MissingCasesInEnumSwitch:ERROR",
            "-Xep:MixedMutabilityReturnType:ERROR",
            "-Xep:MockNotUsedInProduction:ERROR",
            "-Xep:ModifyCollectionInEnhancedForLoop:ERROR",
            "-Xep:NarrowCalculation:ERROR",
            "-Xep:NarrowingCompoundAssignment:ERROR",
            "-Xep:NonApiType:ERROR",
            "-Xep:NonAtomicVolatileUpdate:ERROR",
            "-Xep:NonCanonicalType:ERROR",
@@ -356,13 +359,16 @@ android_app {
            "-Xep:ReturnAtTheEndOfVoidFunction:ERROR",
            "-Xep:StringCaseLocaleUsage:ERROR",
            "-Xep:StringCharset:ERROR",
            "-Xep:SynchronizeOnNonFinalField:ERROR",
            "-Xep:ToStringReturnsNull:ERROR",
            "-Xep:UndefinedEquals:ERROR",
            "-Xep:UnnecessaryStringBuilder:ERROR",
            "-Xep:UnrecognisedJavadocTag:ERROR",
            "-Xep:UnusedMethod:ERROR",
            "-Xep:UnusedNestedClass:ERROR",
            "-Xep:UnusedVariable:ERROR",
            "-Xep:WaitNotInLoop:ERROR",
            "-Xep:WakelockReleasedDangerously:ERROR",

            // After fixing this errorprone, we decided to not merge the change.
            // It is not very readable and the benefits are minimal when looking
+7 −4
Original line number Diff line number Diff line
@@ -106,10 +106,13 @@ class AvrcpPlayer {

    public void setPlayStatus(int playStatus) {
        if (mPlayTime != PlaybackStateCompat.PLAYBACK_POSITION_UNKNOWN) {
            mPlayTime +=
                    mPlaySpeed
            mPlayTime =
                    (long)
                            (mPlayTime
                                    + mPlaySpeed
                                            * (SystemClock.elapsedRealtime()
                                    - mPlaybackStateCompat.getLastPositionUpdateTime());
                                                    - mPlaybackStateCompat
                                                            .getLastPositionUpdateTime()));
        }
        mPlayStatus = playStatus;
        switch (mPlayStatus) {
+1 −0
Original line number Diff line number Diff line
@@ -114,6 +114,7 @@ public class BipDateTime {
    }

    @Override
    @SuppressWarnings("UndefinedEquals") // Related to java Date API that should be clean repo wide
    public boolean equals(Object o) {
        if (o == this) {
            return true;
+20 −4
Original line number Diff line number Diff line
@@ -258,7 +258,11 @@ public class HeadsetService extends ProfileService {
                mStateMachinesThreadHandler.removeCallbacks(mVoiceRecognitionTimeoutEvent);
                mVoiceRecognitionTimeoutEvent = null;
                if (mSystemInterface.getVoiceRecognitionWakeLock().isHeld()) {
                    try {
                        mSystemInterface.getVoiceRecognitionWakeLock().release();
                    } catch (RuntimeException e) {
                        Log.d(TAG, "non properly release getVoiceRecognitionWakeLock", e);
                    }
                }
            }
            // Step 5: Destroy state machines
@@ -1120,7 +1124,11 @@ public class HeadsetService extends ProfileService {
                mStateMachinesThreadHandler.removeCallbacks(mVoiceRecognitionTimeoutEvent);
                mVoiceRecognitionTimeoutEvent = null;
                if (mSystemInterface.getVoiceRecognitionWakeLock().isHeld()) {
                    try {
                        mSystemInterface.getVoiceRecognitionWakeLock().release();
                    } catch (RuntimeException e) {
                        Log.d(TAG, "non properly release getVoiceRecognitionWakeLock", e);
                    }
                }
                pendingRequestByHeadset = true;
            }
@@ -1795,7 +1803,11 @@ public class HeadsetService extends ProfileService {
        public void run() {
            synchronized (mStateMachines) {
                if (mSystemInterface.getVoiceRecognitionWakeLock().isHeld()) {
                    try {
                        mSystemInterface.getVoiceRecognitionWakeLock().release();
                    } catch (RuntimeException e) {
                        Log.d(TAG, "non properly release getVoiceRecognitionWakeLock", e);
                    }
                }
                mVoiceRecognitionTimeoutEvent = null;
                doForStateMachine(
@@ -1918,7 +1930,11 @@ public class HeadsetService extends ProfileService {
            }
            if (mVoiceRecognitionTimeoutEvent != null) {
                if (mSystemInterface.getVoiceRecognitionWakeLock().isHeld()) {
                    try {
                        mSystemInterface.getVoiceRecognitionWakeLock().release();
                    } catch (RuntimeException e) {
                        Log.d(TAG, "non properly release getVoiceRecognitionWakeLock", e);
                    }
                }
                mStateMachinesThreadHandler.removeCallbacks(mVoiceRecognitionTimeoutEvent);

+6 −4
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.bluetooth.hfpclient;

import static android.bluetooth.BluetoothUtils.writeStringToParcel;

import android.bluetooth.BluetoothDevice;
import android.os.Parcel;
import android.os.Parcelable;
@@ -276,7 +278,7 @@ public final class HfpClientCall implements Parcelable {
                @Override
                public HfpClientCall createFromParcel(Parcel in) {
                    return new HfpClientCall(
                            (BluetoothDevice) in.readParcelable(null),
                            BluetoothDevice.CREATOR.createFromParcel(in),
                            in.readInt(),
                            UUID.fromString(in.readString()),
                            in.readInt(),
@@ -294,11 +296,11 @@ public final class HfpClientCall implements Parcelable {

    @Override
    public void writeToParcel(Parcel out, int flags) {
        out.writeParcelable(mDevice, 0);
        mDevice.writeToParcel(out, flags);
        out.writeInt(mId);
        out.writeString(mUUID.toString());
        writeStringToParcel(out, mUUID.toString());
        out.writeInt(mState);
        out.writeString(mNumber);
        writeStringToParcel(out, mNumber);
        out.writeInt(mMultiParty ? 1 : 0);
        out.writeInt(mOutgoing ? 1 : 0);
        out.writeInt(mInBandRing ? 1 : 0);
Loading