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

Commit db57ddda authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Use finally block for Binder.restoreCallingIdentity" am: d6eba76780

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1722680

Change-Id: I9fb2471c55167155e0f91644c22400329e69a5f6
parents d828a596 0a67fabe
Loading
Loading
Loading
Loading
+6 −2
Original line number Original line Diff line number Diff line
@@ -601,9 +601,13 @@ class BluetoothManagerService extends IBluetoothManager.Stub {
        }
        }
        // waive WRITE_SECURE_SETTINGS permission check
        // waive WRITE_SECURE_SETTINGS permission check
        long callingIdentity = Binder.clearCallingIdentity();
        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);
            Binder.restoreCallingIdentity(callingIdentity);
        }
        }
    }


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