GrantResult.java 542 B

1234567891011121314151617181920212223242526272829303132333435
  1. package com.yyrh.easypermission;
  2. /**
  3. * @className: GrantResult
  4. * @classDescription:申请权限结果枚举类
  5. * @author: Pan_
  6. * @createTime: 2018/10/25
  7. */
  8. public enum GrantResult {
  9. /**
  10. * 授予权限
  11. */
  12. GRANT(0),
  13. /**
  14. * 拒接权限
  15. */
  16. DENIED(-1),
  17. /**
  18. * 之前在requestPremissionRational里面的next接口返回了IGNORE
  19. */
  20. IGNORE(-2);
  21. private int type;
  22. GrantResult(int type) {
  23. this.type = type;
  24. }
  25. public int getValue(){
  26. return type;
  27. }
  28. }