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

Commit 3f3a1918 authored by Android Build Merger (Role)'s avatar Android Build Merger (Role) Committed by Android (Google) Code Review
Browse files

Merge "Merge "Adding a new config and Setting for WiFi Wakeup." into oc-dev...

Merge "Merge "Adding a new config and Setting for WiFi Wakeup." into oc-dev am: b569eedf" into oc-dev-plus-aosp
parents fddf3e83 fb94305b
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -8314,6 +8314,17 @@ public final class Settings {
        @SystemApi
        public static final String WIFI_WAKEUP_ENABLED = "wifi_wakeup_enabled";

        /**
         * Value to specify if Wi-Fi Wakeup is available.
         *
         * Wi-Fi Wakeup will only operate if it's available
         * and {@link #WIFI_WAKEUP_ENABLED} is true.
         *
         * Type: int (0 for false, 1 for true)
         * @hide
         */
        public static final String WIFI_WAKEUP_AVAILABLE = "wifi_wakeup_available";

        /**
         * Value to specify whether network quality scores and badging should be shown in the UI.
         *
+6 −0
Original line number Diff line number Diff line
@@ -393,6 +393,12 @@
    <!-- Activity name to enable wifi tethering after provisioning app succeeds -->
    <string translatable="false" name="config_wifi_tether_enable">com.android.settings/.TetherService</string>

    <!-- Controls the WiFi wakeup feature.
          0 = Not available.
          1 = Available.
     -->
    <integer translatable="false" name="config_wifi_wakeup_available">0</integer>

    <!-- Array of ConnectivityManager.TYPE_xxxx values allowable for tethering -->
    <!-- Common options are [1, 4] for TYPE_WIFI and TYPE_MOBILE_DUN or
    <!== [0,1,5,7] for TYPE_MOBILE, TYPE_WIFI, TYPE_MOBILE_HIPRI and TYPE_BLUETOOTH -->
+1 −0
Original line number Diff line number Diff line
@@ -2091,6 +2091,7 @@
  <java-symbol type="string" name="config_mobile_hotspot_provision_response" />
  <java-symbol type="integer" name="config_mobile_hotspot_provision_check_period" />
  <java-symbol type="string" name="config_wifi_tether_enable" />
  <java-symbol type="integer" name="config_wifi_wakeup_available" />
  <java-symbol type="bool" name="config_intrusiveNotificationLed" />
  <java-symbol type="dimen" name="preference_fragment_padding_bottom" />
  <java-symbol type="dimen" name="preference_fragment_padding_side" />
+20 −1
Original line number Diff line number Diff line
@@ -2899,7 +2899,7 @@ public class SettingsProvider extends ContentProvider {
        }

        private final class UpgradeController {
            private static final int SETTINGS_VERSION = 144;
            private static final int SETTINGS_VERSION = 145;

            private final int mUserId;

@@ -3481,6 +3481,25 @@ public class SettingsProvider extends ContentProvider {
                    currentVersion = 144;
                }

                if (currentVersion == 144) {
                    // Version 145: Set the default value for WIFI_WAKEUP_AVAILABLE.
                    if (userId == UserHandle.USER_SYSTEM) {
                        final SettingsState globalSettings = getGlobalSettingsLocked();
                        final Setting currentSetting = globalSettings.getSettingLocked(
                                Settings.Global.WIFI_WAKEUP_AVAILABLE);
                        if (currentSetting.isNull()) {
                            final int defaultValue = getContext().getResources().getInteger(
                                    com.android.internal.R.integer.config_wifi_wakeup_available);
                            globalSettings.insertSettingLocked(
                                    Settings.Global.WIFI_WAKEUP_AVAILABLE,
                                    String.valueOf(defaultValue),
                                    null, true, SettingsState.SYSTEM_PACKAGE_NAME);
                        }
                    }

                    currentVersion = 145;
                }

                // vXXX: Add new settings above this point.

                if (currentVersion != newVersion) {