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

Commit e1b7c4ff authored by Henri Chataing's avatar Henri Chataing Committed by Gerrit Code Review
Browse files

Merge changes I3298e94c,I71623f70,Ie7d177d3 into main

* changes:
  system/gd: Remove unused modules Discoverability, Page, Inquiry
  system/gd: Remove unused RPC endpoints from neighbor facade
  blueberry: Remove unused shim facade
parents 307c9a00 e9e18004
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -27,7 +27,6 @@ filegroup {
        "blueberry/facade/neighbor/facade.proto",
        "blueberry/facade/rootservice.proto",
        "blueberry/facade/security/facade.proto",
        "blueberry/facade/shim/facade.proto",
        "blueberry/facade/topshim/facade.proto",
    ],
}
@@ -72,8 +71,6 @@ genrule {
        "blueberry/facade/rootservice.pb.h",
        "blueberry/facade/security/facade.grpc.pb.h",
        "blueberry/facade/security/facade.pb.h",
        "blueberry/facade/shim/facade.grpc.pb.h",
        "blueberry/facade/shim/facade.pb.h",
    ],
}

@@ -117,8 +114,6 @@ genrule {
        "blueberry/facade/rootservice.pb.cc",
        "blueberry/facade/security/facade.grpc.pb.cc",
        "blueberry/facade/security/facade.pb.cc",
        "blueberry/facade/shim/facade.grpc.pb.cc",
        "blueberry/facade/shim/facade.pb.cc",
    ],
}

+0 −48
Original line number Diff line number Diff line
@@ -5,57 +5,9 @@ package blueberry.facade.neighbor;
import "google/protobuf/empty.proto";

service NeighborFacade {
  rpc SetConnectability(EnableMsg) returns (google.protobuf.Empty) {}
  rpc SetDiscoverability(DiscoverabilitiyMsg) returns (google.protobuf.Empty) {}
  rpc SetInquiryMode(InquiryMsg) returns (stream InquiryResultMsg) {
    // Sets inquiry mode and fetches inquiry result HCI packet
  }
  rpc ReadRemoteName(RemoteNameRequestMsg) returns (google.protobuf.Empty) {}
  rpc GetRemoteNameEvents(google.protobuf.Empty) returns (stream RemoteNameResponseMsg) {}
  // TODO: Should we use a blocking call for ReadRemoteName instead? (Note: blocking model may not work for GD stack)
  rpc EnableInquiryScan(EnableMsg) returns (google.protobuf.Empty) {}
  rpc EnablePageScan(EnableMsg) returns (google.protobuf.Empty) {}
}

message EnableMsg {
  bool enabled = 1;
}

enum DiscoverabilityMode {
  OFF = 0;
  LIMITED = 1;
  GENERAL = 2;
}

message DiscoverabilitiyMsg {
  DiscoverabilityMode mode = 1;
}

enum ResultMode {
  STANDARD = 0;
  RSSI = 1;
  EXTENDED = 2;
}

message InquiryMsg {
  DiscoverabilityMode inquiry_mode = 1;
  ResultMode result_mode = 2;
  uint32 length_1_28s = 3;
  uint32 max_results = 4;  // 0 is unlimited
}

message InquiryResultMsg {
  bytes packet = 1;
}

message RemoteNameRequestMsg {
  bytes address = 1;
  uint32 page_scan_repetition_mode = 2;  // r0, r1, r2
  uint32 clock_offset = 3;
}

message RemoteNameResponseMsg {
  uint32 status = 1;
  bytes address = 2;
  bytes name = 3;
}
+0 −13
Original line number Diff line number Diff line
syntax = "proto3";

package blueberry.facade.shim;

import "google/protobuf/empty.proto";

service ShimFacade {
  rpc Dump(google.protobuf.Empty) returns (stream DumpsysMsg) {}
}

message DumpsysMsg {
  bytes data = 1;
}
+0 −2
Original line number Diff line number Diff line
@@ -56,7 +56,6 @@ from blueberry.facade.l2cap.classic import facade_pb2_grpc as l2cap_facade_pb2_g
from blueberry.facade.l2cap.le import facade_pb2_grpc as l2cap_le_facade_pb2_grpc
from blueberry.facade.neighbor import facade_pb2_grpc as neighbor_facade_pb2_grpc
from blueberry.facade.security import facade_pb2_grpc as security_facade_pb2_grpc
from blueberry.facade.shim import facade_pb2_grpc as shim_facade_pb2_grpc

from mobly import utils
from mobly.controllers.android_device_lib.adb import AdbError
@@ -265,7 +264,6 @@ class GdDeviceBase(ABC):
            self.grpc_channel)
        self.neighbor = neighbor_facade_pb2_grpc.NeighborFacadeStub(self.grpc_channel)
        self.security = security_facade_pb2_grpc.SecurityModuleFacadeStub(self.grpc_channel)
        self.shim = shim_facade_pb2_grpc.ShimFacadeStub(self.grpc_channel)

    def get_crash_snippet_and_log_tail(self):
        if is_subprocess_alive(self.backing_process):
+0 −33
Original line number Diff line number Diff line
#!/usr/bin/env python3
#
#   Copyright 2020 - The Android Open Source Project
#
#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#       http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.

from blueberry.tests.gd.cert import gd_base_test
from google.protobuf import empty_pb2 as empty_proto
from mobly import test_runner


class ShimTest(gd_base_test.GdBaseTestClass):

    def setup_class(self):
        gd_base_test.GdBaseTestClass.setup_class(self, dut_module='SHIM', cert_module='SHIM')

    def test_dumpsys(self):
        result = self.cert.shim.Dump(empty_proto.Empty())
        result = self.dut.shim.Dump(empty_proto.Empty())


if __name__ == '__main__':
    test_runner.main()
Loading