Advertisement
Guest User

Untitled

a guest
Aug 27th, 2015
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. public class Result {
  2. public static final int SUCCESS = 0;
  3. public static final int FAIL = 1;
  4. public static final int UNKNOWN = 2;
  5.  
  6. // ...
  7.  
  8. private Result(@Status int status, Uri uri) {
  9. mStatus = status;
  10. mUri = uri;
  11. }
  12.  
  13. public static Result newInstance(@Status int status, Uri uri) {
  14. return new Result(status, uri);
  15. }
  16.  
  17. @Retention(RetentionPolicy.SOURCE)
  18. @IntDef({ SUCCESS, FAIL, UNKNOWN })
  19. @interface Status {}
  20. }
  21.  
  22. public static Result foo() {
  23. // ...
  24. return Result.newInstance(Result.SUCCESS, contentUri); // line 45
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement