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

Commit 119205ec authored by maheshkkv's avatar maheshkkv Committed by Mahesh KKV
Browse files

Register USD service

Flag: android.net.wifi.flags.usd
Bug: 340878198
Test: build successfully
Change-Id: Ie9f519cd05bf98c75a7858bed3bf37d12acd585e
parent a8054f7d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3905,6 +3905,7 @@ package android.content {
    field public static final String WIFI_NL80211_SERVICE = "wifinl80211";
    field @Deprecated public static final String WIFI_RTT_SERVICE = "rttmanager";
    field public static final String WIFI_SCANNING_SERVICE = "wifiscanner";
    field @FlaggedApi("android.net.wifi.flags.usd") public static final String WIFI_USD_SERVICE = "wifi_usd";
  }
  public final class ContextParams {
+14 −0
Original line number Diff line number Diff line
@@ -4249,6 +4249,7 @@ public abstract class Context {
            //@hide: WIFI_RTT_SERVICE,
            //@hide: ETHERNET_SERVICE,
            WIFI_RTT_RANGING_SERVICE,
            WIFI_USD_SERVICE,
            NSD_SERVICE,
            AUDIO_SERVICE,
            AUDIO_DEVICE_VOLUME_SERVICE,
@@ -5090,6 +5091,19 @@ public abstract class Context {
     */
    public static final String WIFI_RTT_RANGING_SERVICE = "wifirtt";


    /**
     * Use with {@link #getSystemService(String)} to retrieve a {@link
     * android.net.wifi.usd.UsdManager} for Unsynchronized Service Discovery (USD) operation.
     *
     * @see #getSystemService(String)
     * @see android.net.wifi.usd.UsdManager
     * @hide
     */
    @FlaggedApi(android.net.wifi.flags.Flags.FLAG_USD)
    @SystemApi
    public static final String WIFI_USD_SERVICE = "wifi_usd";

    /**
     * Use with {@link #getSystemService(String)} to retrieve a {@link
     * android.net.lowpan.LowpanManager} for handling management of
+9 −0
Original line number Diff line number Diff line
@@ -419,6 +419,8 @@ public final class SystemServer implements Dumpable {
            "com.android.server.wifi.aware.WifiAwareService";
    private static final String WIFI_P2P_SERVICE_CLASS =
            "com.android.server.wifi.p2p.WifiP2pService";
    private static final String WIFI_USD_SERVICE_CLASS =
            "com.android.server.wifi.usd.UsdService";
    private static final String CONNECTIVITY_SERVICE_APEX_PATH =
            "/apex/com.android.tethering/javalib/service-connectivity.jar";
    private static final String CONNECTIVITY_SERVICE_INITIALIZER_CLASS =
@@ -2128,6 +2130,13 @@ public final class SystemServer implements Dumpable {
                mSystemServiceManager.startServiceFromJar(
                        WIFI_SCANNING_SERVICE_CLASS, WIFI_APEX_SERVICE_JAR_PATH);
                t.traceEnd();
                // Start USD service
                if (android.net.wifi.flags.Flags.usd()) {
                    t.traceBegin("StartUsd");
                    mSystemServiceManager.startServiceFromJar(
                            WIFI_USD_SERVICE_CLASS, WIFI_APEX_SERVICE_JAR_PATH);
                    t.traceEnd();
                }
            }

            if (context.getPackageManager().hasSystemFeature(