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

Commit 1aa58527 authored by Hui Peng's avatar Hui Peng Committed by Gerrit Code Review
Browse files

Merge "Tag IBluetooth.aidl#isLogRedactionEnabled as oneway"

parents 0269583b 0b0c1130
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2018,13 +2018,14 @@ public class AdapterService extends Service {
        }

        @Override
        public boolean isLogRedactionEnabled() {
        public void isLogRedactionEnabled(SynchronousResultReceiver receiver) {
            AdapterService service = getService();
            if (service == null) {
                // by default return true
                return true;
                receiver.send(true);
            } else {
                receiver.send(service.isLogRedactionEnabled());
            }
            return service.isLogRedactionEnabled();
        }

        @Override
+5 −2
Original line number Diff line number Diff line
@@ -1477,9 +1477,12 @@ public final class BluetoothDevice implements Parcelable, Attributable {
            }

            try {
                sIsLogRedactionEnabled = service.isLogRedactionEnabled();
                final SynchronousResultReceiver<Boolean> recv = SynchronousResultReceiver.get();
                service.isLogRedactionEnabled(recv);
                sIsLogRedactionEnabled =
                    recv.awaitResultNoInterrupt(getSyncTimeout()).getValue(defaultValue);
                sIsLogRedactionFlagSynced = true;
            } catch (RemoteException e) {
            } catch (RemoteException | TimeoutException e) {
                // by default, set to true
                Log.e(TAG, "Failed to call IBluetooth.isLogRedactionEnabled"
                            + e.toString() + "\n"
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ interface IBluetooth
    @JavaPassthrough(annotation="@android.annotation.RequiresPermission(allOf={android.Manifest.permission.BLUETOOTH_CONNECT,android.Manifest.permission.LOCAL_MAC_ADDRESS})")
    oneway void getAddress(in AttributionSource attributionSource, in SynchronousResultReceiver receiver);
    @JavaPassthrough(annotation="@android.annotation.RequiresNoPermission")
    boolean isLogRedactionEnabled();
    oneway void isLogRedactionEnabled(in SynchronousResultReceiver receiver);
    @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)")
    oneway void getUuids(in AttributionSource attributionSource, in SynchronousResultReceiver receiver);
    @JavaPassthrough(annotation="@android.annotation.RequiresPermission(android.Manifest.permission.BLUETOOTH_CONNECT)")