Browse Source

Ignore 2 lint warnings. Fixes #353.

pull/406/head
Eric Kok 7 years ago
parent
commit
2b7bfa4701
  1. 2
      app/src/main/java/org/transdroid/core/widget/ListWidgetConfigActivity.java
  2. 1
      app/src/main/java/org/transdroid/daemon/Vuze/VuzeAdapter.java

2
app/src/main/java/org/transdroid/core/widget/ListWidgetConfigActivity.java

@ -16,6 +16,7 @@ @@ -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 { @@ -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);

1
app/src/main/java/org/transdroid/daemon/Vuze/VuzeAdapter.java

@ -105,6 +105,7 @@ public class VuzeAdapter implements IDaemonAdapter { @@ -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) {

Loading…
Cancel
Save