mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 13:47:41 +00:00
Inline fields
This commit is contained in:
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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));
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user