title: Why Android BluetoothDevice.conenctGatt require context if it not use it
body: <p>I'm developing android app for ble communication.</p>
  
  <p>My question is why the function </p>
  
  <pre><code>public BluetoothGatt connectGatt(Context context, boolean autoConnect,BluetoothGattCallback callback, int transport)
  </code></pre>
  
  <p>requires <code>Context</code> as parameter, I dug down the functions and found that it not using it anywhere as you can see here:</p>
  
  <pre><code>public BluetoothGatt connectGatt(Context context, boolean autoConnect,
                                       BluetoothGattCallback callback, int transport,
                                       boolean opportunistic, int phy, Handler handler) {
          if (callback == null)
              throw new NullPointerException("callback is null");
  
          // TODO(Bluetooth) check whether platform support BLE
          //     Do the check here or in GattServer?
          BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter();
          IBluetoothManager managerService = adapter.getBluetoothManager();
          try {
              IBluetoothGatt iGatt = managerService.getBluetoothGatt();
              if (iGatt == null) {
                  // BLE is not supported
                  return null;
              }
              BluetoothGatt gatt = new BluetoothGatt(iGatt, this, transport, opportunistic, phy);
              gatt.connect(autoConnect, callback, handler);
              return gatt;
          } catch (RemoteException e) {Log.e(TAG, "", e);}
          return null;
      }
  </code></pre>
  
  <p>The weird thing is that this property not marked as deprecated too.
  I tried to pass null instead of the context and seems that it works fine () with context or without.</p>
  
  <p>Anyone know why is it there?</p>