diff --git a/Tethering/apex/Android.bp b/Tethering/apex/Android.bp index f4250cc381..4ccad22863 100644 --- a/Tethering/apex/Android.bp +++ b/Tethering/apex/Android.bp @@ -138,7 +138,11 @@ bootclasspath_fragment { // Changed in sc-mainline-prod only: no list for // framework-connectivity-tiramisu APIs as it is not in the APEX ], - unsupported: ["hiddenapi/hiddenapi-unsupported.txt"], + unsupported: [ + "hiddenapi/hiddenapi-unsupported.txt", + // Changed in sc-mainline-prod only: no framework-connectivity-tiramisu + // "hiddenapi/hiddenapi-unsupported-tiramisu.txt", + ], }, } diff --git a/buildstubs-t/Android.bp b/buildstubs-t/Android.bp index 7af320f20d..396827f902 100644 --- a/buildstubs-t/Android.bp +++ b/buildstubs-t/Android.bp @@ -39,7 +39,23 @@ filegroup { filegroup { name: "services.connectivity-netstats-jni-sources", - srcs: [], + srcs: [ + "stubs-src-jni/mock_com_android_server_net_NetworkStatsFactory.cpp", + "stubs-src-jni/mock_com_android_server_net_NetworkStatsService.cpp", + ], + visibility: [ + "//packages/modules/Connectivity:__subpackages__", + ], +} + +filegroup { + name: "framework-connectivity-tiramisu-jni-sources", + srcs: [ + "stubs-src-jni/mock_android_net_TrafficStats.cpp", + ], + visibility: [ + "//packages/modules/Connectivity:__subpackages__", + ], } // Empty replacement for framework-connectivity-tiramisu.impl and stubs, diff --git a/buildstubs-t/stubs-src-jni/mock_android_net_TrafficStats.cpp b/buildstubs-t/stubs-src-jni/mock_android_net_TrafficStats.cpp new file mode 100644 index 0000000000..ef5d874f43 --- /dev/null +++ b/buildstubs-t/stubs-src-jni/mock_android_net_TrafficStats.cpp @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2022 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 + +namespace android { + +int register_android_net_TrafficStats(JNIEnv* env) { + return JNI_ERR; +} + +}; // namespace android diff --git a/buildstubs-t/stubs-src-jni/mock_com_android_server_net_NetworkStatsFactory.cpp b/buildstubs-t/stubs-src-jni/mock_com_android_server_net_NetworkStatsFactory.cpp new file mode 100644 index 0000000000..594a174775 --- /dev/null +++ b/buildstubs-t/stubs-src-jni/mock_com_android_server_net_NetworkStatsFactory.cpp @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2022 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 + +namespace android { + +int register_android_server_net_NetworkStatsFactory(JNIEnv* env) { + return JNI_ERR; +} + +}; // namespace android diff --git a/buildstubs-t/stubs-src-jni/mock_com_android_server_net_NetworkStatsService.cpp b/buildstubs-t/stubs-src-jni/mock_com_android_server_net_NetworkStatsService.cpp new file mode 100644 index 0000000000..b0c42b0566 --- /dev/null +++ b/buildstubs-t/stubs-src-jni/mock_com_android_server_net_NetworkStatsService.cpp @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2022 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 + +namespace android { + +int register_android_server_net_NetworkStatsService(JNIEnv* env) { + return JNI_ERR; +} + +}; // namespace android