37 lines
1.3 KiB
Java
37 lines
1.3 KiB
Java
|
package com.discord.utilities.permissions;
|
||
|
|
||
|
import com.airbnb.lottie.parser.AnimatableValueParser;
|
||
|
import com.discord.api.channel.Channel;
|
||
|
import d0.z.d.m;
|
||
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||
|
/* compiled from: VideoPermissionsManager.kt */
|
||
|
public final class VideoPermissionsManager {
|
||
|
private final PermissionsManager permissionsManager;
|
||
|
|
||
|
public VideoPermissionsManager() {
|
||
|
this(null, 1, null);
|
||
|
}
|
||
|
|
||
|
public VideoPermissionsManager(PermissionsManager permissionsManager) {
|
||
|
m.checkNotNullParameter(permissionsManager, "permissionsManager");
|
||
|
this.permissionsManager = permissionsManager;
|
||
|
}
|
||
|
|
||
|
/* JADX INFO: this call moved to the top of the method (can break code semantics) */
|
||
|
public /* synthetic */ VideoPermissionsManager(PermissionsManager permissionsManager, int i, DefaultConstructorMarker defaultConstructorMarker) {
|
||
|
this((i & 1) != 0 ? new PermissionsManager() : permissionsManager);
|
||
|
}
|
||
|
|
||
|
public final boolean hasVideoPermission(Channel channel, Long l, Long l2) {
|
||
|
m.checkNotNullParameter(channel, "channel");
|
||
|
long h = channel.h();
|
||
|
if (l != null && h == l.longValue()) {
|
||
|
return false;
|
||
|
}
|
||
|
if (AnimatableValueParser.t1(channel)) {
|
||
|
return true;
|
||
|
}
|
||
|
return this.permissionsManager.can(512, l2);
|
||
|
}
|
||
|
}
|