.class public final Landroidx/activity/FullyDrawnReporter; .super Ljava/lang/Object; .source "SourceFile" # annotations .annotation build Lkotlin/jvm/internal/SourceDebugExtension; value = { "SMAP\nFullyDrawnReporter.kt\nKotlin\n*S Kotlin\n*F\n+ 1 FullyDrawnReporter.kt\nandroidx/activity/FullyDrawnReporter\n+ 2 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 3 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n*L\n1#1,192:1\n1#2:193\n1855#3,2:194\n*S KotlinDebug\n*F\n+ 1 FullyDrawnReporter.kt\nandroidx/activity/FullyDrawnReporter\n*L\n157#1:194,2\n*E\n" } .end annotation # instance fields .field private final executor:Ljava/util/concurrent/Executor; .field private final lock:Ljava/lang/Object; .field private final onReportCallbacks:Ljava/util/List; .annotation build Landroidx/annotation/GuardedBy; value = "lock" .end annotation .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/List<", "Lkotlin/jvm/functions/Function0;", ">;" } .end annotation .end field .field private final reportFullyDrawn:Lkotlin/jvm/functions/Function0; .annotation system Ldalvik/annotation/Signature; value = { "Lkotlin/jvm/functions/Function0;" } .end annotation .end field .field private reportPosted:Z .annotation build Landroidx/annotation/GuardedBy; value = "lock" .end annotation .end field .field private final reportRunnable:Ljava/lang/Runnable; .field private reportedFullyDrawn:Z .annotation build Landroidx/annotation/GuardedBy; value = "lock" .end annotation .end field .field private reporterCount:I .annotation build Landroidx/annotation/GuardedBy; value = "lock" .end annotation .end field # direct methods .method public static synthetic $r8$lambda$9oQ81V-Fq3e0CkAqj9HHhVQeVeY(Landroidx/activity/FullyDrawnReporter;)V .locals 0 .line 0 invoke-static {p0}, Landroidx/activity/FullyDrawnReporter;->reportRunnable$lambda$2(Landroidx/activity/FullyDrawnReporter;)V return-void .end method .method public constructor (Ljava/util/concurrent/Executor;Lkotlin/jvm/functions/Function0;)V .locals 1 .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/util/concurrent/Executor;", "Lkotlin/jvm/functions/Function0;", ")V" } .end annotation const-string v0, "executor" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V const-string v0, "reportFullyDrawn" invoke-static {p2, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 52 invoke-direct {p0}, Ljava/lang/Object;->()V iput-object p1, p0, Landroidx/activity/FullyDrawnReporter;->executor:Ljava/util/concurrent/Executor; iput-object p2, p0, Landroidx/activity/FullyDrawnReporter;->reportFullyDrawn:Lkotlin/jvm/functions/Function0; .line 56 new-instance p1, Ljava/lang/Object; invoke-direct {p1}, Ljava/lang/Object;->()V iput-object p1, p0, Landroidx/activity/FullyDrawnReporter;->lock:Ljava/lang/Object; .line 77 new-instance p1, Ljava/util/ArrayList; invoke-direct {p1}, Ljava/util/ArrayList;->()V iput-object p1, p0, Landroidx/activity/FullyDrawnReporter;->onReportCallbacks:Ljava/util/List; .line 79 new-instance p1, Landroidx/activity/FullyDrawnReporter$$ExternalSyntheticLambda0; invoke-direct {p1, p0}, Landroidx/activity/FullyDrawnReporter$$ExternalSyntheticLambda0;->(Landroidx/activity/FullyDrawnReporter;)V iput-object p1, p0, Landroidx/activity/FullyDrawnReporter;->reportRunnable:Ljava/lang/Runnable; return-void .end method .method private final postWhenReportersAreDone()V .locals 2 iget-boolean v0, p0, Landroidx/activity/FullyDrawnReporter;->reportPosted:Z if-nez v0, :cond_0 iget v0, p0, Landroidx/activity/FullyDrawnReporter;->reporterCount:I if-nez v0, :cond_0 const/4 v0, 0x1 iput-boolean v0, p0, Landroidx/activity/FullyDrawnReporter;->reportPosted:Z iget-object v0, p0, Landroidx/activity/FullyDrawnReporter;->executor:Ljava/util/concurrent/Executor; iget-object v1, p0, Landroidx/activity/FullyDrawnReporter;->reportRunnable:Ljava/lang/Runnable; .line 170 invoke-interface {v0, v1}, Ljava/util/concurrent/Executor;->execute(Ljava/lang/Runnable;)V :cond_0 return-void .end method .method private static final reportRunnable$lambda$2(Landroidx/activity/FullyDrawnReporter;)V .locals 2 const-string v0, "this$0" invoke-static {p0, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V .line 80 iget-object v0, p0, Landroidx/activity/FullyDrawnReporter;->lock:Ljava/lang/Object; monitor-enter v0 const/4 v1, 0x0 .line 81 :try_start_0 iput-boolean v1, p0, Landroidx/activity/FullyDrawnReporter;->reportPosted:Z .line 82 iget v1, p0, Landroidx/activity/FullyDrawnReporter;->reporterCount:I if-nez v1, :cond_0 iget-boolean v1, p0, Landroidx/activity/FullyDrawnReporter;->reportedFullyDrawn:Z if-nez v1, :cond_0 .line 83 iget-object v1, p0, Landroidx/activity/FullyDrawnReporter;->reportFullyDrawn:Lkotlin/jvm/functions/Function0; invoke-interface {v1}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object; .line 84 invoke-virtual {p0}, Landroidx/activity/FullyDrawnReporter;->fullyDrawnReported()V goto :goto_0 :catchall_0 move-exception p0 goto :goto_1 .line 86 :cond_0 :goto_0 sget-object p0, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 80 monitor-exit v0 return-void :goto_1 monitor-exit v0 throw p0 .end method # virtual methods .method public final addOnReportDrawnListener(Lkotlin/jvm/functions/Function0;)V .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lkotlin/jvm/functions/Function0;", ")V" } .end annotation const-string v0, "callback" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-object v0, p0, Landroidx/activity/FullyDrawnReporter;->lock:Ljava/lang/Object; .line 125 monitor-enter v0 :try_start_0 iget-boolean v1, p0, Landroidx/activity/FullyDrawnReporter;->reportedFullyDrawn:Z if-eqz v1, :cond_0 const/4 v1, 0x1 goto :goto_0 :cond_0 iget-object v1, p0, Landroidx/activity/FullyDrawnReporter;->onReportCallbacks:Ljava/util/List; .line 129 check-cast v1, Ljava/util/Collection; invoke-interface {v1, p1}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 const/4 v1, 0x0 .line 125 :goto_0 monitor-exit v0 if-eqz v1, :cond_1 .line 134 invoke-interface {p1}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object; :cond_1 return-void :catchall_0 move-exception p1 .line 125 monitor-exit v0 throw p1 .end method .method public final addReporter()V .locals 2 iget-object v0, p0, Landroidx/activity/FullyDrawnReporter;->lock:Ljava/lang/Object; .line 93 monitor-enter v0 :try_start_0 iget-boolean v1, p0, Landroidx/activity/FullyDrawnReporter;->reportedFullyDrawn:Z if-nez v1, :cond_0 iget v1, p0, Landroidx/activity/FullyDrawnReporter;->reporterCount:I add-int/lit8 v1, v1, 0x1 iput v1, p0, Landroidx/activity/FullyDrawnReporter;->reporterCount:I goto :goto_0 :catchall_0 move-exception v1 goto :goto_1 .line 97 :cond_0 :goto_0 sget-object v1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 93 monitor-exit v0 return-void :goto_1 monitor-exit v0 throw v1 .end method .method public final fullyDrawnReported()V .locals 3 .annotation build Landroidx/annotation/RestrictTo; value = { .enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY_GROUP:Landroidx/annotation/RestrictTo$Scope; } .end annotation iget-object v0, p0, Landroidx/activity/FullyDrawnReporter;->lock:Ljava/lang/Object; .line 155 monitor-enter v0 const/4 v1, 0x1 :try_start_0 iput-boolean v1, p0, Landroidx/activity/FullyDrawnReporter;->reportedFullyDrawn:Z iget-object v1, p0, Landroidx/activity/FullyDrawnReporter;->onReportCallbacks:Ljava/util/List; .line 157 check-cast v1, Ljava/lang/Iterable; .line 1855 invoke-interface {v1}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator; move-result-object v1 :goto_0 invoke-interface {v1}, Ljava/util/Iterator;->hasNext()Z move-result v2 if-eqz v2, :cond_0 invoke-interface {v1}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v2 check-cast v2, Lkotlin/jvm/functions/Function0; .line 157 invoke-interface {v2}, Lkotlin/jvm/functions/Function0;->invoke()Ljava/lang/Object; goto :goto_0 :catchall_0 move-exception v1 goto :goto_1 :cond_0 iget-object v1, p0, Landroidx/activity/FullyDrawnReporter;->onReportCallbacks:Ljava/util/List; .line 158 invoke-interface {v1}, Ljava/util/List;->clear()V .line 159 sget-object v1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 155 monitor-exit v0 return-void :goto_1 monitor-exit v0 throw v1 .end method .method public final isFullyDrawnReported()Z .locals 2 iget-object v0, p0, Landroidx/activity/FullyDrawnReporter;->lock:Ljava/lang/Object; .line 73 monitor-enter v0 :try_start_0 iget-boolean v1, p0, Landroidx/activity/FullyDrawnReporter;->reportedFullyDrawn:Z :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 monitor-exit v0 return v1 :catchall_0 move-exception v1 monitor-exit v0 throw v1 .end method .method public final removeOnReportDrawnListener(Lkotlin/jvm/functions/Function0;)V .locals 2 .annotation system Ldalvik/annotation/Signature; value = { "(", "Lkotlin/jvm/functions/Function0;", ")V" } .end annotation const-string v0, "callback" invoke-static {p1, v0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNullParameter(Ljava/lang/Object;Ljava/lang/String;)V iget-object v0, p0, Landroidx/activity/FullyDrawnReporter;->lock:Ljava/lang/Object; .line 143 monitor-enter v0 :try_start_0 iget-object v1, p0, Landroidx/activity/FullyDrawnReporter;->onReportCallbacks:Ljava/util/List; .line 144 check-cast v1, Ljava/util/Collection; invoke-interface {v1, p1}, Ljava/util/Collection;->remove(Ljava/lang/Object;)Z .line 145 sget-object p1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 143 monitor-exit v0 return-void :catchall_0 move-exception p1 monitor-exit v0 throw p1 .end method .method public final removeReporter()V .locals 3 iget-object v0, p0, Landroidx/activity/FullyDrawnReporter;->lock:Ljava/lang/Object; .line 105 monitor-enter v0 :try_start_0 iget-boolean v1, p0, Landroidx/activity/FullyDrawnReporter;->reportedFullyDrawn:Z if-nez v1, :cond_1 iget v1, p0, Landroidx/activity/FullyDrawnReporter;->reporterCount:I if-lez v1, :cond_0 add-int/lit8 v1, v1, -0x1 iput v1, p0, Landroidx/activity/FullyDrawnReporter;->reporterCount:I .line 111 invoke-direct {p0}, Landroidx/activity/FullyDrawnReporter;->postWhenReportersAreDone()V goto :goto_0 :catchall_0 move-exception v1 goto :goto_1 :cond_0 const-string v1, "removeReporter() called when all reporters have already been removed." .line 107 new-instance v2, Ljava/lang/IllegalStateException; invoke-virtual {v1}, Ljava/lang/Object;->toString()Ljava/lang/String; move-result-object v1 invoke-direct {v2, v1}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw v2 .line 113 :cond_1 :goto_0 sget-object v1, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 105 monitor-exit v0 return-void :goto_1 monitor-exit v0 throw v1 .end method