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

Commit 49cb52e2 authored by Bryce Lee's avatar Bryce Lee Committed by Android (Google) Code Review
Browse files

Merge "resolved conflicts for merge of f03ba4f1 to lmp-mr1-dev" into lmp-mr1-dev

parents 720f43e4 fb1cf36a
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -5094,6 +5094,12 @@ public final class Settings {
         */
        public static final String AIRPLANE_MODE_ON = "airplane_mode_on";

        /**
         * Whether Theater Mode is on.
         * {@hide}
         */
        public static final String THEATER_MODE_ON = "theater_mode_on";

        /**
         * Constant for use in AIRPLANE_MODE_RADIOS to specify Bluetooth radio.
         */
+20 −0
Original line number Diff line number Diff line
@@ -453,6 +453,26 @@
    <!-- If this is true, key chords can be used to take a screenshot on the device. -->
    <bool name="config_enableScreenshotChord">true</bool>

    <!-- If this is true, allow wake from theater mode when plugged in or unplugged. -->
    <bool name="config_allowTheaterModeWakeFromUnplug">false</bool>
    <!-- If this is true, allow wake from theater mode from gesture. -->
    <bool name="config_allowTheaterModeWakeFromGesture">false</bool>
    <!-- If this is true, allow wake from theater mode from camera lens cover is switched. -->
    <bool name="config_allowTheaterModeWakeFromCameraLens">false</bool>
    <!-- If this is true, allow wake from theater mode from power key press. -->
    <bool name="config_allowTheaterModeWakeFromPowerKey">true</bool>
    <!-- If this is true, allow wake from theater mode from regular key press. Setting this value to
         true implies config_allowTheaterModeWakeFromPowerKey is also true-->
    <bool name="config_allowTheaterModeWakeFromKey">false</bool>
    <!-- If this is true, allow wake from theater mode from motion. -->
    <bool name="config_allowTheaterModeWakeFromMotion">false</bool>
    <!-- If this is true, allow wake from theater mode from lid switch. -->
    <bool name="config_allowTheaterModeWakeFromLidSwitch">false</bool>
    <!-- If this is true, allow wake from theater mode when docked. -->
    <bool name="config_allowTheaterModeWakeFromDock">false</bool>
    <!-- If this is true, allow wake from theater mode from window layout flag. -->
    <bool name="config_allowTheaterModeWakeFromWindowLayout">false</bool>

    <!-- Auto-rotation behavior -->

    <!-- If true, enables auto-rotation features using the accelerometer.
+9 −0
Original line number Diff line number Diff line
@@ -1571,6 +1571,15 @@
  <java-symbol type="bool" name="config_enableNetworkLocationOverlay" />
  <java-symbol type="bool" name="config_sf_limitedAlpha" />
  <java-symbol type="bool" name="config_unplugTurnsOnScreen" />
  <java-symbol type="bool" name="config_allowTheaterModeWakeFromUnplug" />
  <java-symbol type="bool" name="config_allowTheaterModeWakeFromGesture" />
  <java-symbol type="bool" name="config_allowTheaterModeWakeFromCameraLens" />
  <java-symbol type="bool" name="config_allowTheaterModeWakeFromPowerKey" />
  <java-symbol type="bool" name="config_allowTheaterModeWakeFromKey" />
  <java-symbol type="bool" name="config_allowTheaterModeWakeFromMotion" />
  <java-symbol type="bool" name="config_allowTheaterModeWakeFromLidSwitch" />
  <java-symbol type="bool" name="config_allowTheaterModeWakeFromDock" />
  <java-symbol type="bool" name="config_allowTheaterModeWakeFromWindowLayout" />
  <java-symbol type="bool" name="config_wifi_background_scan_support" />
  <java-symbol type="bool" name="config_wifi_dual_band_support" />
  <java-symbol type="bool" name="config_wimaxEnabled" />
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
    <integer name="def_screen_off_timeout">60000</integer>
    <integer name="def_sleep_timeout">-1</integer>
    <bool name="def_airplane_mode_on">false</bool>
    <bool name="def_theater_mode_on">false</bool>
    <!-- Comma-separated list of bluetooth, wifi, and cell. -->
    <string name="def_airplane_mode_radios" translatable="false">cell,bluetooth,wifi,nfc,wimax</string>
    <string name="airplane_mode_toggleable_radios" translatable="false">bluetooth,wifi,nfc</string>
+27 −3
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ public class DatabaseHelper extends SQLiteOpenHelper {
    // database gets upgraded properly. At a minimum, please confirm that 'upgradeVersion'
    // is properly propagated through your change.  Not doing so will result in a loss of user
    // settings.
    private static final int DATABASE_VERSION = 114;
    private static final int DATABASE_VERSION = 116;

    private Context mContext;
    private int mUserHandle;
@@ -1828,7 +1828,27 @@ public class DatabaseHelper extends SQLiteOpenHelper {
            upgradeVersion = 113;
        }

        if (upgradeVersion < 114) {
        // We skipped 114 to handle a merge conflict with the introduction of theater mode.

        if (upgradeVersion < 115) {
            if (mUserHandle == UserHandle.USER_OWNER) {
                db.beginTransaction();
                SQLiteStatement stmt = null;
                try {
                    stmt = db.compileStatement("INSERT OR IGNORE INTO global(name,value)"
                            + " VALUES(?,?);");
                    loadBooleanSetting(stmt, Global.THEATER_MODE_ON,
                            R.bool.def_theater_mode_on);
                    db.setTransactionSuccessful();
                } finally {
                    db.endTransaction();
                    if (stmt != null) stmt.close();
                }
            }
            upgradeVersion = 115;
        }

        if (upgradeVersion < 116) {
            if (mUserHandle == UserHandle.USER_OWNER) {
                db.beginTransaction();
                SQLiteStatement stmt = null;
@@ -1842,8 +1862,9 @@ public class DatabaseHelper extends SQLiteOpenHelper {
                    if (stmt != null) stmt.close();
                }
            }
            upgradeVersion = 114;
            upgradeVersion = 116;
        }

        // *** Remember to update DATABASE_VERSION above!

        if (upgradeVersion != currentVersion) {
@@ -2440,6 +2461,9 @@ public class DatabaseHelper extends SQLiteOpenHelper {
            loadBooleanSetting(stmt, Settings.Global.AIRPLANE_MODE_ON,
                    R.bool.def_airplane_mode_on);

            loadBooleanSetting(stmt, Settings.Global.THEATER_MODE_ON,
                    R.bool.def_theater_mode_on);

            loadStringSetting(stmt, Settings.Global.AIRPLANE_MODE_RADIOS,
                    R.string.def_airplane_mode_radios);

Loading