RNCWebViewModule$a.smali
.class public final Lcom/reactnativecommunity/webview/RNCWebViewModule$a;
.super Ljava/lang/Object;
.source "SourceFile"
# interfaces
.implements Lcom/facebook/react/modules/core/PermissionListener;
# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
value = Lcom/reactnativecommunity/webview/RNCWebViewModule;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x1
name = null
.end annotation
# instance fields
.field public final synthetic a:Lcom/reactnativecommunity/webview/RNCWebViewModule;
# direct methods
.method public constructor <init>(Lcom/reactnativecommunity/webview/RNCWebViewModule;)V
.registers 2
iput-object p1, p0, Lcom/reactnativecommunity/webview/RNCWebViewModule$a;->a:Lcom/reactnativecommunity/webview/RNCWebViewModule;
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
return-void
.end method
# virtual methods
.method public final onRequestPermissionsResult(I[Ljava/lang/String;[I)Z
.registers 5
const/4 p2, 0x0
const/4 v0, 0x1
if-eq p1, v0, :cond_5
return p2
.line 1
:cond_5
array-length p1, p3
if-lez p1, :cond_1a
aget p1, p3, p2
if-nez p1, :cond_1a
.line 2
iget-object p1, p0, Lcom/reactnativecommunity/webview/RNCWebViewModule$a;->a:Lcom/reactnativecommunity/webview/RNCWebViewModule;
# getter for: Lcom/reactnativecommunity/webview/RNCWebViewModule;->downloadRequest:Landroid/app/DownloadManager$Request;
invoke-static {p1}, Lcom/reactnativecommunity/webview/RNCWebViewModule;->access$000(Lcom/reactnativecommunity/webview/RNCWebViewModule;)Landroid/app/DownloadManager$Request;
move-result-object p1
if-eqz p1, :cond_2d
.line 3
iget-object p1, p0, Lcom/reactnativecommunity/webview/RNCWebViewModule$a;->a:Lcom/reactnativecommunity/webview/RNCWebViewModule;
invoke-virtual {p1}, Lcom/reactnativecommunity/webview/RNCWebViewModule;->downloadFile()V
goto :goto_2d
.line 4
:cond_1a
iget-object p1, p0, Lcom/reactnativecommunity/webview/RNCWebViewModule$a;->a:Lcom/reactnativecommunity/webview/RNCWebViewModule;
# invokes: Lcom/facebook/react/bridge/ReactContextBaseJavaModule;->getCurrentActivity()Landroid/app/Activity;
invoke-static {p1}, Lcom/reactnativecommunity/webview/RNCWebViewModule;->access$100(Lcom/reactnativecommunity/webview/RNCWebViewModule;)Landroid/app/Activity;
move-result-object p1
invoke-virtual {p1}, Landroid/content/Context;->getApplicationContext()Landroid/content/Context;
move-result-object p1
const-string p2, "Cannot download files as permission was denied. Please provide permission to write to storage, in order to download files."
invoke-static {p1, p2, v0}, Landroid/widget/Toast;->makeText(Landroid/content/Context;Ljava/lang/CharSequence;I)Landroid/widget/Toast;
move-result-object p1
invoke-virtual {p1}, Landroid/widget/Toast;->show()V
:cond_2d
:goto_2d
return v0
.end method