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

Commit 5cd16a26 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Make sensor direct channel creation more robust" into main

parents fde9ab1f a9172098
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -256,8 +256,15 @@ public class SensorController {
                Slog.e(TAG, "Received invalid ParcelFileDescriptor");
                return BAD_VALUE;
            }

            SharedMemory sharedMemory;
            try {
                sharedMemory = SharedMemory.fromFileDescriptor(fd);
            } catch (IllegalArgumentException e) {
                Slog.e(TAG, "Failed to create shared memory: " + e);
                return BAD_VALUE;
            }
            final int channelHandle = sNextDirectChannelHandle.getAndIncrement();
            SharedMemory sharedMemory = SharedMemory.fromFileDescriptor(fd);
            try {
                mCallback.onDirectChannelCreated(channelHandle, sharedMemory);
            } catch (RemoteException e) {