diff options
author | Roshan Pius <rpius@google.com> | 2019-10-30 13:41:56 -0700 |
---|---|---|
committer | Roshan Pius <rpius@google.com> | 2019-11-07 11:08:35 -0800 |
commit | edd9332616700a2de9e2403fe30b1f39358a3323 (patch) | |
tree | cc91fb139e30a4630350914b78ebcf2dc4c33ab1 /RROOverlaySampleApp | |
parent | 497d9fc7c3c8ff23993a9767d6027ebef513fb69 (diff) |
WifiStack: Expose all wifi resources to be overlayed
All of the wifi resources have been added to overlayable.xml. So, OEMs
can customize all the wifi config values.
Also, added a sample overlay app to demonstrate how OEMs can customize
these overlayable configs.
Bug: 143464763
Test: Verified that the sample overlay app can override configs.
Change-Id: I1a37d346ebf695055b088b7a11b8e5fa12c256b5
Diffstat (limited to 'RROOverlaySampleApp')
-rw-r--r-- | RROOverlaySampleApp/Android.bp | 38 | ||||
-rw-r--r-- | RROOverlaySampleApp/AndroidManifest.xml | 29 | ||||
-rw-r--r-- | RROOverlaySampleApp/AndroidManifest_InProcess.xml | 29 | ||||
-rw-r--r-- | RROOverlaySampleApp/Readme.txt | 6 | ||||
-rw-r--r-- | RROOverlaySampleApp/res/values/config.xml | 23 |
5 files changed, 125 insertions, 0 deletions
diff --git a/RROOverlaySampleApp/Android.bp b/RROOverlaySampleApp/Android.bp new file mode 100644 index 000000000..0f8265ab3 --- /dev/null +++ b/RROOverlaySampleApp/Android.bp @@ -0,0 +1,38 @@ +// +// 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. +// + +android_app { + name: "WifiRROOverlaySampleApp", + resource_dirs: [ + "res", + ], + manifest: "AndroidManifest.xml", + sdk_version: "current", + product_specific: true +} + +// In process version of the overlay. +// TODO (b/135938806): Remove this once the overlay tag can support multiple +// targetPackage attributes. +android_app { + name: "InProcessWifiRROOverlaySampleApp", + resource_dirs: [ + "res", + ], + sdk_version: "current", + manifest: "AndroidManifest_InProcess.xml", + product_specific: true +} diff --git a/RROOverlaySampleApp/AndroidManifest.xml b/RROOverlaySampleApp/AndroidManifest.xml new file mode 100644 index 000000000..d350624a0 --- /dev/null +++ b/RROOverlaySampleApp/AndroidManifest.xml @@ -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. +--> + +<!-- Simple app to demonstrate how OEM's can customize the various overlays exposed by + the wifi stack --> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.android.wifi.overlay.sample" + android:versionCode="1" + android:versionName="1.0"> + <application android:hasCode="false" /> + <overlay + android:targetPackage="com.android.wifi" + android:targetName="WifiCustomization" + android:isStatic="true" + android:priority="0"/> +</manifest> diff --git a/RROOverlaySampleApp/AndroidManifest_InProcess.xml b/RROOverlaySampleApp/AndroidManifest_InProcess.xml new file mode 100644 index 000000000..cf01a7322 --- /dev/null +++ b/RROOverlaySampleApp/AndroidManifest_InProcess.xml @@ -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. +--> + +<!-- Simple app to demonstrate how OEM's can customize the various overlays exposed by + the wifi stack --> +<manifest xmlns:android="http://schemas.android.com/apk/res/android" + package="com.android.wifi.inprocess.overlay.sample" + android:versionCode="1" + android:versionName="1.0"> + <application android:hasCode="false" /> + <overlay + android:targetPackage="com.android.wifi.inprocess" + android:targetName="WifiCustomization" + android:isStatic="true" + android:priority="0"/> +</manifest> diff --git a/RROOverlaySampleApp/Readme.txt b/RROOverlaySampleApp/Readme.txt new file mode 100644 index 000000000..abcd51e55 --- /dev/null +++ b/RROOverlaySampleApp/Readme.txt @@ -0,0 +1,6 @@ +RROOverlaySampleApp: +a) This sample app demonstrates how OEMs can override any of the overlay flags +exposed by the wifi mainline module. +b) The list of values that can be overlayed are listed in service/res/values/overlayable.xml. +c) OEMs can add the flags they want to override in res/values/config.xml of this sample app +and put the sample app in either system, product or vendor partition of the device. diff --git a/RROOverlaySampleApp/res/values/config.xml b/RROOverlaySampleApp/res/values/config.xml new file mode 100644 index 000000000..cf6ab948d --- /dev/null +++ b/RROOverlaySampleApp/res/values/config.xml @@ -0,0 +1,23 @@ +<?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. + */ +--> +<!-- Overrides the default value of the specified config values when this sample app is installed --> +<resources> + <bool translatable="false" name="config_wifi_dual_band_support">true</bool> + <bool translatable="false" name="config_wifi_connected_mac_randomization_supported">true</bool> +</resources> |