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

Commit 5ee25f0b authored by Yuyang Huang's avatar Yuyang Huang
Browse files

remove intent comparison

1. string comparison should not use !=
2. As getAction only returns ACTION_STATE_CHANGED, so based on the filter, comparison is not needed

Bug: 346498545
Test: atest BluetoothInCallServiceTest
Flag: exempt, small fix
Change-Id: I359da4956d435953cc09de02ab59542eb04df827
parent ba6fd213
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -188,10 +188,6 @@ public class BluetoothInCallService extends InCallService {
        @Override
        public void onReceive(Context context, Intent intent) {
            synchronized (LOCK) {
                if (intent.getAction() != BluetoothAdapter.ACTION_STATE_CHANGED) {
                    Log.w(TAG, "BluetoothAdapterReceiver: Intent action " + intent.getAction());
                    return;
                }
                int state =
                        intent.getIntExtra(BluetoothAdapter.EXTRA_STATE, BluetoothAdapter.ERROR);
                Log.d(TAG, "Bluetooth Adapter state: " + state);
@@ -203,7 +199,6 @@ public class BluetoothInCallService extends InCallService {
            }
        }
    }
    ;

    /** Receives events for global state changes of the bluetooth adapter. */
    // TODO: The code is moved from Telecom stack. Since we're running in the BT process itself,