Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 544f98db authored by Henri Chataing's avatar Henri Chataing
Browse files

bumble_experimental/Asha: Test against dual registration of the ASHA

service

AshaService.Register did not check for previous registration;
instead of creating a new service update the information for
a previously registered AshaService instead

Test: atest v2/pandora-prod-team/avatar
Bug: 254077091
Change-Id: Iab9153298f0f96a74bd680e1e71dd90437e64b34
parent 775ae5a0
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -211,7 +211,10 @@ class AshaService(AshaServicer):
    @utils.rpc
    async def Register(self, request: RegisterRequest, context: grpc.ServicerContext) -> Empty:
        logging.info("Register")
        # asha service from bumble profile
        if self.asha_service:
            self.asha_service.capability = request.capability
            self.asha_service.hisyncid = request.hisyncid
        else:
            self.asha_service = AshaGattService(request.capability, request.hisyncid, self.device)
            self.device.add_service(self.asha_service)  # type: ignore[no-untyped-call]
        return Empty()