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

Commit 669c590c authored by Garfield Tan's avatar Garfield Tan Committed by Android (Google) Code Review
Browse files

Merge "Pass exclusive flag into serial service" into main

parents 163ad3de 18a29022
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -8,6 +8,12 @@
        "core/tests/coretests/src/android/view/inputmethod/.*",
        "core/tests/coretests/src/com/android/internal/inputmethod/.*"
      ]
    },
    {
      "name": "SerialTests",
      "file_patterns": [
        "core/java/android/hardware/serial/.*"
      ]
    }
  ],
  "wear-robolectric-postsubmit": [
+5 −5
Original line number Diff line number Diff line
@@ -32,5 +32,5 @@ interface ISerialManager {
    void unregisterSerialPortListener(in ISerialPortListener listener);

    /** Requests opening a file descriptor for the serial port. */
    void requestOpen(in String portName, in int flags, in ISerialPortResponseCallback callback);
    void requestOpen(in String portName, in int flags, in boolean exclusive, in ISerialPortResponseCallback callback);
}
+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ public final class SerialPort {
        Objects.requireNonNull(executor, "Executor must not be null");
        Objects.requireNonNull(receiver, "Receiver must not be null");
        try {
            mService.requestOpen(mInfo.getName(), flags,
            mService.requestOpen(mInfo.getName(), flags, exclusive,
                    new SerialPortResponseCallback(executor, receiver));
        } catch (RemoteException e) {
            throw e.rethrowFromSystemServer();
+7 −0
Original line number Diff line number Diff line
{
  "presubmit": [
    {
      "name": "SerialTests"
    }
  ]
}
+1 −1
Original line number Diff line number Diff line
@@ -98,7 +98,7 @@ public class SerialManagerService extends ISerialManager.Stub {
    }

    @Override
    public void requestOpen(@NonNull String portName, int flags,
    public void requestOpen(@NonNull String portName, int flags, boolean exclusive,
            @NonNull ISerialPortResponseCallback callback) throws RemoteException {
        synchronized (mLock) {
            try {
Loading