diff --git a/src/com/android/settings/bluetooth/Utils.java b/src/com/android/settings/bluetooth/Utils.java index b1d9de7bd3d..6404f31a5f2 100644 --- a/src/com/android/settings/bluetooth/Utils.java +++ b/src/com/android/settings/bluetooth/Utils.java @@ -288,7 +288,7 @@ public final class Utils { } ThreadUtils.postOnBackgroundThread(() -> { for (Supplier supplier : suppliers) { - supplier.get(); + Object unused = supplier.get(); } ThreadUtils.postOnMainThread(runnable); }); diff --git a/tests/robotests/src/com/android/settings/wifi/NetworkRequestErrorDialogFragmentTest.java b/tests/robotests/src/com/android/settings/wifi/NetworkRequestErrorDialogFragmentTest.java index ada47d01da2..099095c7f4f 100644 --- a/tests/robotests/src/com/android/settings/wifi/NetworkRequestErrorDialogFragmentTest.java +++ b/tests/robotests/src/com/android/settings/wifi/NetworkRequestErrorDialogFragmentTest.java @@ -74,7 +74,7 @@ public class NetworkRequestErrorDialogFragmentTest { @Test public void getConstructor_shouldNotThrowNoSuchMethodException() { try { - NetworkRequestErrorDialogFragment.class.getConstructor(); + Object unused = NetworkRequestErrorDialogFragment.class.getConstructor(); } catch (NoSuchMethodException e) { fail("No default constructor for configuration change!"); }