[Tether01] Add Tethering App
This is initial patch that don't contain any service for now. Bug: 136040414 Test: -build, flash, boot Change-Id: I0b49d7e9c3fcba5af3025163f9cc9eafb0778116
This commit is contained in:
62
Tethering/Android.bp
Normal file
62
Tethering/Android.bp
Normal file
@@ -0,0 +1,62 @@
|
||||
//
|
||||
// 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
Tethering/AndroidManifest.xml
Normal file
29
Tethering/AndroidManifest.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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
Tethering/AndroidManifestBase.xml
Normal file
29
Tethering/AndroidManifestBase.xml
Normal file
@@ -0,0 +1,29 @@
|
||||
<?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
Tethering/common/TetheringLib/Android.bp
Normal file
40
Tethering/common/TetheringLib/Android.bp
Normal file
@@ -0,0 +1,40 @@
|
||||
//
|
||||
// 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",
|
||||
],
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* 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 {
|
||||
}
|
||||
1
Tethering/proguard.flags
Normal file
1
Tethering/proguard.flags
Normal file
@@ -0,0 +1 @@
|
||||
#TBD
|
||||
7
Tethering/res/values/config.xml
Normal file
7
Tethering/res/values/config.xml
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!--
|
||||
OEMs that wish to change the below settings must do so via a runtime resource overlay package
|
||||
and *NOT* by changing this file. This file is part of the tethering mainline module.
|
||||
-->
|
||||
</resources>
|
||||
Reference in New Issue
Block a user