markchien | 932da86 | 2019-08-27 10:19:38 +0800 | [diff] [blame] | 1 | // |
| 2 | // Copyright (C) 2019 The Android Open Source Project |
| 3 | // |
| 4 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | // you may not use this file except in compliance with the License. |
| 6 | // You may obtain a copy of the License at |
| 7 | // |
| 8 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | // |
| 10 | // Unless required by applicable law or agreed to in writing, software |
| 11 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | // See the License for the specific language governing permissions and |
| 14 | // limitations under the License. |
| 15 | // |
| 16 | |
| 17 | java_defaults { |
| 18 | name: "TetheringAndroidLibraryDefaults", |
| 19 | platform_apis: true, |
| 20 | srcs: [ |
| 21 | "src/**/*.java", |
markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame^] | 22 | ":framework-tethering-shared-srcs", |
| 23 | ":services-tethering-shared-srcs", |
markchien | 932da86 | 2019-08-27 10:19:38 +0800 | [diff] [blame] | 24 | ], |
| 25 | static_libs: [ |
| 26 | "androidx.annotation_annotation", |
| 27 | "tethering-client", |
| 28 | ], |
| 29 | manifest: "AndroidManifestBase.xml", |
| 30 | } |
| 31 | |
| 32 | // Build tethering static library, used to compile both variants of the tethering. |
| 33 | android_library { |
| 34 | name: "TetheringApiCurrentLib", |
| 35 | defaults: ["TetheringAndroidLibraryDefaults"], |
| 36 | } |
| 37 | |
| 38 | // Common defaults for compiling the actual APK. |
| 39 | java_defaults { |
| 40 | name: "TetheringAppDefaults", |
| 41 | platform_apis: true, |
| 42 | privileged: true, |
| 43 | resource_dirs: [ |
| 44 | "res", |
| 45 | ], |
| 46 | optimize: { |
| 47 | proguard_flags_files: ["proguard.flags"], |
| 48 | }, |
| 49 | } |
| 50 | |
| 51 | // Non-updatable tethering running in the system server process for devices not using the module |
| 52 | // TODO: build in-process tethering APK here. |
| 53 | |
| 54 | // Updatable tethering packaged as an application |
| 55 | android_app { |
| 56 | name: "Tethering", |
| 57 | defaults: ["TetheringAppDefaults"], |
| 58 | static_libs: ["TetheringApiCurrentLib"], |
| 59 | certificate: "networkstack", |
| 60 | manifest: "AndroidManifest.xml", |
| 61 | use_embedded_native_libs: true, |
| 62 | // The permission configuration *must* be included to ensure security of the device |
| 63 | required: ["NetworkPermissionConfig"], |
| 64 | } |
markchien | 43e97e0 | 2019-09-03 15:58:06 +0800 | [diff] [blame^] | 65 | |
| 66 | // This group will be removed when tethering migration is done. |
| 67 | filegroup { |
| 68 | name: "tethering-services-srcs", |
| 69 | srcs: [ |
| 70 | "src/com/android/server/connectivity/tethering/TetheringConfiguration.java", |
| 71 | ], |
| 72 | } |