Merge "Create ServiceConnectivityResources" am: d9d976f8f5

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1620871

Change-Id: I91fb801ef2edf64fcaaf082f57eaadb3e7612efa
This commit is contained in:
Remi NGUYEN VAN
2021-03-16 03:11:25 +00:00
committed by Automerger Merge Worker
6 changed files with 167 additions and 0 deletions

View File

@@ -60,6 +60,7 @@ java_library {
"services.core",
"services.net",
"unsupportedappusage",
"ServiceConnectivityResources",
],
static_libs: [
"modules-utils-os",

View File

@@ -0,0 +1,35 @@
//
// Copyright (C) 2021 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.
//
// APK to hold all the wifi overlayable resources.
package {
default_applicable_licenses: ["Android-Apache-2.0"],
}
android_app {
name: "ServiceConnectivityResources",
sdk_version: "system_current",
resource_dirs: [
"res",
],
privileged: true,
export_package_resources: true,
apex_available: [
"com.android.tethering",
],
// TODO: use a dedicated cert once generated
certificate: "platform",
}

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
* Copyright (C) 2021 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 for connectivity resources APK -->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android.connectivity.resources"
coreApp="true"
android:versionCode="1"
android:versionName="S-initial">
<application
android:label="@string/connectivityResourcesAppLabel"
android:defaultToDeviceProtectedStorage="true"
android:directBootAware="true">
<!-- This is only used to identify this app by resolving the action.
The activity is never actually triggered. -->
<activity android:name="android.app.Activity" android:exported="true" android:enabled="true">
<intent-filter>
<action android:name="com.android.server.connectivity.intent.action.SERVICE_CONNECTIVITY_RESOURCES_APK" />
</intent-filter>
</activity>
</application>
</manifest>

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2021 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.
-->
<!-- Configuration values for ConnectivityService
DO NOT EDIT THIS FILE for specific device configuration; instead, use a Runtime Resources
Overlay package following the overlayable.xml configuration in the same directory:
https://source.android.com/devices/architecture/rros -->
<resources>
<!-- Configuration hook for the URL returned by ConnectivityManager#getCaptivePortalServerUrl.
If empty, the returned value is controlled by Settings.Global.CAPTIVE_PORTAL_HTTP_URL,
and if that value is empty, the framework will use a hard-coded default.
This is *NOT* a URL that will always be used by the system network validation to detect
captive portals: NetworkMonitor may use different strategies and will not necessarily use
this URL. NetworkMonitor behaviour should be configured with NetworkStack resource overlays
instead. -->
<!--suppress CheckTagEmptyBody -->
<string translatable="false" name="config_networkCaptivePortalServerUrl"></string>
<!-- The maximum duration (in milliseconds) we expect a network transition to take -->
<integer name="config_networkTransitionTimeout">60000</integer>
<!-- Configuration of network interfaces that support WakeOnLAN -->
<string-array translatable="false" name="config_wakeonlan_supported_interfaces">
<!--
<item>wlan0</item>
<item>eth0</item>
-->
</string-array>
</resources>

View File

@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (C) 2021 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.
-->
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<overlayable name="ServiceConnectivityResourcesConfig">
<policy type="product|system|vendor">
<!-- Configuration values for ConnectivityService -->
<item type="string" name="config_networkCaptivePortalServerUrl"/>
<item type="integer" name="config_networkTransitionTimeout"/>
<item type="array" name="config_wakeonlan_supported_interfaces"/>
</policy>
</overlayable>
</resources>

View File

@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2021 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.
-->
<resources>
<!-- The System Connectivity Resources package is an internal system package that provides
configuration values for system networking that were pre-configured in the device. This
is the name of the package to display in the list of system apps. [CHAR LIMIT=40] -->
<string name="connectivityResourcesAppLabel">System Connectivity Resources</string>
</resources>