mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge.git
synced 2026-07-31 07:44:24 +02:00
Huawei: Prevent some crashes
This commit is contained in:
+1
-1
@@ -431,7 +431,7 @@ public class NotificationsHandler implements MessageHandler {
|
||||
}
|
||||
return byteArrayOutputStream.toString();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new RuntimeException("this should never happen", e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -236,7 +236,7 @@ public class HuaweiWatchfaceManager
|
||||
getWatchfacesList.setFinalizeReq(finalizeReq);
|
||||
getWatchfacesList.doPerform();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
LOG.error("Failed to get watchfaces list", e);
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
+5
-1
@@ -2,6 +2,9 @@ package nodomain.freeyourgadget.gadgetbridge.service.devices.huawei.datasync;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -12,6 +15,7 @@ import nodomain.freeyourgadget.gadgetbridge.model.ActivityUser;
|
||||
import nodomain.freeyourgadget.gadgetbridge.service.devices.huawei.HuaweiSupportProvider;
|
||||
|
||||
public class HuaweiDataSyncGoals implements HuaweiDataSyncCommon.DataCallback {
|
||||
private final Logger LOG = LoggerFactory.getLogger(HuaweiDataSyncGoals.class);
|
||||
|
||||
private final HuaweiSupportProvider support;
|
||||
|
||||
@@ -105,7 +109,7 @@ public class HuaweiDataSyncGoals implements HuaweiDataSyncCommon.DataCallback {
|
||||
} break;
|
||||
}
|
||||
} catch (HuaweiPacket.MissingTagException e) {
|
||||
throw new RuntimeException(e);
|
||||
LOG.error("Failed to handle data sync goals config command", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -64,7 +64,7 @@ public abstract class HuaweiBaseP2PService {
|
||||
}
|
||||
test.doPerform();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
LOG.error("Failed to send p2p command", e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ public abstract class HuaweiBaseP2PService {
|
||||
}
|
||||
test.doPerform();
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
LOG.error("Failed to send ping", e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -132,7 +132,7 @@ public class HuaweiP2PCannedRepliesService extends HuaweiBaseP2PService {
|
||||
}
|
||||
}
|
||||
} catch (HuaweiPacket.MissingTagException e) {
|
||||
throw new RuntimeException(e);
|
||||
LOG.error("Failed to handle p2p canned replies", e);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user