Merge "Delete the (unused) Ril shared memory region" into cuttlefish-testing
am: ef2225de3a
Change-Id: I0d17e3882775e0f2dc5184792abfba4053d9947a
diff --git a/Android.bp b/Android.bp
index d9cbf16..7c33659 100644
--- a/Android.bp
+++ b/Android.bp
@@ -89,8 +89,6 @@
"common/vsoc/lib/lock_common.cpp",
"common/vsoc/lib/managed_e2e_test_region_layout.cpp",
"common/vsoc/lib/region_view.cpp",
- "common/vsoc/lib/ril_layout.cpp",
- "common/vsoc/lib/ril_region_view.cpp",
"common/vsoc/lib/screen_layout.cpp",
"common/vsoc/lib/screen_region_view.cpp",
"common/vsoc/lib/socket_forward_layout.cpp",
diff --git a/common/vsoc/lib/ril_layout.cpp b/common/vsoc/lib/ril_layout.cpp
deleted file mode 100644
index 89f45f1..0000000
--- a/common/vsoc/lib/ril_layout.cpp
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * Copyright (C) 2017 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.
- */
-#include "common/vsoc/shm/ril_layout.h"
-
-namespace vsoc {
-namespace layout {
-namespace ril {
-
-const char* RilLayout::region_name = "ril";
-}
-} // namespace layout
-} // namespace vsoc
diff --git a/common/vsoc/lib/ril_region_view.cpp b/common/vsoc/lib/ril_region_view.cpp
deleted file mode 100644
index ad19ac3..0000000
--- a/common/vsoc/lib/ril_region_view.cpp
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2017 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.
- */
-
-#include <arpa/inet.h>
-
-#include <mutex>
-
-#include "common/vsoc/lib/ril_region_view.h"
-
-namespace vsoc {
-namespace ril {
-
-const char* RilRegionView::address_and_prefix_length() const {
- static char buffer[sizeof(data().ipaddr) + 3]{}; // <ipaddr>/dd
- if (buffer[0] == '\0') {
- snprintf(buffer, sizeof(buffer), "%s/%d", data().ipaddr, data().prefixlen);
- }
- return &buffer[0];
-}
-
-} // namespace ril
-} // namespace vsoc
diff --git a/common/vsoc/lib/ril_region_view.h b/common/vsoc/lib/ril_region_view.h
deleted file mode 100644
index 0f7fe84..0000000
--- a/common/vsoc/lib/ril_region_view.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#pragma once
-/*
- * Copyright (C) 2017 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.
- */
-
-#include <memory>
-
-#include "common/vsoc/lib/typed_region_view.h"
-#include "common/vsoc/shm/ril_layout.h"
-
-namespace vsoc {
-namespace ril {
-class RilRegionView
- : public vsoc::TypedRegionView<
- RilRegionView,
- vsoc::layout::ril::RilLayout> {
- public:
- // returns a string with '<ip>/<prefix_len>' like this: 192.168.99.2/30
- const char* address_and_prefix_length() const;
-};
-} // namespace ril
-} // namespace vsoc
diff --git a/common/vsoc/lib/vsoc_memory.cpp b/common/vsoc/lib/vsoc_memory.cpp
index 8ce7b24..f663574 100644
--- a/common/vsoc/lib/vsoc_memory.cpp
+++ b/common/vsoc/lib/vsoc_memory.cpp
@@ -30,7 +30,6 @@
#include "common/vsoc/shm/gralloc_layout.h"
#include "common/vsoc/shm/input_events_layout.h"
#include "common/vsoc/shm/managed_e2e_test_region_layout.h"
-#include "common/vsoc/shm/ril_layout.h"
#include "common/vsoc/shm/screen_layout.h"
#include "common/vsoc/shm/socket_forward_layout.h"
#include "common/vsoc/shm/wifi_exchange_layout.h"
@@ -175,7 +174,6 @@
ValidateAndBuildLayout<layout::socket_forward::SocketForwardLayout>(7,
7),
ValidateAndBuildLayout<layout::wifi::WifiExchangeLayout>(2, 2),
- ValidateAndBuildLayout<layout::ril::RilLayout>(2, 2),
ValidateAndBuildLayout<layout::e2e_test::E2EPrimaryTestRegionLayout>(1,
1),
ValidateAndBuildLayout<layout::e2e_test::E2ESecondaryTestRegionLayout>(
diff --git a/common/vsoc/shm/ril_layout.h b/common/vsoc/shm/ril_layout.h
deleted file mode 100644
index 33348e2..0000000
--- a/common/vsoc/shm/ril_layout.h
+++ /dev/null
@@ -1,39 +0,0 @@
-#pragma once
-/*
- * Copyright (C) 2017 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.
- */
-
-#include "common/vsoc/shm/base.h"
-
-// Memory layout for the ril hal region
-
-namespace vsoc {
-namespace layout {
-namespace ril {
-
-struct RilLayout : public RegionLayout {
- static constexpr size_t layout_size = 4 * 16 + 4;
- static const char* region_name;
-
- char ipaddr[16]; // xxx.xxx.xxx.xxx\0 = 16 bytes
- char gateway[16];
- char dns[16];
- char broadcast[16];
- uint32_t prefixlen;
-};
-ASSERT_SHM_COMPATIBLE(RilLayout);
-} // namespace ril
-} // namespace layout
-} // namespace vsoc