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

Commit 426e875c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

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

parents 1207cd5a 026e10c6
Loading
Loading
Loading
Loading
+14 −8
Original line number Original line Diff line number Diff line
@@ -340,20 +340,26 @@ public final class BluetoothPan implements BluetoothProfile {


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

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


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

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