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

Commit 0a5da718 authored by Hemant Gupta's avatar Hemant Gupta Committed by Android Git Automerger
Browse files

am 2ea2465f: am 58fbffc3: Bluetooth: Check for mPanService before changing tethering state

* commit '2ea2465f':
  Bluetooth: Check for mPanService before changing tethering state
parents 4792e366 2ea2465f
Loading
Loading
Loading
Loading
+14 −8
Original line number Diff line number Diff line
@@ -333,20 +333,26 @@ public final class BluetoothPan implements BluetoothProfile {

    public void setBluetoothTethering(boolean value) {
        if (DBG) log("setBluetoothTethering(" + value + ")");

        if (mPanService != null && isEnabled()) {
            try {
                mPanService.setBluetoothTethering(value);
            } catch (RemoteException e) {
                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
            }
        }
    }

    public boolean isTetheringOn() {
        if (VDBG) log("isTetheringOn()");

        if (mPanService != null && isEnabled()) {
            try {
                return mPanService.isTetheringOn();
            } catch (RemoteException e) {
                Log.e(TAG, "Stack:" + Log.getStackTraceString(new Throwable()));
            }
        }
        return false;
    }