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

Commit 28d0a48c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Merge f03c6383 on remote branch"

parents 3372db73 da0e3dd5
Loading
Loading
Loading
Loading
+18 −1
Original line number Diff line number Diff line
@@ -60,6 +60,7 @@ public final class BluetoothLwPwrProximityMonitor implements QBluetoothAdapter.
    /* This timer is triggered in case that BluetoothGatt does not callback when we perform connect/disconnect */
    private Timer     mTimer = null;
    private final int mTimeOutValue = 30*1000;
    public boolean isWriteThresholdNeedToBeCalled = false;
    private final class ConnectTimeOutTask extends TimerTask {
        public void run() {
            if (DBG) Log.d(TAG, "connect timer triggered!");
@@ -139,8 +140,9 @@ public final class BluetoothLwPwrProximityMonitor implements QBluetoothAdapter.
                        stop = true;
                    }
                } else if (newState == BluetoothProfile.STATE_CONNECTED) {
                    if (mState == MONITOR_STATE_STARTING) {
                    if (mState == MONITOR_STATE_STARTING && isWriteThresholdNeedToBeCalled) {
                        if (status == BluetoothGatt.GATT_SUCCESS) {
                            isWriteThresholdNeedToBeCalled = false;
                            if(!mQAdapter.writeRssiThreshold(BluetoothLwPwrProximityMonitor.this, mLowerLimit, mUpperLimit)) {
                                mGattProfile.disconnect();
                                mState = MONITOR_STATE_STOPPING;
@@ -151,6 +153,10 @@ public final class BluetoothLwPwrProximityMonitor implements QBluetoothAdapter.
                            stop = true;
                        }
                    }
                    if (status != BluetoothGatt.GATT_SUCCESS) {
                        mState = MONITOR_STATE_IDLE;
                        stop = true;
                    }
                }
            }
            if (stop && mMonitorCbk != null){
@@ -206,6 +212,7 @@ public final class BluetoothLwPwrProximityMonitor implements QBluetoothAdapter.
    /** @hide */
    public boolean start (int thresh_min, int thresh_max) {
        if (DBG) Log.d(TAG, "start() low=" + thresh_min + ", upper=" + thresh_max);
        isWriteThresholdNeedToBeCalled = true;
        synchronized(mStateLock){
            if (mState != MONITOR_STATE_IDLE) {
                if (DBG) Log.d(TAG, "start() invalid state, monitor is not idle");
@@ -233,6 +240,16 @@ public final class BluetoothLwPwrProximityMonitor implements QBluetoothAdapter.
                        mState = MONITOR_STATE_IDLE;
                        return false;
                    }
                    else {
                        if (mState == MONITOR_STATE_STARTING && isWriteThresholdNeedToBeCalled) {
                            isWriteThresholdNeedToBeCalled = false;
                            if(!mQAdapter.writeRssiThreshold(BluetoothLwPwrProximityMonitor.this, mLowerLimit, mUpperLimit)) {
                                mGattProfile.disconnect();
                                mState = MONITOR_STATE_STOPPING;
                                setTimer(BluetoothLwPwrProximityMonitor.this.new DisconnectTimeOutTask(), mTimeOutValue);
                            }
                        }
                    }
                }
            } catch (IllegalStateException e) {
                mQAdapter.registerLppClient(this, mDevice.getAddress(), false);
+2 −1
Original line number Diff line number Diff line
@@ -5130,7 +5130,8 @@ public class PhoneWindowManager implements WindowManagerPolicy {
        }
        final boolean hapticsDisabled = Settings.System.getIntForUser(mContext.getContentResolver(),
                Settings.System.HAPTIC_FEEDBACK_ENABLED, 0, UserHandle.USER_CURRENT) == 0;
        if (!always && (hapticsDisabled || mKeyguardDelegate.isShowingAndNotHidden())) {
        if (!always && (hapticsDisabled || (mKeyguardDelegate != null
                && mKeyguardDelegate.isShowingAndNotHidden()))) {
            return false;
        }
        long[] pattern = null;
+0 −2
Original line number Diff line number Diff line
@@ -99,8 +99,6 @@ class SupplicantStateTracker extends StateMachine {
            mWifiConfigStore.enableAllNetworks();
            mNetworksDisabledDuringConnect = false;
        }
        /* Disable failed network */
        mWifiConfigStore.disableNetwork(netId, disableReason);
    }

    private void transitionOnSupplicantStateChange(StateChangeResult stateChangeResult) {