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

Commit 346ac313 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira Committed by Gerrit Code Review
Browse files

Revert "Bluetooth: Check for mPanservice before changing tethering state"

This reverts commit f6b10f49, as
it actually breaks the error condition that's expected to happen
when a non-allowed app tries to toggle tethering

Change-Id: I197adee1f95657ce3072d2f9df343c3049413bbc
parent 6d9989ce
Loading
Loading
Loading
Loading
+8 −14
Original line number Diff line number Diff line
@@ -340,26 +340,20 @@ 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;
    }