2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 14:15:14 +00:00

Hopefully fix NPE

This commit is contained in:
Albert Vaca Cintora
2022-12-29 18:51:12 +01:00
parent 5225d0b200
commit bdfc21cf64

View File

@@ -269,16 +269,17 @@ public class DeviceFragment extends Fragment {
} }
private void refreshUI() { private void refreshUI() {
if (device == null || binding == null) { if (device != null) {
return; //Once in-app, there is no point in keep displaying the notification if any
device.hidePairingNotification();
} }
//Once in-app, there is no point in keep displaying the notification if any
device.hidePairingNotification();
mActivity.runOnUiThread(new Runnable() { mActivity.runOnUiThread(new Runnable() {
@Override @Override
public void run() { public void run() {
if (device == null || binding == null) {
return;
}
if (device.isPairRequestedByPeer()) { if (device.isPairRequestedByPeer()) {
binding.pairMessage.setText(R.string.pair_requested); binding.pairMessage.setText(R.string.pair_requested);
binding.pairVerification.setVisibility(View.VISIBLE); binding.pairVerification.setVisibility(View.VISIBLE);