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

Commit 19bc67e8 authored by Brad Fitzpatrick's avatar Brad Fitzpatrick Committed by Android Git Automerger
Browse files

am b5daea8a: am eacf0ecd: Merge "Fix StrictMode for Binder.dump()" into gingerbread

Merge commit 'b5daea8a'

* commit 'b5daea8a':
  Fix StrictMode for Binder.dump()
parents 6b164fe0 b5daea8a
Loading
Loading
Loading
Loading
+11 −1
Original line number Diff line number Diff line
@@ -226,9 +226,16 @@ public class Binder implements IBinder {
                    try {
                        fd.close();
                    } catch (IOException e) {
                        // swallowed, not propagated back to the caller
                    }
                }
            }
            // Write the StrictMode header.
            if (reply != null) {
                reply.writeNoException();
            } else {
                StrictMode.clearGatheredViolations();
            }
            return true;
        }
        return false;
@@ -341,12 +348,15 @@ final class BinderProxy implements IBinder {

    public void dump(FileDescriptor fd, String[] args) throws RemoteException {
        Parcel data = Parcel.obtain();
        Parcel reply = Parcel.obtain();
        data.writeFileDescriptor(fd);
        data.writeStringArray(args);
        try {
            transact(DUMP_TRANSACTION, data, null, 0);
            transact(DUMP_TRANSACTION, data, reply, 0);
            reply.readException();
        } finally {
            data.recycle();
            reply.recycle();
        }
    }