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

Commit ba2f29b8 authored by Mark Chien's avatar Mark Chien Committed by android-build-merger
Browse files

Merge "[Tether01] Add Tethering App"

am: 8c26c389

Change-Id: I060d5557d8cc01a7503292cccf6c636f3d4660c9
parents 443d3d0f 8c26c389
Loading
Loading
Loading
Loading
+62 −0
Original line number Diff line number Diff line
//
// 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.
//

java_defaults {
    name: "TetheringAndroidLibraryDefaults",
    platform_apis: true,
    srcs: [
        "src/**/*.java",
    ],
    static_libs: [
        "androidx.annotation_annotation",
        "tethering-client",
    ],
    manifest: "AndroidManifestBase.xml",
}

// Build tethering static library, used to compile both variants of the tethering.
android_library {
    name: "TetheringApiCurrentLib",
    defaults: ["TetheringAndroidLibraryDefaults"],
}

// Common defaults for compiling the actual APK.
java_defaults {
    name: "TetheringAppDefaults",
    platform_apis: true,
    privileged: true,
    resource_dirs: [
        "res",
    ],
    optimize: {
        proguard_flags_files: ["proguard.flags"],
    },
}

// Non-updatable tethering running in the system server process for devices not using the module
// TODO: build in-process tethering APK here.

// Updatable tethering packaged as an application
android_app {
    name: "Tethering",
    defaults: ["TetheringAppDefaults"],
    static_libs: ["TetheringApiCurrentLib"],
    certificate: "networkstack",
    manifest: "AndroidManifest.xml",
    use_embedded_native_libs: true,
    // The permission configuration *must* be included to ensure security of the device
    required: ["NetworkPermissionConfig"],
}
+29 −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"
          android:sharedUserId="android.uid.networkstack">
    <uses-sdk android:minSdkVersion="29" android:targetSdkVersion="29" />

    <application
        android:process="com.android.networkstack.process"
        android:extractNativeLibs="false"
        android:persistent="true">
    </application>
</manifest>
+29 −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"
          android:versionCode="1"
          android:versionName="R-initial">
    <application
        android:label="Tethering"
        android:defaultToDeviceProtectedStorage="true"
        android:directBootAware="true"
        android:usesCleartextTraffic="true">
    </application>
</manifest>
+40 −0
Original line number Diff line number Diff line
//
// 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.
//

// AIDL interfaces between the core system and the tethering mainline module.
aidl_interface {
    name: "tethering-aidl-interfaces",
    local_include_dir: "src",
    srcs: [
        "src/android/net/ITetheringConnector.aidl",
    ],
    backend: {
        ndk: {
            enabled: false,
        },
        cpp: {
            enabled: false,
        },
    },
}

java_library {
    name: "tethering-client",
    platform_apis: true,
    static_libs: [
        "tethering-aidl-interfaces-java",
    ],
}
+20 −0
Original line number Diff line number Diff line
/**
 * 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 perNmissions and
 * limitations under the License.
 */
package android.net;

/** @hide */
oneway interface ITetheringConnector {
}
Loading