Loading core/java/android/bluetooth/BluetoothLwPwrProximityMonitor.java +18 −1 Original line number Diff line number Diff line Loading @@ -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!"); Loading Loading @@ -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; Loading @@ -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){ Loading Loading @@ -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"); Loading Loading @@ -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); Loading policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -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; Loading wifi/java/android/net/wifi/SupplicantStateTracker.java +0 −2 Original line number Diff line number Diff line Loading @@ -99,8 +99,6 @@ class SupplicantStateTracker extends StateMachine { mWifiConfigStore.enableAllNetworks(); mNetworksDisabledDuringConnect = false; } /* Disable failed network */ mWifiConfigStore.disableNetwork(netId, disableReason); } private void transitionOnSupplicantStateChange(StateChangeResult stateChangeResult) { Loading Loading
core/java/android/bluetooth/BluetoothLwPwrProximityMonitor.java +18 −1 Original line number Diff line number Diff line Loading @@ -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!"); Loading Loading @@ -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; Loading @@ -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){ Loading Loading @@ -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"); Loading Loading @@ -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); Loading
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java +2 −1 Original line number Diff line number Diff line Loading @@ -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; Loading
wifi/java/android/net/wifi/SupplicantStateTracker.java +0 −2 Original line number Diff line number Diff line Loading @@ -99,8 +99,6 @@ class SupplicantStateTracker extends StateMachine { mWifiConfigStore.enableAllNetworks(); mNetworksDisabledDuringConnect = false; } /* Disable failed network */ mWifiConfigStore.disableNetwork(netId, disableReason); } private void transitionOnSupplicantStateChange(StateChangeResult stateChangeResult) { Loading