2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 13:47:41 +00:00

Inline fields

This commit is contained in:
Nicolas Fella
2019-04-19 01:09:52 +02:00
parent 794f1d4706
commit 96a83ddcd3
3 changed files with 1 additions and 6 deletions

View File

@@ -39,7 +39,6 @@ class UploadNotification {
private NotificationCompat.Builder builder;
private final int notificationId;
private final Device device;
private long currentJobId;
UploadNotification(Device device) {
this.device = device;
@@ -56,7 +55,6 @@ class UploadNotification {
void addCancelAction(long jobId) {
builder.mActions.clear();
currentJobId = jobId;
Intent cancelIntent = new Intent(device.getContext(), ShareBroadcastReceiver.class);
cancelIntent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND);
cancelIntent.setAction(SharePlugin.ACTION_CANCEL_SHARE);

View File

@@ -43,7 +43,6 @@ import butterknife.ButterKnife;
public class CustomDevicesAdapter extends RecyclerView.Adapter<CustomDevicesAdapter.ViewHolder> {
private ArrayList<String> customDevices;
private RecyclerView recyclerView;
private final Callback callback;
CustomDevicesAdapter(@NonNull Callback callback) {
@@ -62,7 +61,6 @@ public class CustomDevicesAdapter extends RecyclerView.Adapter<CustomDevicesAdap
public void onAttachedToRecyclerView(@NonNull RecyclerView recyclerView) {
super.onAttachedToRecyclerView(recyclerView);
this.recyclerView = recyclerView;
ItemTouchHelper itemTouchHelper = new ItemTouchHelper(
new ItemTouchHelperCallback(adapterPos -> callback.onCustomDeviceDismissed(customDevices.get(adapterPos))));
itemTouchHelper.attachToRecyclerView(recyclerView);

View File

@@ -54,7 +54,6 @@ public class LanLinkTest {
private LanLink badLanLink;
private LanLink goodLanLink;
private OutputStream badOutputStream;
private OutputStream goodOutputStream;
private Device.SendPacketStatusCallback callback;
@@ -69,7 +68,7 @@ public class LanLinkTest {
callback = Mockito.mock(Device.SendPacketStatusCallback.class);
goodOutputStream = Mockito.mock(OutputStream.class);
badOutputStream = Mockito.mock(OutputStream.class);
OutputStream badOutputStream = Mockito.mock(OutputStream.class);
Mockito.doThrow(new IOException("AAA")).when(badOutputStream).write(Mockito.any(byte[].class));