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

Commit 336da06a authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Bluetooth boot time start service"

parents 0cc824d6 4ec7282e
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -160,12 +160,6 @@
    <!-- Max number of connected audio devices supported by Bluetooth stack -->
    <integer name="config_bluetooth_max_connected_audio_devices">5</integer>

    <bool name="config_supportBluetoothPersistedState">true</bool>

    <!-- Boolean indicating if current platform need do one-time bluetooth address
    re-validation -->
    <bool name="config_bluetooth_address_validation">false</bool>

    <!-- Boolean indicating if current platform supports HFP inband ringing -->
    <bool name="config_bluetooth_hfp_inband_ringing_support">true</bool>
</resources>
+2 −15
Original line number Diff line number Diff line
@@ -568,19 +568,6 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
        mSystemUiUid = systemUiUid;
    }

    private boolean getBluetoothBooleanConfig(String name, boolean orElse) {
        try {
            Resources bluetoothRes = mContext.getPackageManager()
                    .getResourcesForApplication(BLUETOOTH_PACKAGE_NAME);
            orElse = bluetoothRes.getBoolean(bluetoothRes.getIdentifier(
                    name, "bool", BLUETOOTH_PACKAGE_NAME));
        } catch (PackageManager.NameNotFoundException e) {
            Log.e(TAG, "Unable to retrieve Bluetooth configuration " + name);
            e.printStackTrace();
        }
        return orElse;
    }

    /**
     *  Returns true if airplane mode is currently on
     */
@@ -591,7 +578,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub {

    private boolean supportBluetoothPersistedState() {
        // Set default support to true to copy config default.
        return getBluetoothBooleanConfig("config_supportBluetoothPersistedState", true);
        return BluetoothProperties.isSupportPersistedStateEnabled().orElse(true);
    }

    /**
@@ -664,7 +651,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
        if (DBG) {
            Slog.d(TAG, "Loading stored name and address");
        }
        if (getBluetoothBooleanConfig("config_bluetooth_address_validation", false)
        if (BluetoothProperties.isAdapterAddressValidationEnabled().orElse(false)
                && Settings.Secure.getIntForUser(mContentResolver,
                SECURE_SETTINGS_BLUETOOTH_ADDR_VALID, 0, mUserId)
                == 0) {