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

Commit e9225d75 authored by maheshkkv's avatar maheshkkv
Browse files

Add build time overlay for Wifi USD feature support

Bug: 381863785
Bug: 340878198
Flag: android.net.wifi.flags.usd
Test: atest FrameworksWifiApiTests
Change-Id: I1e0956dcd4d5b9879d86cb9f49d7e4f08eaa0876
parent 52f31f18
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -7280,4 +7280,7 @@
         features. Examples include the search functionality or the app
         predictor. -->
    <string name="config_systemVendorIntelligence" translatable="false"></string>

    <!-- Whether the device supports Wi-Fi USD feature. -->
    <bool name="config_deviceSupportsWifiUsd">false</bool>
</resources>
+2 −0
Original line number Diff line number Diff line
@@ -5884,5 +5884,7 @@
  <java-symbol type="dimen" name="config_shapeCornerRadiusLarge"/>
  <java-symbol type="dimen" name="config_shapeCornerRadiusXlarge"/>

  <!-- Whether the device supports Wi-Fi USD feature. -->
  <java-symbol type="bool" name="config_deviceSupportsWifiUsd" />

</resources>
+8 −7
Original line number Diff line number Diff line
@@ -2150,13 +2150,14 @@ 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 (android.net.wifi.flags.Flags.usd() && context.getResources().getBoolean(
                    com.android.internal.R.bool.config_deviceSupportsWifiUsd)) {
                t.traceBegin("StartWifiUsd");
                mSystemServiceManager.startServiceFromJar(WIFI_USD_SERVICE_CLASS,
                        WIFI_APEX_SERVICE_JAR_PATH);
                t.traceEnd();
            }

            if (context.getPackageManager().hasSystemFeature(