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

Commit 9450a481 authored by Steven Moreland's avatar Steven Moreland
Browse files

libbinder_ndk: convenience method for okay status

Before:
 return ScopedAStatus(AStatus_newOk());

After:
 return ScopedAStatus::ok();

Bug: 111445392
Test: atest android.binder.cts (using this)
Change-Id: Id45528c101ff3a965d7c84ff5946e48179bf9285
parent 0b14b273
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -198,6 +198,11 @@ class ScopedAStatus : public ScopedAResource<AStatus*, void, AStatus_delete, nul
     * See AStatus_isOk.
     */
    bool isOk() { return get() != nullptr && AStatus_isOk(get()); }

    /**
     * Convenience method for okay status.
     */
    static ScopedAStatus ok() { return ScopedAStatus(AStatus_newOk()); }
};

/**