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

Commit 13f2f93c authored by Remi NGUYEN VAN's avatar Remi NGUYEN VAN Committed by android-build-merger
Browse files

Merge "Use an in-process APK for in-process NetworkStack"

am: b8f2ab93

Change-Id: I4437757ba95f39d62a3418214d780f36daaada6e
parents 2a8c9499 b8f2ab93
Loading
Loading
Loading
Loading
+25 −8
Original line number Diff line number Diff line
@@ -14,12 +14,11 @@
// limitations under the License.
//

// Library including the network stack, used to compile the network stack app, or linked into the
// system server on devices that run the stack there
java_library {
    name: "NetworkStackLib",
// Library including the network stack, used to compile both variants of the network stack
android_library {
    name: "NetworkStackBase",
    sdk_version: "system_current",
    installable: true,
    min_sdk_version: "28",
    srcs: [
        "src/**/*.java",
        ":framework-networkstack-shared-srcs",
@@ -29,7 +28,24 @@ java_library {
        "netd_aidl_interface-java",
        "networkstack-aidl-interfaces-java",
        "datastallprotosnano",
    ]
    ],
    manifest: "AndroidManifestBase.xml",
}

// Non-updatable in-process network stack for devices not using the module
android_app {
    name: "InProcessNetworkStack",
    sdk_version: "system_current",
    min_sdk_version: "28",
    certificate: "platform",
    privileged: true,
    static_libs: [
        "NetworkStackBase",
    ],
    jarjar_rules: "jarjar-rules-shared.txt",
    // The permission configuration *must* be included to ensure security of the device
    required: ["NetworkStackPermissionStub"],
    manifest: "AndroidManifest_InProcess.xml",
}

// Updatable network stack packaged as an application
@@ -40,9 +56,10 @@ android_app {
    certificate: "networkstack",
    privileged: true,
    static_libs: [
        "NetworkStackLib"
        "NetworkStackBase"
    ],
    jarjar_rules: "jarjar-rules-shared.txt",
    manifest: "AndroidManifest.xml",
    // The permission configuration *must* be included to ensure security of the device
    required: ["NetworkStackPermissionStub"],
    manifest: "AndroidManifest.xml",
}
+4 −20
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
 * Copyright (C) 2014 The Android Open Source Project
 * 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.
@@ -18,26 +18,10 @@
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
          package="com.android.networkstack"
          android:sharedUserId="android.uid.networkstack"
          android:versionCode="11"
          android:versionName="Q-initial">
    <uses-sdk android:minSdkVersion="28" android:targetSdkVersion="28" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" />
          android:sharedUserId="android.uid.networkstack">
    <!-- Signature permission defined in NetworkStackStub -->
    <uses-permission android:name="android.permission.MAINLINE_NETWORK_STACK" />
    <!-- Send latency broadcast as current user -->
    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
    <application
        android:label="NetworkStack"
        android:defaultToDeviceProtectedStorage="true"
        android:directBootAware="true"
        android:usesCleartextTraffic="true">
    <application>
        <service android:name="com.android.server.NetworkStackService">
            <intent-filter>
                <action android:name="android.net.INetworkStackConnector"/>
+39 −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.networkstack"
          android:versionCode="11"
          android:versionName="Q-initial">
    <uses-sdk android:minSdkVersion="28" android:targetSdkVersion="28" />
    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
    <uses-permission android:name="android.permission.CONNECTIVITY_INTERNAL" />
    <!-- Send latency broadcast as current user -->
    <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    <uses-permission android:name="android.permission.READ_PRIVILEGED_PHONE_STATE" />
    <application
        android:label="NetworkStack"
        android:defaultToDeviceProtectedStorage="true"
        android:directBootAware="true"
        android:usesCleartextTraffic="true">
    </application>
</manifest>
+30 −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.networkstack.inprocess"
          android:sharedUserId="android.uid.system"
          android:process="system">
    <application>
        <service android:name="com.android.server.NetworkStackService" android:process="system">
            <intent-filter>
                <action android:name="android.net.INetworkStackConnector.InProcess"/>
            </intent-filter>
        </service>
    </application>
</manifest>
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -23,7 +23,7 @@ android_test {
    static_libs: [
        "androidx.test.rules",
        "mockito-target-extended-minus-junit4",
        "NetworkStackLib",
        "NetworkStackBase",
        "testables",
    ],
    libs: [
Loading