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

Commit 146e4976 authored by markchien's avatar markchien Committed by android-build-merger
Browse files

[Tether07] Migrate Tethering into module am: 0df2ebc4

am: 6b828d29

Change-Id: I6e71b418b7303d37144532ab056c21ccbefcb554
parents 463265c0 6b828d29
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -17,4 +17,4 @@

package android.os;

parcelable ResultReceiver;
@JavaOnlyStableParcelable parcelable ResultReceiver;
+12 −37
Original line number Diff line number Diff line
@@ -22,13 +22,12 @@ java_defaults {
        ":framework-tethering-shared-srcs",
        ":net-module-utils-srcs",
        ":services-tethering-shared-srcs",
        ":servicescore-tethering-src",
    ],
    static_libs: [
        "androidx.annotation_annotation",
        "netd_aidl_interface-java",
        "netd_aidl_interface-unstable-java",
        "netlink-client",
        "networkstack-aidl-interfaces-java",
        "networkstack-aidl-interfaces-unstable-java",
        "android.hardware.tetheroffload.control-V1.0-java",
        "tethering-client",
    ],
@@ -96,7 +95,16 @@ java_defaults {
}

// Non-updatable tethering running in the system server process for devices not using the module
// TODO: build in-process tethering APK here.
android_app {
    name: "InProcessTethering",
    defaults: ["TetheringAppDefaults"],
    static_libs: ["TetheringApiCurrentLib"],
    certificate: "platform",
    manifest: "AndroidManifest_InProcess.xml",
    // InProcessTethering is a replacement for Tethering
    overrides: ["Tethering"],
    // TODO: use PlatformNetworkPermissionConfig.
}

// Updatable tethering packaged as an application
android_app {
@@ -109,36 +117,3 @@ android_app {
    // The permission configuration *must* be included to ensure security of the device
    required: ["NetworkPermissionConfig"],
}

// This group will be removed when tethering migration is done.
filegroup {
    name: "tethering-servicescore-srcs",
    srcs: [
        "src/com/android/server/connectivity/tethering/EntitlementManager.java",
        "src/com/android/server/connectivity/tethering/OffloadController.java",
        "src/com/android/server/connectivity/tethering/OffloadHardwareInterface.java",
        "src/com/android/server/connectivity/tethering/TetheringConfiguration.java",
        "src/com/android/server/connectivity/tethering/UpstreamNetworkMonitor.java",
    ],
}

// This group will be removed when tethering migration is done.
filegroup {
    name: "tethering-servicesnet-srcs",
    srcs: [
        "src/android/net/dhcp/DhcpServerCallbacks.java",
        "src/android/net/dhcp/DhcpServingParamsParcelExt.java",
        "src/android/net/ip/IpServer.java",
        "src/android/net/ip/RouterAdvertisementDaemon.java",
        "src/android/net/util/InterfaceSet.java",
        "src/android/net/util/PrefixUtils.java",
    ],
}

// This group would be removed when tethering migration is done.
filegroup {
    name: "tethering-jni-srcs",
    srcs: [
        "jni/com_android_server_connectivity_tethering_OffloadHardwareInterface.cpp",
    ],
}
+6 −0
Original line number Diff line number Diff line
@@ -25,5 +25,11 @@
        android:process="com.android.networkstack.process"
        android:extractNativeLibs="false"
        android:persistent="true">
        <service android:name="com.android.server.connectivity.tethering.TetheringService"
                 android:permission="android.permission.MAINLINE_NETWORK_STACK">
            <intent-filter>
                <action android:name="android.net.ITetheringConnector"/>
            </intent-filter>
        </service>
    </application>
</manifest>
+35 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
 * Copyright (C) 2019 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.
 */
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.android.tethering.inprocess"
          android:sharedUserId="android.uid.system"
          android:process="system">
    <uses-sdk android:minSdkVersion="29" android:targetSdkVersion="29" />
    <application>
        <!-- TODO: Using MAINLINE_NETWORK_STACK instead of NETWORK_STACK when tethering run in the
                   same process with networkstack -->
        <service android:name="com.android.server.connectivity.tethering.TetheringService"
                 android:process="system"
                 android:permission="android.permission.NETWORK_STACK">
            <intent-filter>
                <action android:name="android.net.ITetheringConnector.InProcess"/>
            </intent-filter>
        </service>
    </application>
</manifest>
+12 −1
Original line number Diff line number Diff line
@@ -18,8 +18,12 @@
aidl_interface {
    name: "tethering-aidl-interfaces",
    local_include_dir: "src",
    include_dirs: ["frameworks/base/core/java"], // For framework parcelables.
    srcs: [
        "src/android/net/ITetherInternalCallback.aidl",
        "src/android/net/ITetheringConnector.aidl",
        "src/android/net/TetheringConfigurationParcel.aidl",
        "src/android/net/TetherStatesParcel.aidl",
    ],
    backend: {
        ndk: {
@@ -33,8 +37,15 @@ aidl_interface {

java_library {
    name: "tethering-client",
    platform_apis: true,
    sdk_version: "system_current",
    static_libs: [
        "tethering-aidl-interfaces-java",
    ],
}

// This is temporary file group which would be removed after TetheringManager is built
// into tethering-client. Will be done by aosp/1156906.
filegroup {
    name: "tethering-manager",
    srcs: ["src/android/net/TetheringManager.java"],
}
Loading