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

Commit 566fd385 authored by William Escande's avatar William Escande
Browse files

ErrorProne: Enforce & fix BadImport

See https://errorprone.info/bugpattern/BadImport

Bug: 344658662
Test: m BluetoothInstrumentationTests
Flag: Exempt Build and test only
Change-Id: I0723f369992060be11eb8f343fd3961971b73420
parent 2fa7b695
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -321,6 +321,7 @@ android_app {
        javacflags: [
            // "-Xep:AndroidFrameworkRequiresPermission:ERROR",
            "-Xep:AlmostJavadoc:ERROR",
            "-Xep:BadImport:ERROR",
            "-Xep:ClassCanBeStatic:ERROR",
            "-Xep:UnusedMethod:ERROR",
            "-Xep:UnusedVariable:ERROR",
+1 −2
Original line number Diff line number Diff line
@@ -13,7 +13,6 @@ import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.drawable.Icon;
import android.os.Handler;
import android.os.Handler.Callback;
import android.os.HandlerThread;
import android.os.Looper;
import android.os.Message;
@@ -44,7 +43,7 @@ import java.util.concurrent.CountDownLatch;
 * thread. (There are helper functions to do this) Communication to the RIL is through an intent,
 * and a BroadcastReceiver.
 */
public class SapServer extends Thread implements Callback {
public class SapServer extends Thread implements Handler.Callback {
    private static final String TAG = "SapServer";
    private static final String TAG_HANDLER = "SapServerHandler";

+1 −0
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ java_defaults {
        enabled: true,
        javacflags: [
            "-Xep:AlmostJavadoc:ERROR",
            "-Xep:BadImport:ERROR",
            "-Xep:CatchFail:ERROR",
            "-Xep:ClassCanBeStatic:ERROR",
            "-Xep:EmptyCatch:ERROR",
+1 −0
Original line number Diff line number Diff line
@@ -91,6 +91,7 @@ java_sdk_library {
        javacflags: [
            "-Xep:InlineMeSuggester:OFF", // The @InlineMe annotation is not available

            "-Xep:BadImport:ERROR",
            "-Xep:CatchFail:ERROR",
            "-Xep:ClassCanBeStatic:ERROR",
            "-Xep:EmptyCatch:ERROR",
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ java_defaults {
        enabled: true,
        javacflags: [
            "-Xep:AlreadyChecked:ERROR",
            "-Xep:BadImport:ERROR",
            "-Xep:CatchFail:ERROR",
            "-Xep:CheckReturnValue:ERROR",
            "-Xep:ClassCanBeStatic:ERROR",