Loading android/app/Android.bp +6 −0 Original line number Diff line number Diff line Loading @@ -327,6 +327,7 @@ android_app { "-Xep:AlmostJavadoc:ERROR", "-Xep:AlreadyChecked:ERROR", "-Xep:AndroidFrameworkBinderIdentity:ERROR", "-Xep:AndroidFrameworkEfficientParcelable:ERROR", "-Xep:AndroidFrameworkEfficientStrings:ERROR", "-Xep:AndroidFrameworkRequiresPermission:ERROR", "-Xep:BadImport:ERROR", Loading @@ -341,12 +342,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", Loading @@ -357,13 +360,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 Loading android/app/src/com/android/bluetooth/avrcpcontroller/AvrcpPlayer.java +7 −4 Original line number Diff line number Diff line Loading @@ -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) { Loading android/app/src/com/android/bluetooth/avrcpcontroller/bip/BipDateTime.java +1 −0 Original line number Diff line number Diff line Loading @@ -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; Loading android/app/src/com/android/bluetooth/hearingaid/HearingAidService.java +2 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import android.os.Handler; import android.os.HandlerThread; import android.os.Looper; import android.os.ParcelUuid; import android.os.UserHandle; import android.sysprop.BluetoothProperties; import android.util.Log; Loading Loading @@ -662,7 +663,7 @@ public class HearingAidService extends ProfileService { intent.addFlags( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); sendBroadcast(intent, BLUETOOTH_CONNECT); sendBroadcastAsUser(intent, UserHandle.ALL, BLUETOOTH_CONNECT); } /* Notifications of audio device disconnection events. */ Loading android/app/src/com/android/bluetooth/hearingaid/HearingAidStateMachine.java +6 −2 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import android.bluetooth.BluetoothProfile; import android.content.Intent; import android.os.Looper; import android.os.Message; import android.os.UserHandle; import android.util.Log; import com.android.bluetooth.Utils; Loading Loading @@ -556,8 +557,11 @@ final class HearingAidStateMachine extends StateMachine { intent.addFlags( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); mService.sendBroadcast( intent, BLUETOOTH_CONNECT, Utils.getTempBroadcastOptions().toBundle()); mService.sendBroadcastAsUser( intent, UserHandle.ALL, BLUETOOTH_CONNECT, Utils.getTempBroadcastOptions().toBundle()); } private static String messageWhatToString(int what) { Loading Loading
android/app/Android.bp +6 −0 Original line number Diff line number Diff line Loading @@ -327,6 +327,7 @@ android_app { "-Xep:AlmostJavadoc:ERROR", "-Xep:AlreadyChecked:ERROR", "-Xep:AndroidFrameworkBinderIdentity:ERROR", "-Xep:AndroidFrameworkEfficientParcelable:ERROR", "-Xep:AndroidFrameworkEfficientStrings:ERROR", "-Xep:AndroidFrameworkRequiresPermission:ERROR", "-Xep:BadImport:ERROR", Loading @@ -341,12 +342,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", Loading @@ -357,13 +360,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 Loading
android/app/src/com/android/bluetooth/avrcpcontroller/AvrcpPlayer.java +7 −4 Original line number Diff line number Diff line Loading @@ -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) { Loading
android/app/src/com/android/bluetooth/avrcpcontroller/bip/BipDateTime.java +1 −0 Original line number Diff line number Diff line Loading @@ -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; Loading
android/app/src/com/android/bluetooth/hearingaid/HearingAidService.java +2 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import android.os.Handler; import android.os.HandlerThread; import android.os.Looper; import android.os.ParcelUuid; import android.os.UserHandle; import android.sysprop.BluetoothProperties; import android.util.Log; Loading Loading @@ -662,7 +663,7 @@ public class HearingAidService extends ProfileService { intent.addFlags( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); sendBroadcast(intent, BLUETOOTH_CONNECT); sendBroadcastAsUser(intent, UserHandle.ALL, BLUETOOTH_CONNECT); } /* Notifications of audio device disconnection events. */ Loading
android/app/src/com/android/bluetooth/hearingaid/HearingAidStateMachine.java +6 −2 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ import android.bluetooth.BluetoothProfile; import android.content.Intent; import android.os.Looper; import android.os.Message; import android.os.UserHandle; import android.util.Log; import com.android.bluetooth.Utils; Loading Loading @@ -556,8 +557,11 @@ final class HearingAidStateMachine extends StateMachine { intent.addFlags( Intent.FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND); mService.sendBroadcast( intent, BLUETOOTH_CONNECT, Utils.getTempBroadcastOptions().toBundle()); mService.sendBroadcastAsUser( intent, UserHandle.ALL, BLUETOOTH_CONNECT, Utils.getTempBroadcastOptions().toBundle()); } private static String messageWhatToString(int what) { Loading