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

Commit b43ffe27 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 6041582 from 7d0b4b38 to rvc-release

Change-Id: Ie981010a35ea6efa8b9ee9b83e33e53298f6b254
parents 3460bad0 7d0b4b38
Loading
Loading
Loading
Loading
+13 −1
Original line number Original line Diff line number Diff line
@@ -71,6 +71,10 @@ public final class Utils {
        return getBytesFromAddress(device.getAddress());
        return getBytesFromAddress(device.getAddress());
    }
    }


    public static byte[] addressToBytes(String address) {
        return getBytesFromAddress(address);
    }

    public static byte[] getBytesFromAddress(String address) {
    public static byte[] getBytesFromAddress(String address) {
        int i, j = 0;
        int i, j = 0;
        byte[] output = new byte[BD_ADDR_LEN];
        byte[] output = new byte[BD_ADDR_LEN];
@@ -286,7 +290,15 @@ public final class Utils {


    public static boolean callerIsSystemOrActiveUser(String tag, String method) {
    public static boolean callerIsSystemOrActiveUser(String tag, String method) {
        if (!checkCaller()) {
        if (!checkCaller()) {
          Log.w(TAG, method + "() - Not allowed for non-active user and non system user");
          Log.w(TAG, method + "() - Not allowed for non-active user and non-system user");
          return false;
        }
        return true;
    }

    public static boolean callerIsSystemOrActiveOrManagedUser(Context context, String tag, String method) {
        if (!checkCallerAllowManagedProfiles(context)) {
          Log.w(TAG, method + "() - Not allowed for non-active user and non-system and non-managed user");
          return false;
          return false;
        }
        }
        return true;
        return true;
+0 −9
Original line number Original line Diff line number Diff line
@@ -916,15 +916,6 @@ class AdapterProperties {
        setScanMode(AbstractionLayer.BT_SCAN_MODE_NONE);
        setScanMode(AbstractionLayer.BT_SCAN_MODE_NONE);
    }
    }


    void onBluetoothDisable() {
        // From STATE_ON to BLE_ON
        debugLog("onBluetoothDisable()");
        // Turn off any Device Search/Inquiry
        mService.cancelDiscovery();
        // Set the scan_mode to NONE (no incoming connections).
        setScanMode(AbstractionLayer.BT_SCAN_MODE_NONE);
    }

    void discoveryStateChangeCallback(int state) {
    void discoveryStateChangeCallback(int state) {
        infoLog("Callback:discoveryStateChangeCallback with state:" + state);
        infoLog("Callback:discoveryStateChangeCallback with state:" + state);
        synchronized (mObject) {
        synchronized (mObject) {
+101 −189

File changed.

Preview size limit exceeded, changes collapsed.

+5 −3
Original line number Original line Diff line number Diff line
@@ -311,10 +311,11 @@ final class RemoteDevices {
        /**
        /**
         * @param mBondState the mBondState to set
         * @param mBondState the mBondState to set
         */
         */
        void setBondState(int mBondState) {
        void setBondState(int newBondState) {
            synchronized (mObject) {
            synchronized (mObject) {
                this.mBondState = mBondState;
                if ((mBondState == BluetoothDevice.BOND_BONDED
                if (mBondState == BluetoothDevice.BOND_NONE) {
                        && newBondState == BluetoothDevice.BOND_BONDING)
                        || newBondState == BluetoothDevice.BOND_NONE) {
                    /* Clearing the Uuids local copy when the device is unpaired. If not cleared,
                    /* Clearing the Uuids local copy when the device is unpaired. If not cleared,
                    cachedBluetoothDevice issued a connect using the local cached copy of uuids,
                    cachedBluetoothDevice issued a connect using the local cached copy of uuids,
                    without waiting for the ACTION_UUID intent.
                    without waiting for the ACTION_UUID intent.
@@ -322,6 +323,7 @@ final class RemoteDevices {
                    mUuids = null;
                    mUuids = null;
                    mAlias = null;
                    mAlias = null;
                }
                }
                mBondState = newBondState;
            }
            }
        }
        }


+129 −14

File changed.

Preview size limit exceeded, changes collapsed.

Loading