From 2b7bfa47018ff5a9bbbdf4dcddd913ede2b71e5b Mon Sep 17 00:00:00 2001 From: Eric Kok Date: Tue, 14 Nov 2017 21:28:58 +0100 Subject: [PATCH] Ignore 2 lint warnings. Fixes #353. --- .../org/transdroid/core/widget/ListWidgetConfigActivity.java | 2 ++ app/src/main/java/org/transdroid/daemon/Vuze/VuzeAdapter.java | 1 + 2 files changed, 3 insertions(+) diff --git a/app/src/main/java/org/transdroid/core/widget/ListWidgetConfigActivity.java b/app/src/main/java/org/transdroid/core/widget/ListWidgetConfigActivity.java index 324a1ff2..34030e57 100644 --- a/app/src/main/java/org/transdroid/core/widget/ListWidgetConfigActivity.java +++ b/app/src/main/java/org/transdroid/core/widget/ListWidgetConfigActivity.java @@ -16,6 +16,7 @@ */ package org.transdroid.core.widget; +import android.annotation.SuppressLint; import android.annotation.TargetApi; import android.appwidget.AppWidgetManager; import android.content.Intent; @@ -178,6 +179,7 @@ public class ListWidgetConfigActivity extends AppCompatActivity { if (getSupportActionBar() != null) { getSupportActionBar().setDisplayOptions(ActionBar.DISPLAY_SHOW_CUSTOM, ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_SHOW_TITLE); + @SuppressLint("InflateParams") // Uses local activity theme correctly, so missing the inflation parent is okay View doneButtonFrame = getLayoutInflater().inflate(R.layout.actionbar_donebutton, null); doneButtonFrame.findViewById(R.id.actionbar_done).setOnClickListener(doneClicked); getSupportActionBar().setCustomView(doneButtonFrame); diff --git a/app/src/main/java/org/transdroid/daemon/Vuze/VuzeAdapter.java b/app/src/main/java/org/transdroid/daemon/Vuze/VuzeAdapter.java index 539f0b46..db575204 100644 --- a/app/src/main/java/org/transdroid/daemon/Vuze/VuzeAdapter.java +++ b/app/src/main/java/org/transdroid/daemon/Vuze/VuzeAdapter.java @@ -105,6 +105,7 @@ public class VuzeAdapter implements IDaemonAdapter { String file = ((AddByFileTask)task).getFile(); in = new FileInputStream(new File(URI.create(file))); bytes = new byte[in.available()]; + //noinspection ResultOfMethodCallIgnored All bytes read at once, so no need to check result in.read(bytes, 0, in.available()); in.close(); } catch (FileNotFoundException e) {