Merge "Fix errorprone warnings that should be errors"

This commit is contained in:
Treehugger Robot
2022-10-31 22:21:12 +00:00
committed by Gerrit Code Review
23 changed files with 114 additions and 122 deletions

View File

@@ -405,6 +405,7 @@ public class ToggleFeaturePreferenceFragmentTest {
// do nothing
}
@SuppressWarnings("MissingSuperCall")
@Override
public void onDestroyView() {
// do nothing

View File

@@ -473,6 +473,7 @@ public class ToggleScreenMagnificationPreferenceFragmentTest {
// do nothing
}
@SuppressWarnings("MissingSuperCall")
@Override
public void onDestroyView() {
// do nothing

View File

@@ -50,6 +50,7 @@ public class AppFilterItemTest {
assertThat(item).isEqualTo(item2);
}
@SuppressWarnings("SelfComparison")
@Test
public void compare_sameContent_return0() {
final AppFilterItem item = AppFilterRegistry.getInstance().get(FILTER_APPS_USAGE_ACCESS);

View File

@@ -141,10 +141,9 @@ public class BluetoothSampleRateDialogPreferenceControllerTest {
@Test
public void getSelectableIndex_verifyList() {
List<BluetoothCodecConfig> mCodecConfigs = new ArrayList() {{
add(mCodecConfigAAC);
add(mCodecConfigSBC);
}};
List<BluetoothCodecConfig> mCodecConfigs = List.of(
mCodecConfigAAC,
mCodecConfigSBC);
mCodecStatus = new BluetoothCodecStatus.Builder()
.setCodecConfig(mCodecConfigAAC)
.setCodecsSelectableCapabilities(mCodecConfigs)

View File

@@ -43,16 +43,16 @@ public class ConfirmCredentialTest {
// Launch only one instance at a time.
assertThat(LastTryDialog.show(
fm, "title", mContext.getString(android.R.string.yes),
fm, "title", mContext.getString(android.R.string.ok),
android.R.string.ok, false)).isTrue();
assertThat(LastTryDialog.show(
fm, "title", mContext.getString(android.R.string.yes),
fm, "title", mContext.getString(android.R.string.ok),
android.R.string.ok, false)).isFalse();
// After cancelling, the dialog should be re-shown when asked for.
LastTryDialog.hide(fm);
assertThat(LastTryDialog.show(
fm, "title", mContext.getString(android.R.string.yes),
fm, "title", mContext.getString(android.R.string.ok),
android.R.string.ok, false)).isTrue();
}
}