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

Commit f8faf502 authored by Gaurav Bhola's avatar Gaurav Bhola
Browse files

Add a new boolean resource to reset the AirPlane mode after during boot.

- This resource is added specifically to be used for automotive devices where if the device exits from safemode and boots into normal mode, the airplane mode remains enabled. And there is no UI on automotive devices to disable the Airplane mode.
- The value will be overlayed to true for automotive devices.

Bug: 182523956
Test: Override the config and check if airplane mode is disabled in the normal mode.
Change-Id: I829ed8b5aa436a7bc3b75e6308ff507035150586
Merged-In: I829ed8b5aa436a7bc3b75e6308ff507035150586
parent d91988e9
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -5123,4 +5123,10 @@
        <item>@array/config_mainBuiltInDisplayWaterfallCutout</item>
        <item>@array/config_secondaryBuiltInDisplayWaterfallCutout</item>
    </array>

    <!-- Whether the airplane mode should be reset when device boots in non-safemode after exiting
         from safemode.
         This flag should be enabled only when the product does not have any UI to toggle airplane
         mode like automotive devices.-->
    <bool name="config_autoResetAirplaneMode">false</bool>
</resources>
+1 −0
Original line number Diff line number Diff line
@@ -2217,6 +2217,7 @@
  <java-symbol type="string" name="config_primaryLocationTimeZoneProviderPackageName" />
  <java-symbol type="bool" name="config_enableSecondaryLocationTimeZoneProvider" />
  <java-symbol type="string" name="config_secondaryLocationTimeZoneProviderPackageName" />
  <java-symbol type="bool" name="config_autoResetAirplaneMode" />

  <java-symbol type="layout" name="resolver_list" />
  <java-symbol type="id" name="resolver_list" />
+3 −0
Original line number Diff line number Diff line
@@ -1586,6 +1586,9 @@ public final class SystemServer implements Dumpable {
            // all listeners have the chance to react with special handling.
            Settings.Global.putInt(context.getContentResolver(),
                    Settings.Global.AIRPLANE_MODE_ON, 1);
        } else if (context.getResources().getBoolean(R.bool.config_autoResetAirplaneMode)) {
            Settings.Global.putInt(context.getContentResolver(),
                    Settings.Global.AIRPLANE_MODE_ON, 0);
        }

        StatusBarManagerService statusBar = null;