.class public final Landroidx/window/embedding/ExtensionEmbeddingBackend$Companion; .super Ljava/lang/Object; .source "ExtensionEmbeddingBackend.kt" # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Landroidx/window/embedding/ExtensionEmbeddingBackend; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x19 name = "Companion" .end annotation .annotation runtime Lkotlin/Metadata; d1 = { "\u00004\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0008\u0002\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0008\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\u0008\n\u0002\u0008\u0002\u0008\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\u0008\u0002\u00a2\u0006\u0002\u0010\u0002J\u0006\u0010\t\u001a\u00020\u0006J\n\u0010\n\u001a\u0004\u0018\u00010\u000bH\u0002J\u0017\u0010\u000c\u001a\u00020\r2\u0008\u0010\u000e\u001a\u0004\u0018\u00010\u000fH\u0007\u00a2\u0006\u0002\u0010\u0010R\u000e\u0010\u0003\u001a\u00020\u0004X\u0082T\u00a2\u0006\u0002\n\u0000R\u0010\u0010\u0005\u001a\u0004\u0018\u00010\u0006X\u0082\u000e\u00a2\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\u0008X\u0082\u0004\u00a2\u0006\u0002\n\u0000\u00a8\u0006\u0011" } d2 = { "Landroidx/window/embedding/ExtensionEmbeddingBackend$Companion;", "", "()V", "TAG", "", "globalInstance", "Landroidx/window/embedding/ExtensionEmbeddingBackend;", "globalLock", "Ljava/util/concurrent/locks/ReentrantLock;", "getInstance", "initAndVerifyEmbeddingExtension", "Landroidx/window/embedding/EmbeddingInterfaceCompat;", "isExtensionVersionSupported", "", "extensionVersion", "", "(Ljava/lang/Integer;)Z", "window_release" } k = 0x1 mv = { 0x1, 0x6, 0x0 } xi = 0x30 .end annotation # direct methods .method private constructor ()V .locals 0 .line 48 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method .method public synthetic constructor (Lkotlin/jvm/internal/DefaultConstructorMarker;)V .locals 0 invoke-direct {p0}, Landroidx/window/embedding/ExtensionEmbeddingBackend$Companion;->()V return-void .end method .method private final initAndVerifyEmbeddingExtension()Landroidx/window/embedding/EmbeddingInterfaceCompat; .locals 3 const-string v0, "EmbeddingBackend" const/4 v1, 0x0 .line 74 :try_start_0 sget-object v2, Landroidx/window/embedding/EmbeddingCompat;->Companion:Landroidx/window/embedding/EmbeddingCompat$Companion; invoke-virtual {v2}, Landroidx/window/embedding/EmbeddingCompat$Companion;->getExtensionApiLevel()Ljava/lang/Integer; move-result-object v2 invoke-virtual {p0, v2}, Landroidx/window/embedding/ExtensionEmbeddingBackend$Companion;->isExtensionVersionSupported(Ljava/lang/Integer;)Z move-result p0 if-eqz p0, :cond_0 .line 75 sget-object p0, Landroidx/window/embedding/EmbeddingCompat;->Companion:Landroidx/window/embedding/EmbeddingCompat$Companion; invoke-virtual {p0}, Landroidx/window/embedding/EmbeddingCompat$Companion;->isEmbeddingAvailable()Z move-result p0 if-eqz p0, :cond_0 .line 77 new-instance p0, Landroidx/window/embedding/EmbeddingCompat; invoke-direct {p0}, Landroidx/window/embedding/EmbeddingCompat;->()V check-cast p0, Landroidx/window/embedding/EmbeddingInterfaceCompat; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 move-object v1, p0 goto :goto_0 :catchall_0 move-exception p0 const-string v2, "Failed to load embedding extension: " .line 82 invoke-static {v2, p0}, Lkotlin/jvm/internal/Intrinsics;->stringPlus(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String; move-result-object p0 invoke-static {v0, p0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I :cond_0 :goto_0 if-nez v1, :cond_1 const-string p0, "No supported embedding extension found" .line 88 invoke-static {v0, p0}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I :cond_1 return-object v1 .end method # virtual methods .method public final getInstance()Landroidx/window/embedding/ExtensionEmbeddingBackend; .locals 2 .line 55 invoke-static {}, Landroidx/window/embedding/ExtensionEmbeddingBackend;->access$getGlobalInstance$cp()Landroidx/window/embedding/ExtensionEmbeddingBackend; move-result-object p0 if-nez p0, :cond_1 .line 56 invoke-static {}, Landroidx/window/embedding/ExtensionEmbeddingBackend;->access$getGlobalLock$cp()Ljava/util/concurrent/locks/ReentrantLock; move-result-object p0 check-cast p0, Ljava/util/concurrent/locks/Lock; invoke-interface {p0}, Ljava/util/concurrent/locks/Lock;->lock()V .line 57 :try_start_0 invoke-static {}, Landroidx/window/embedding/ExtensionEmbeddingBackend;->access$getGlobalInstance$cp()Landroidx/window/embedding/ExtensionEmbeddingBackend; move-result-object v0 if-nez v0, :cond_0 .line 58 sget-object v0, Landroidx/window/embedding/ExtensionEmbeddingBackend;->Companion:Landroidx/window/embedding/ExtensionEmbeddingBackend$Companion; invoke-direct {v0}, Landroidx/window/embedding/ExtensionEmbeddingBackend$Companion;->initAndVerifyEmbeddingExtension()Landroidx/window/embedding/EmbeddingInterfaceCompat; move-result-object v0 .line 59 sget-object v1, Landroidx/window/embedding/ExtensionEmbeddingBackend;->Companion:Landroidx/window/embedding/ExtensionEmbeddingBackend$Companion; new-instance v1, Landroidx/window/embedding/ExtensionEmbeddingBackend; invoke-direct {v1, v0}, Landroidx/window/embedding/ExtensionEmbeddingBackend;->(Landroidx/window/embedding/EmbeddingInterfaceCompat;)V invoke-static {v1}, Landroidx/window/embedding/ExtensionEmbeddingBackend;->access$setGlobalInstance$cp(Landroidx/window/embedding/ExtensionEmbeddingBackend;)V .line 61 :cond_0 sget-object v0, Lkotlin/Unit;->INSTANCE:Lkotlin/Unit; :try_end_0 .catchall {:try_start_0 .. :try_end_0} :catchall_0 .line 56 invoke-interface {p0}, Ljava/util/concurrent/locks/Lock;->unlock()V goto :goto_0 :catchall_0 move-exception v0 invoke-interface {p0}, Ljava/util/concurrent/locks/Lock;->unlock()V throw v0 .line 63 :cond_1 :goto_0 invoke-static {}, Landroidx/window/embedding/ExtensionEmbeddingBackend;->access$getGlobalInstance$cp()Landroidx/window/embedding/ExtensionEmbeddingBackend; move-result-object p0 invoke-static {p0}, Lkotlin/jvm/internal/Intrinsics;->checkNotNull(Ljava/lang/Object;)V return-object p0 .end method .method public final isExtensionVersionSupported(Ljava/lang/Integer;)Z .locals 1 const/4 p0, 0x0 if-nez p1, :cond_0 return p0 .line 104 :cond_0 invoke-virtual {p1}, Ljava/lang/Integer;->intValue()I move-result p1 const/4 v0, 0x1 if-lt p1, v0, :cond_1 move p0, v0 :cond_1 return p0 .end method