MediaProjectionMgr$LocalScreenCaptureAssistantActivity.smali

.class public Lio/agora/rtc2/extensions/MediaProjectionMgr$LocalScreenCaptureAssistantActivity;
.super Landroid/app/Activity;
.source "MediaProjectionMgr.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lio/agora/rtc2/extensions/MediaProjectionMgr;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x9
    name = "LocalScreenCaptureAssistantActivity"
.end annotation


# static fields
.field public static final MEDIA_PROJECTION_REQUEST_CODE:I = 0x3e9


# instance fields
.field mgrWeakReference:Ljava/lang/ref/WeakReference;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/ref/WeakReference<",
            "Lio/agora/rtc2/extensions/MediaProjectionMgr;",
            ">;"
        }
    .end annotation
.end field


# direct methods
.method public constructor <init>()V
    .registers 1

    .line 200
    invoke-direct {p0}, Landroid/app/Activity;-><init>()V

    return-void
.end method


# virtual methods
.method protected onActivityResult(IILandroid/content/Intent;)V
    .registers 6

    .line 228
    invoke-super {p0, p1, p2, p3}, Landroid/app/Activity;->onActivityResult(IILandroid/content/Intent;)V

    .line 229
    iget-object v0, p0, Lio/agora/rtc2/extensions/MediaProjectionMgr$LocalScreenCaptureAssistantActivity;->mgrWeakReference:Ljava/lang/ref/WeakReference;

    invoke-virtual {v0}, Ljava/lang/ref/WeakReference;->get()Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Lio/agora/rtc2/extensions/MediaProjectionMgr;

    const/16 v1, 0x3e9

    if-ne p1, v1, :cond_14

    if-eqz v0, :cond_14

    .line 231
    invoke-virtual {v0, p2, p3}, Lio/agora/rtc2/extensions/MediaProjectionMgr;->onRequestResult(ILandroid/content/Intent;)V

    .line 233
    :cond_14
    invoke-virtual {p0}, Lio/agora/rtc2/extensions/MediaProjectionMgr$LocalScreenCaptureAssistantActivity;->finish()V

    return-void
.end method

.method public onCreate(Landroid/os/Bundle;)V
    .registers 4

    .line 207
    invoke-super {p0, p1}, Landroid/app/Activity;->onCreate(Landroid/os/Bundle;)V

    const/4 p1, 0x1

    .line 208
    invoke-virtual {p0, p1}, Lio/agora/rtc2/extensions/MediaProjectionMgr$LocalScreenCaptureAssistantActivity;->requestWindowFeature(I)Z

    .line 210
    # getter for: Lio/agora/rtc2/extensions/MediaProjectionMgr;->instance:Lio/agora/rtc2/extensions/MediaProjectionMgr;
    invoke-static {}, Lio/agora/rtc2/extensions/MediaProjectionMgr;->access$000()Lio/agora/rtc2/extensions/MediaProjectionMgr;

    move-result-object p1

    if-nez p1, :cond_11

    .line 212
    invoke-virtual {p0}, Lio/agora/rtc2/extensions/MediaProjectionMgr$LocalScreenCaptureAssistantActivity;->finish()V

    return-void

    .line 215
    :cond_11
    new-instance v0, Ljava/lang/ref/WeakReference;

    invoke-direct {v0, p1}, Ljava/lang/ref/WeakReference;-><init>(Ljava/lang/Object;)V

    iput-object v0, p0, Lio/agora/rtc2/extensions/MediaProjectionMgr$LocalScreenCaptureAssistantActivity;->mgrWeakReference:Ljava/lang/ref/WeakReference;

    .line 216
    # getter for: Lio/agora/rtc2/extensions/MediaProjectionMgr;->projectionManager:Landroid/media/projection/MediaProjectionManager;
    invoke-static {p1}, Lio/agora/rtc2/extensions/MediaProjectionMgr;->access$100(Lio/agora/rtc2/extensions/MediaProjectionMgr;)Landroid/media/projection/MediaProjectionManager;

    move-result-object p1

    invoke-virtual {p1}, Landroid/media/projection/MediaProjectionManager;->createScreenCaptureIntent()Landroid/content/Intent;

    move-result-object p1

    const-string v0, "MediaProjectionMgr"

    const-string v1, "start screen capture request"

    .line 217
    invoke-static {v0, v1}, Lio/agora/rtc2/extensions/MediaProjectionSource;->logD(Ljava/lang/String;Ljava/lang/String;)V

    const/16 v0, 0x3e9

    .line 218
    invoke-virtual {p0, p1, v0}, Lio/agora/rtc2/extensions/MediaProjectionMgr$LocalScreenCaptureAssistantActivity;->startActivityForResult(Landroid/content/Intent;I)V

    .line 220
    # getter for: Lio/agora/rtc2/extensions/MediaProjectionMgr;->captureActionListener:Lio/agora/rtc2/extensions/MediaProjectionMgr$ScreenCaptureActionListener;
    invoke-static {}, Lio/agora/rtc2/extensions/MediaProjectionMgr;->access$200()Lio/agora/rtc2/extensions/MediaProjectionMgr$ScreenCaptureActionListener;

    move-result-object p1

    if-eqz p1, :cond_39

    .line 222
    # getter for: Lio/agora/rtc2/extensions/MediaProjectionMgr;->captureActionListener:Lio/agora/rtc2/extensions/MediaProjectionMgr$ScreenCaptureActionListener;
    invoke-static {}, Lio/agora/rtc2/extensions/MediaProjectionMgr;->access$200()Lio/agora/rtc2/extensions/MediaProjectionMgr$ScreenCaptureActionListener;

    move-result-object p1

    invoke-interface {p1}, Lio/agora/rtc2/extensions/MediaProjectionMgr$ScreenCaptureActionListener;->screenCaptureRequest()V

    :cond_39
    return-void
.end method