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

Commit b56a48eb authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Bluetooth boot time start service"

parents 9f8fc3c2 bcf75f48
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
@@ -585,19 +585,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
     */
@@ -608,7 +595,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);
    }

    /**
@@ -681,7 +668,7 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
        if (DBG) {
            Log.d(TAG, "Loading stored name and address");
        }
        if (getBluetoothBooleanConfig("config_bluetooth_address_validation", false)
        if (BluetoothProperties.isAdapterAddressValidationEnabled().orElse(false)
                && Settings.Secure.getIntForUser(mContentResolver, BLUETOOTH_NAME, 0,
                    UserHandle.SYSTEM.getIdentifier()) == 0) {
            // if the valid flag is not set, don't load the address and name