mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-09-05 08:35:10 +00:00
Simplify switch to if statement
Summary: Depends on D10946 Reviewers: #kde_connect, mtijink Reviewed By: #kde_connect, mtijink Subscribers: #kde_connect Tags: #kde_connect Differential Revision: https://phabricator.kde.org/D10947
This commit is contained in:
@@ -257,13 +257,11 @@ public class Device implements BaseLink.PackageReceiver {
|
||||
|
||||
Resources res = context.getResources();
|
||||
|
||||
switch (pairStatus) {
|
||||
case Paired:
|
||||
for (PairingCallback cb : pairingCallback) {
|
||||
cb.pairingFailed(res.getString(R.string.error_already_paired));
|
||||
}
|
||||
return;
|
||||
case NotPaired:
|
||||
if (isPaired()) {
|
||||
for (PairingCallback cb : pairingCallback) {
|
||||
cb.pairingFailed(res.getString(R.string.error_already_paired));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (!isReachable()) {
|
||||
|
Reference in New Issue
Block a user