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

Commit 8317ce0c authored by William Escande's avatar William Escande Committed by Gerrit Code Review
Browse files

Merge "BluetoothApp: Enforce more error prone 2" into main

parents 7b7ffdeb 7d6d5303
Loading
Loading
Loading
Loading
+8 −0
Original line number Diff line number Diff line
@@ -323,6 +323,7 @@ android_app {
        enabled: true,
        javacflags: [
            "-Xep:AlmostJavadoc:ERROR",
            "-Xep:AlreadyChecked:ERROR",
            "-Xep:AndroidFrameworkBinderIdentity:ERROR",
            "-Xep:AndroidFrameworkEfficientStrings:ERROR",
            "-Xep:AndroidFrameworkRequiresPermission:ERROR",
@@ -330,20 +331,27 @@ android_app {
            "-Xep:ClassCanBeStatic:ERROR",
            "-Xep:DateFormatConstant:ERROR",
            "-Xep:EmptyBlockTag:ERROR",
            "-Xep:FallThrough:ERROR",
            "-Xep:HidingField:ERROR",
            "-Xep:InlineMeInliner:ERROR",
            "-Xep:InvalidBlockTag:ERROR",
            "-Xep:InvalidParam:ERROR",
            "-Xep:LoopOverCharArray:ERROR",
            "-Xep:MissingCasesInEnumSwitch:ERROR",
            "-Xep:MockNotUsedInProduction:ERROR",
            "-Xep:ModifyCollectionInEnhancedForLoop:ERROR",
            "-Xep:NarrowCalculation:ERROR",
            "-Xep:NonApiType:ERROR",
            "-Xep:NonAtomicVolatileUpdate:ERROR",
            "-Xep:NonCanonicalType:ERROR",
            "-Xep:NotJavadoc:ERROR",
            "-Xep:OperatorPrecedence:ERROR",
            "-Xep:ReturnAtTheEndOfVoidFunction:ERROR",
            "-Xep:StringCaseLocaleUsage:ERROR",
            "-Xep:StringCharset:ERROR",
            "-Xep:ToStringReturnsNull:ERROR",
            "-Xep:UnnecessaryStringBuilder:ERROR",
            "-Xep:UnrecognisedJavadocTag:ERROR",
            "-Xep:UnusedMethod:ERROR",
            "-Xep:UnusedNestedClass:ERROR",
            "-Xep:UnusedVariable:ERROR",
+2 −1
Original line number Diff line number Diff line
@@ -128,7 +128,8 @@ public class AvrcpCoverArtManager {
     */
    public static boolean isValidImageHandle(String handle) {
        if (handle == null || handle.length() != 7) return false;
        for (char c : handle.toCharArray()) {
        for (int i = 0; i < handle.length(); i++) {
            char c = handle.charAt(i);
            if (!Character.isDigit(c)) {
                return false;
            }
+3 −0
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@

package com.android.bluetooth.avrcpcontroller;

import android.annotation.SuppressLint;

import com.android.bluetooth.Utils;

import java.util.Calendar;
@@ -121,6 +123,7 @@ public class BipDateTime {
    }

    @Override
    @SuppressLint("ToStringReturnsNull")
    public String toString() {
        Date d = getTime();
        if (d == null) {
+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.bluetooth.avrcpcontroller;

import android.annotation.SuppressLint;
import android.util.Log;
import android.util.Xml;

@@ -262,6 +263,7 @@ public class BipImageDescriptor {
    }

    @Override
    @SuppressLint("ToStringReturnsNull") // Since this is used for encoding to xml
    public String toString() {
        if (mEncoding == null || mPixel == null) {
            error(
+2 −0
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@

package com.android.bluetooth.avrcpcontroller;

import android.annotation.SuppressLint;
import android.util.Log;

import java.util.Objects;
@@ -179,6 +180,7 @@ public class BipImageFormat {
    }

    @Override
    @SuppressLint("ToStringReturnsNull") // Since this is used for encoding to xml
    public String toString() {
        if (mEncoding == null
                || mEncoding.getType() == BipEncoding.UNKNOWN
Loading