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

Commit 171f2e42 authored by Evan Laird's avatar Evan Laird
Browse files

[Sb] Add self-certified network capabilities

This enables SystemUI to register a network callback filtered on the
network capabilities associated with network slices.

Also add the NETWORK_FACTORY permission which is required to eventually
start monitoring these events.

Test: compile
Bug: 270385675
Change-Id: I739a8d5dbe48624e4785f5ebf4cc0a85e0f64da2
parent 6d61f6d4
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@
    <uses-permission android:name="android.permission.PEERS_MAC_ADDRESS"/>
    <uses-permission android:name="android.permission.READ_WIFI_CREDENTIAL"/>
    <uses-permission android:name="android.permission.LOCATION_HARDWARE" />
    <uses-permission android:name="android.permission.NETWORK_FACTORY" />
    <!-- Physical hardware -->
    <uses-permission android:name="android.permission.MANAGE_USB" />
    <uses-permission android:name="android.permission.CONTROL_DISPLAY_BRIGHTNESS" />
@@ -1062,5 +1063,9 @@
            <meta-data android:name="androidx.emoji2.text.EmojiCompatInitializer"
                tools:node="remove" />
        </provider>

        <!-- Allow SystemUI to listen for the capabilities defined in the linked xml -->
        <property android:name="android.net.PROPERTY_SELF_CERTIFIED_CAPABILITIES"
                  android:value="@xml/self_certified_network_capabilities_both" />
    </application>
</manifest>
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2023 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.
  ~
  -->
<network-capabilities-declaration xmlns:android="http://schemas.android.com/apk/res/android">
    <uses-network-capability android:name="NET_CAPABILITY_PRIORITIZE_LATENCY"/>
</network-capabilities-declaration>