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

Commit 941fd175 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Use finally block for Binder.restoreCallingIdentity" into sc-dev-plus-aosp

parents 8dbc1f9b 5ffaea94
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -614,9 +614,13 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
        }
        // waive WRITE_SECURE_SETTINGS permission check
        final 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