.class public final Landroidx/camera/camera2/internal/u0; .super Ljava/lang/Object; .source "Camera2DeviceSurfaceManager.java" # interfaces .implements Lx/l; # static fields .field public static final c:Ljava/lang/String; = "Camera2DeviceSurfaceManager" # instance fields .field public final a:Ljava/util/Map; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/Map<", "Ljava/lang/String;", "Landroidx/camera/camera2/internal/d2;", ">;" } .end annotation .end field .field public final b:Landroidx/camera/camera2/internal/d; # direct methods .method public constructor (Landroid/content/Context;Landroidx/camera/camera2/internal/d;Ljava/lang/Object;Ljava/util/Set;)V .locals 1 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # Landroidx/camera/camera2/internal/d; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p3 # Ljava/lang/Object; .annotation build Landroidx/annotation/Nullable; .end annotation .end param .param p4 # Ljava/util/Set; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .annotation system Ldalvik/annotation/MethodParameters; accessFlags = { 0x0, 0x0, 0x0, 0x0 } names = { "context", "camcorderProfileHelper", "cameraManager", "availableCameraIds" } .end annotation .annotation system Ldalvik/annotation/Signature; value = { "(", "Landroid/content/Context;", "Landroidx/camera/camera2/internal/d;", "Ljava/lang/Object;", "Ljava/util/Set<", "Ljava/lang/String;", ">;)V" } .end annotation .annotation system Ldalvik/annotation/Throws; value = { Landroidx/camera/core/CameraUnavailableException; } .end annotation .line 2 invoke-direct {p0}, Ljava/lang/Object;->()V .line 3 new-instance v0, Ljava/util/HashMap; invoke-direct {v0}, Ljava/util/HashMap;->()V iput-object v0, p0, Landroidx/camera/camera2/internal/u0;->a:Ljava/util/Map; .line 4 invoke-static {p2}, Lr1/o;->k(Ljava/lang/Object;)Ljava/lang/Object; .line 5 iput-object p2, p0, Landroidx/camera/camera2/internal/u0;->b:Landroidx/camera/camera2/internal/d; .line 6 instance-of p2, p3, Ls/k; if-eqz p2, :cond_0 .line 7 check-cast p3, Ls/k; goto :goto_0 .line 8 :cond_0 invoke-static {p1}, Ls/k;->a(Landroid/content/Context;)Ls/k; move-result-object p3 .line 9 :goto_0 invoke-virtual {p0, p1, p3, p4}, Landroidx/camera/camera2/internal/u0;->d(Landroid/content/Context;Ls/k;Ljava/util/Set;)V return-void .end method .method public constructor (Landroid/content/Context;Ljava/lang/Object;Ljava/util/Set;)V .locals 1 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # Ljava/lang/Object; .annotation build Landroidx/annotation/Nullable; .end annotation .end param .param p3 # Ljava/util/Set; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .annotation build Landroidx/annotation/RestrictTo; value = { .enum Landroidx/annotation/RestrictTo$Scope;->LIBRARY:Landroidx/annotation/RestrictTo$Scope; } .end annotation .annotation system Ldalvik/annotation/MethodParameters; accessFlags = { 0x0, 0x0, 0x0 } names = { "context", "cameraManager", "availableCameraIds" } .end annotation .annotation system Ldalvik/annotation/Signature; value = { "(", "Landroid/content/Context;", "Ljava/lang/Object;", "Ljava/util/Set<", "Ljava/lang/String;", ">;)V" } .end annotation .annotation system Ldalvik/annotation/Throws; value = { Landroidx/camera/core/CameraUnavailableException; } .end annotation .line 1 new-instance v0, Landroidx/camera/camera2/internal/u0$a; invoke-direct {v0}, Landroidx/camera/camera2/internal/u0$a;->()V invoke-direct {p0, p1, v0, p2, p3}, Landroidx/camera/camera2/internal/u0;->(Landroid/content/Context;Landroidx/camera/camera2/internal/d;Ljava/lang/Object;Ljava/util/Set;)V return-void .end method # virtual methods .method public a(Ljava/lang/String;ILandroid/util/Size;)Landroidx/camera/core/impl/SurfaceConfig; .locals 1 .param p1 # Ljava/lang/String; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p3 # Landroid/util/Size; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .annotation build Landroidx/annotation/Nullable; .end annotation .annotation system Ldalvik/annotation/MethodParameters; accessFlags = { 0x0, 0x0, 0x0 } names = { "cameraId", "imageFormat", "size" } .end annotation .line 1 iget-object v0, p0, Landroidx/camera/camera2/internal/u0;->a:Ljava/util/Map; .line 2 invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p1 check-cast p1, Landroidx/camera/camera2/internal/d2; if-eqz p1, :cond_0 .line 3 invoke-virtual {p1, p2, p3}, Landroidx/camera/camera2/internal/d2;->O(ILandroid/util/Size;)Landroidx/camera/core/impl/SurfaceConfig; move-result-object p1 goto :goto_0 :cond_0 const/4 p1, 0x0 :goto_0 return-object p1 .end method .method public b(Ljava/lang/String;Ljava/util/List;)Z .locals 1 .param p1 # Ljava/lang/String; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # Ljava/util/List; .annotation build Landroidx/annotation/Nullable; .end annotation .end param .annotation system Ldalvik/annotation/MethodParameters; accessFlags = { 0x0, 0x0 } names = { "cameraId", "surfaceConfigList" } .end annotation .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/String;", "Ljava/util/List<", "Landroidx/camera/core/impl/SurfaceConfig;", ">;)Z" } .end annotation if-eqz p2, :cond_2 .line 1 invoke-interface {p2}, Ljava/util/List;->isEmpty()Z move-result v0 if-eqz v0, :cond_0 goto :goto_0 .line 2 :cond_0 iget-object v0, p0, Landroidx/camera/camera2/internal/u0;->a:Ljava/util/Map; .line 3 invoke-interface {v0, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object p1 check-cast p1, Landroidx/camera/camera2/internal/d2; const/4 v0, 0x0 if-eqz p1, :cond_1 .line 4 invoke-virtual {p1, p2}, Landroidx/camera/camera2/internal/d2;->b(Ljava/util/List;)Z move-result v0 :cond_1 return v0 :cond_2 :goto_0 const/4 p1, 0x1 return p1 .end method .method public c(Ljava/lang/String;Ljava/util/List;Ljava/util/List;)Ljava/util/Map; .locals 6 .param p1 # Ljava/lang/String; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # Ljava/util/List; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p3 # Ljava/util/List; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .annotation build Landroidx/annotation/NonNull; .end annotation .annotation system Ldalvik/annotation/MethodParameters; accessFlags = { 0x0, 0x0, 0x0 } names = { "cameraId", "existingSurfaces", "newUseCaseConfigs" } .end annotation .annotation system Ldalvik/annotation/Signature; value = { "(", "Ljava/lang/String;", "Ljava/util/List<", "Landroidx/camera/core/impl/SurfaceConfig;", ">;", "Ljava/util/List<", "Landroidx/camera/core/impl/s<", "*>;>;)", "Ljava/util/Map<", "Landroidx/camera/core/impl/s<", "*>;", "Landroid/util/Size;", ">;" } .end annotation .line 1 invoke-interface {p3}, Ljava/util/List;->isEmpty()Z move-result v0 xor-int/lit8 v0, v0, 0x1 const-string v1, "No new use cases to be bound." invoke-static {v0, v1}, Lr1/o;->b(ZLjava/lang/Object;)V .line 2 new-instance v0, Ljava/util/ArrayList; invoke-direct {v0, p2}, Ljava/util/ArrayList;->(Ljava/util/Collection;)V .line 3 invoke-interface {p3}, Ljava/util/List;->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, Landroidx/camera/core/impl/s; .line 4 invoke-interface {v2}, Landroidx/camera/core/impl/l;->o()I move-result v2 new-instance v3, Landroid/util/Size; const/16 v4, 0x280 const/16 v5, 0x1e0 invoke-direct {v3, v4, v5}, Landroid/util/Size;->(II)V .line 5 invoke-virtual {p0, p1, v2, v3}, Landroidx/camera/camera2/internal/u0;->a(Ljava/lang/String;ILandroid/util/Size;)Landroidx/camera/core/impl/SurfaceConfig; move-result-object v2 .line 6 invoke-virtual {v0, v2}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z goto :goto_0 .line 7 :cond_0 iget-object v1, p0, Landroidx/camera/camera2/internal/u0;->a:Ljava/util/Map; .line 8 invoke-interface {v1, p1}, Ljava/util/Map;->get(Ljava/lang/Object;)Ljava/lang/Object; move-result-object v1 check-cast v1, Landroidx/camera/camera2/internal/d2; if-eqz v1, :cond_2 .line 9 invoke-virtual {v1, v0}, Landroidx/camera/camera2/internal/d2;->b(Ljava/util/List;)Z move-result v0 if-eqz v0, :cond_1 .line 10 invoke-virtual {v1, p2, p3}, Landroidx/camera/camera2/internal/d2;->z(Ljava/util/List;Ljava/util/List;)Ljava/util/Map; move-result-object p1 return-object p1 .line 11 :cond_1 new-instance v0, Ljava/lang/IllegalArgumentException; new-instance v1, Ljava/lang/StringBuilder; invoke-direct {v1}, Ljava/lang/StringBuilder;->()V const-string v2, "No supported surface combination is found for camera device - Id : " invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; const-string p1, ". May be attempting to bind too many use cases. Existing surfaces: " invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v1, p2}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; const-string p1, " New configs: " invoke-virtual {v1, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; invoke-virtual {v1, p3}, Ljava/lang/StringBuilder;->append(Ljava/lang/Object;)Ljava/lang/StringBuilder; invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String; move-result-object p1 invoke-direct {v0, p1}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw v0 .line 12 :cond_2 new-instance p2, Ljava/lang/IllegalArgumentException; const-string p3, "No such camera id in supported combination list: " invoke-static {p3, p1}, Lc/g;->a(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String; move-result-object p1 invoke-direct {p2, p1}, Ljava/lang/IllegalArgumentException;->(Ljava/lang/String;)V throw p2 .end method .method public final d(Landroid/content/Context;Ls/k;Ljava/util/Set;)V .locals 4 .param p1 # Landroid/content/Context; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # Ls/k; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p3 # Ljava/util/Set; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .annotation system Ldalvik/annotation/MethodParameters; accessFlags = { 0x0, 0x0, 0x0 } names = { "context", "cameraManager", "availableCameraIds" } .end annotation .annotation system Ldalvik/annotation/Signature; value = { "(", "Landroid/content/Context;", "Ls/k;", "Ljava/util/Set<", "Ljava/lang/String;", ">;)V" } .end annotation .annotation system Ldalvik/annotation/Throws; value = { Landroidx/camera/core/CameraUnavailableException; } .end annotation .line 1 invoke-static {p1}, Lr1/o;->k(Ljava/lang/Object;)Ljava/lang/Object; .line 2 invoke-interface {p3}, Ljava/util/Set;->iterator()Ljava/util/Iterator; move-result-object p3 :goto_0 invoke-interface {p3}, Ljava/util/Iterator;->hasNext()Z move-result v0 if-eqz v0, :cond_0 invoke-interface {p3}, Ljava/util/Iterator;->next()Ljava/lang/Object; move-result-object v0 check-cast v0, Ljava/lang/String; .line 3 iget-object v1, p0, Landroidx/camera/camera2/internal/u0;->a:Ljava/util/Map; new-instance v2, Landroidx/camera/camera2/internal/d2; iget-object v3, p0, Landroidx/camera/camera2/internal/u0;->b:Landroidx/camera/camera2/internal/d; invoke-direct {v2, p1, v0, p2, v3}, Landroidx/camera/camera2/internal/d2;->(Landroid/content/Context;Ljava/lang/String;Ls/k;Landroidx/camera/camera2/internal/d;)V invoke-interface {v1, v0, v2}, Ljava/util/Map;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object; goto :goto_0 :cond_0 return-void .end method