package o; import java.security.BasicPermission; import java.security.Permission; import java.util.StringTokenizer; /* loaded from: classes6.dex */ public final class gqJ extends BasicPermission { private final int b; private final String c; public gqJ(String str, String str2) { super(str, str2); this.c = str2; StringTokenizer stringTokenizer = new StringTokenizer(grR.c(str2), " ,"); int i = 0; while (stringTokenizer.hasMoreTokens()) { String nextToken = stringTokenizer.nextToken(); if (nextToken.equals("threadlocalecimplicitlyca")) { i |= 1; } else if (nextToken.equals("ecimplicitlyca")) { i |= 2; } else if (nextToken.equals("threadlocaldhdefaultparams")) { i |= 4; } else if (nextToken.equals("dhdefaultparams")) { i |= 8; } else if (nextToken.equals("all")) { i = 15; } } if (i != 0) { this.b = i; return; } throw new IllegalArgumentException("unknown permissions passed to mask"); } @Override // java.security.BasicPermission, java.security.Permission public final boolean implies(Permission permission) { if (!(permission instanceof gqJ) || !getName().equals(permission.getName())) { return false; } int i = this.b; int i2 = ((gqJ) permission).b; return (i & i2) == i2; } public final boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof gqJ)) { return false; } gqJ gqj = (gqJ) obj; return this.b == gqj.b && getName().equals(gqj.getName()); } public final int hashCode() { return getName().hashCode() + this.b; } @Override // java.security.BasicPermission, java.security.Permission public final String getActions() { return this.c; } }