Commit 8e603594 authored by Nicolas Fella's avatar Nicolas Fella

Fix warning when overriding methods with nonnull annotations

parent ba5a9250
...@@ -45,7 +45,7 @@ class MprisReceiverCallback extends MediaController.Callback { ...@@ -45,7 +45,7 @@ class MprisReceiverCallback extends MediaController.Callback {
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP) @RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@Override @Override
public void onPlaybackStateChanged(@NonNull PlaybackState state) { public void onPlaybackStateChanged(PlaybackState state) {
plugin.sendMetadata(player); plugin.sendMetadata(player);
} }
......
...@@ -34,6 +34,7 @@ import android.widget.ListView; ...@@ -34,6 +34,7 @@ import android.widget.ListView;
import android.widget.ProgressBar; import android.widget.ProgressBar;
import android.widget.TextView; import android.widget.TextView;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable; import androidx.annotation.Nullable;
import androidx.appcompat.app.AlertDialog; import androidx.appcompat.app.AlertDialog;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
...@@ -124,7 +125,7 @@ public class DeviceFragment extends Fragment { ...@@ -124,7 +125,7 @@ public class DeviceFragment extends Fragment {
} }
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
rootView = inflater.inflate(R.layout.activity_device, container, false); rootView = inflater.inflate(R.layout.activity_device, container, false);
......
...@@ -26,6 +26,8 @@ import android.view.View; ...@@ -26,6 +26,8 @@ import android.view.View;
import android.view.ViewGroup; import android.view.ViewGroup;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import androidx.annotation.NonNull;
import java.util.ArrayList; import java.util.ArrayList;
public class ListAdapter extends ArrayAdapter<ListAdapter.Item> { public class ListAdapter extends ArrayAdapter<ListAdapter.Item> {
...@@ -45,7 +47,7 @@ public class ListAdapter extends ArrayAdapter<ListAdapter.Item> { ...@@ -45,7 +47,7 @@ public class ListAdapter extends ArrayAdapter<ListAdapter.Item> {
@Override @Override
public View getView(int position, View convertView, ViewGroup parent) { public View getView(int position, View convertView, @NonNull ViewGroup parent) {
final Item i = items.get(position); final Item i = items.get(position);
return i.inflateView(layoutInflater); return i.inflateView(layoutInflater);
} }
......
...@@ -25,6 +25,7 @@ import org.kde.kdeconnect_tp.R; ...@@ -25,6 +25,7 @@ import org.kde.kdeconnect_tp.R;
import java.util.Collection; import java.util.Collection;
import java.util.HashMap; import java.util.HashMap;
import androidx.annotation.NonNull;
import androidx.appcompat.app.ActionBar; import androidx.appcompat.app.ActionBar;
import androidx.appcompat.app.ActionBarDrawerToggle; import androidx.appcompat.app.ActionBarDrawerToggle;
import androidx.appcompat.app.AppCompatActivity; import androidx.appcompat.app.AppCompatActivity;
...@@ -359,7 +360,7 @@ public class MainActivity extends AppCompatActivity implements SharedPreferences ...@@ -359,7 +360,7 @@ public class MainActivity extends AppCompatActivity implements SharedPreferences
} }
@Override @Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) { public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) {
boolean grantedPermission = false; boolean grantedPermission = false;
for (int result : grantResults) { for (int result : grantResults) {
if (result == PackageManager.PERMISSION_GRANTED) { if (result == PackageManager.PERMISSION_GRANTED) {
......
...@@ -45,6 +45,7 @@ import org.kde.kdeconnect_tp.R; ...@@ -45,6 +45,7 @@ import org.kde.kdeconnect_tp.R;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collection; import java.util.Collection;
import androidx.annotation.NonNull;
import androidx.fragment.app.Fragment; import androidx.fragment.app.Fragment;
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout; import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
...@@ -66,7 +67,7 @@ public class PairingFragment extends Fragment implements PairingDeviceItem.Callb ...@@ -66,7 +67,7 @@ public class PairingFragment extends Fragment implements PairingDeviceItem.Callb
private TextView headerText; private TextView headerText;
@Override @Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) { Bundle savedInstanceState) {
//Log.e("PairingFragmen", "OnCreateView"); //Log.e("PairingFragmen", "OnCreateView");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment