granularity level: instruction

		.class  Landroidx/core/view/ViewCompat$AccessibilityPaneVisibilityManager;
.super Ljava/lang/Object;
.source "ViewCompat.java"
.implements Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;
.implements Landroid/view/View$OnAttachStateChangeListener;

.annotation system Ldalvik/annotation/EnclosingClass;
value = Landroidx/core/view/ViewCompat;
.end annotation
.annotation system Ldalvik/annotation/InnerClass;
accessFlags = 0x8
name = "AccessibilityPaneVisibilityManager"
.end annotation

.field private mPanesToVisible:Ljava/util/WeakHashMap;
.annotation system Ldalvik/annotation/Signature;
value = {
"Ljava/util/WeakHashMap<",
"Landroid/view/View;",
"Ljava/lang/Boolean;",
">;"
}
.end annotation
.end field


.method constructor <init>()V
	.locals 1

	invoke-direct {p0}, Ljava/lang/Object;-><init>()V
	new-instance v0, Ljava/util/WeakHashMap;
	invoke-direct {v0}, Ljava/util/WeakHashMap;-><init>()V
	iput-object v0, p0, Landroidx/core/view/ViewCompat$AccessibilityPaneVisibilityManager;->mPanesToVisible:Ljava/util/WeakHashMap;
	return-void
.end method

.method private checkPaneVisibility(Landroid/view/View;Z)V
	.locals 1

	invoke-virtual {p1}, Landroid/view/View;->getVisibility()I
	move-result v0
	if-nez v0, :cond_0
	const/4 v0, 0x1
	goto :goto_0
	:cond_0
	const/4 v0, 0x0
	:goto_0
	if-eq p2, v0, :cond_2
	if-eqz v0, :cond_1
	const/16 p2, 0x10
	invoke-static {p1, p2}, Landroidx/core/view/ViewCompat;->notifyViewAccessibilityStateChangedIfNeeded(Landroid/view/View;I)V
	:cond_1
	iget-object p2, p0, Landroidx/core/view/ViewCompat$AccessibilityPaneVisibilityManager;->mPanesToVisible:Ljava/util/WeakHashMap;
	invoke-static {v0}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
	move-result-object v0
	invoke-virtual {p2, p1, v0}, Ljava/util/WeakHashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
	:cond_2
	return-void
.end method

.method private registerForLayoutCallback(Landroid/view/View;)V
	.locals 0

	invoke-virtual {p1}, Landroid/view/View;->getViewTreeObserver()Landroid/view/ViewTreeObserver;
	move-result-object p1
	invoke-virtual {p1, p0}, Landroid/view/ViewTreeObserver;->addOnGlobalLayoutListener(Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V
	return-void
.end method

.method private unregisterForLayoutCallback(Landroid/view/View;)V
	.locals 0

	invoke-virtual {p1}, Landroid/view/View;->getViewTreeObserver()Landroid/view/ViewTreeObserver;
	move-result-object p1
	invoke-virtual {p1, p0}, Landroid/view/ViewTreeObserver;->removeOnGlobalLayoutListener(Landroid/view/ViewTreeObserver$OnGlobalLayoutListener;)V
	return-void
.end method

.method  addAccessibilityPane(Landroid/view/View;)V
	.locals 2

	iget-object v0, p0, Landroidx/core/view/ViewCompat$AccessibilityPaneVisibilityManager;->mPanesToVisible:Ljava/util/WeakHashMap;
	invoke-virtual {p1}, Landroid/view/View;->getVisibility()I
	move-result v1
	if-nez v1, :cond_0
	const/4 v1, 0x1
	goto :goto_0
	:cond_0
	const/4 v1, 0x0
	:goto_0
	invoke-static {v1}, Ljava/lang/Boolean;->valueOf(Z)Ljava/lang/Boolean;
	move-result-object v1
	invoke-virtual {v0, p1, v1}, Ljava/util/WeakHashMap;->put(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
	invoke-virtual {p1, p0}, Landroid/view/View;->addOnAttachStateChangeListener(Landroid/view/View$OnAttachStateChangeListener;)V
	invoke-virtual {p1}, Landroid/view/View;->isAttachedToWindow()Z
	move-result v0
	if-eqz v0, :cond_1
	invoke-direct {p0, p1}, Landroidx/core/view/ViewCompat$AccessibilityPaneVisibilityManager;->registerForLayoutCallback(Landroid/view/View;)V
	:cond_1
	return-void
.end method

.method public onGlobalLayout()V
	.locals 3

	iget-object v0, p0, Landroidx/core/view/ViewCompat$AccessibilityPaneVisibilityManager;->mPanesToVisible:Ljava/util/WeakHashMap;
	invoke-virtual {v0}, Ljava/util/WeakHashMap;->entrySet()Ljava/util/Set;
	move-result-object v0
	invoke-interface {v0}, Ljava/util/Set;->iterator()Ljava/util/Iterator;
	move-result-object v0
	:goto_0
	invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
	move-result v1
	if-eqz v1, :cond_0
	invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;
	move-result-object v1
	check-cast v1, Ljava/util/Map$Entry;
	invoke-interface {v1}, Ljava/util/Map$Entry;->getKey()Ljava/lang/Object;
	move-result-object v2
	check-cast v2, Landroid/view/View;
	invoke-interface {v1}, Ljava/util/Map$Entry;->getValue()Ljava/lang/Object;
	move-result-object v1
	check-cast v1, Ljava/lang/Boolean;
	invoke-virtual {v1}, Ljava/lang/Boolean;->booleanValue()Z
	move-result v1
	invoke-direct {p0, v2, v1}, Landroidx/core/view/ViewCompat$AccessibilityPaneVisibilityManager;->checkPaneVisibility(Landroid/view/View;Z)V
	goto :goto_0
	:cond_0
	return-void
.end method

.method public onViewAttachedToWindow(Landroid/view/View;)V
	.locals 0

	invoke-direct {p0, p1}, Landroidx/core/view/ViewCompat$AccessibilityPaneVisibilityManager;->registerForLayoutCallback(Landroid/view/View;)V
	return-void
.end method

.method public onViewDetachedFromWindow(Landroid/view/View;)V
	.locals 0

	return-void
.end method

.method  removeAccessibilityPane(Landroid/view/View;)V
	.locals 1

	iget-object v0, p0, Landroidx/core/view/ViewCompat$AccessibilityPaneVisibilityManager;->mPanesToVisible:Ljava/util/WeakHashMap;
	invoke-virtual {v0, p1}, Ljava/util/WeakHashMap;->remove(Ljava/lang/Object;)Ljava/lang/Object;
	invoke-virtual {p1, p0}, Landroid/view/View;->removeOnAttachStateChangeListener(Landroid/view/View$OnAttachStateChangeListener;)V
	invoke-direct {p0, p1}, Landroidx/core/view/ViewCompat$AccessibilityPaneVisibilityManager;->unregisterForLayoutCallback(Landroid/view/View;)V
	return-void
.end method