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

Commit d6eba767 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Use finally block for Binder.restoreCallingIdentity"

parents 6f61cdcc 013cb91a
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -601,9 +601,13 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
        }
        // waive WRITE_SECURE_SETTINGS permission check
        long callingIdentity = Binder.clearCallingIdentity();
        Settings.Global.putInt(mContext.getContentResolver(), Settings.Global.BLUETOOTH_ON, value);
        try {
            Settings.Global.putInt(mContext.getContentResolver(),
                    Settings.Global.BLUETOOTH_ON, value);
        } finally {
            Binder.restoreCallingIdentity(callingIdentity);
        }
    }

    /**
     * Returns true if the Bluetooth Adapter's name and address is