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

Commit 02e14df5 authored by Xavier Ducrohet's avatar Xavier Ducrohet
Browse files

Add support for @pending annotation.

This behaves the same as @hide, but can be used to annotate API that are
only hidden pending API approval.

Change-Id: I4c0bf46c6d74ed45a8890ecdfd9b14ce234a5c18
parent 5ee390d8
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -157,7 +157,7 @@ public class Comment
        else if (name.equals("@literal")) {
            mInlineTagsList.add(new LiteralTagInfo(name, name, text, pos));
        }
        else if (name.equals("@hide") || name.equals("@doconly")) {
        else if (name.equals("@hide") || name.equals("@pending") || name.equals("@doconly")) {
            // nothing
        }
        else if (name.equals("@attr")) {
@@ -307,7 +307,7 @@ public class Comment
                mHidden = 0;
                return false;
            }
            boolean b = mText.indexOf("@hide") >= 0;
            boolean b = mText.indexOf("@hide") >= 0 || mText.indexOf("@pending") >= 0;
            mHidden = b ? 1 : 0;
            return b;
        }
+3 −2
Original line number Diff line number Diff line
@@ -979,10 +979,11 @@ public class DroidDoc
    }

    /**
     * Returns true if the given element has an @hide annotation.
     * Returns true if the given element has an @hide or @pending annotation.
     */
    private static boolean hasHideAnnotation(Doc doc) {
        return doc.getRawCommentText().indexOf("@hide") != -1;
        String comment = doc.getRawCommentText();
        return comment.indexOf("@hide") != -1 || comment.indexOf("@pending") != -1;
    }

    /**