.class public final Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder; .super Ljava/lang/Object; .source "SourceFile" # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Landroidx/core/app/NotificationCompat$BubbleMetadata; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x19 name = "Builder" .end annotation # instance fields .field private mDeleteIntent:Landroid/app/PendingIntent; .field private mDesiredHeight:I .field private mDesiredHeightResId:I .annotation build Landroidx/annotation/DimenRes; .end annotation .end field .field private mFlags:I .field private mIcon:Landroidx/core/graphics/drawable/IconCompat; .field private mPendingIntent:Landroid/app/PendingIntent; .field private mShortcutId:Ljava/lang/String; # direct methods .method public constructor ()V .locals 0 .annotation runtime Ljava/lang/Deprecated; .end annotation .line 8558 invoke-direct {p0}, Ljava/lang/Object;->()V return-void .end method .method public constructor (Landroid/app/PendingIntent;Landroidx/core/graphics/drawable/IconCompat;)V .locals 0 .param p1 # Landroid/app/PendingIntent; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .param p2 # Landroidx/core/graphics/drawable/IconCompat; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .line 8604 invoke-direct {p0}, Ljava/lang/Object;->()V if-eqz p1, :cond_1 if-eqz p2, :cond_0 iput-object p1, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mPendingIntent:Landroid/app/PendingIntent; iput-object p2, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mIcon:Landroidx/core/graphics/drawable/IconCompat; return-void .line 8609 :cond_0 new-instance p1, Ljava/lang/NullPointerException; const-string p2, "Bubbles require non-null icon" invoke-direct {p1, p2}, Ljava/lang/NullPointerException;->(Ljava/lang/String;)V throw p1 .line 8606 :cond_1 new-instance p1, Ljava/lang/NullPointerException; const-string p2, "Bubble requires non-null pending intent" invoke-direct {p1, p2}, Ljava/lang/NullPointerException;->(Ljava/lang/String;)V throw p1 .end method .method public constructor (Ljava/lang/String;)V .locals 1 .param p1 # Ljava/lang/String; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .annotation build Landroidx/annotation/RequiresApi; value = 0x1e .end annotation .line 8583 invoke-direct {p0}, Ljava/lang/Object;->()V .line 8584 invoke-static {p1}, Landroid/text/TextUtils;->isEmpty(Ljava/lang/CharSequence;)Z move-result v0 if-nez v0, :cond_0 iput-object p1, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mShortcutId:Ljava/lang/String; return-void .line 8585 :cond_0 new-instance p1, Ljava/lang/NullPointerException; const-string v0, "Bubble requires a non-null shortcut id" invoke-direct {p1, v0}, Ljava/lang/NullPointerException;->(Ljava/lang/String;)V throw p1 .end method .method private setFlag(IZ)Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder; .locals 0 .annotation build Landroidx/annotation/NonNull; .end annotation if-eqz p2, :cond_0 iget p2, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mFlags:I or-int/2addr p1, p2 iput p1, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mFlags:I goto :goto_0 :cond_0 iget p2, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mFlags:I not-int p1, p1 and-int/2addr p1, p2 iput p1, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mFlags:I :goto_0 return-object p0 .end method # virtual methods .method public build()Landroidx/core/app/NotificationCompat$BubbleMetadata; .locals 10 .annotation build Landroidx/annotation/NonNull; .end annotation iget-object v7, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mShortcutId:Ljava/lang/String; if-nez v7, :cond_1 iget-object v0, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mPendingIntent:Landroid/app/PendingIntent; if-eqz v0, :cond_0 goto :goto_0 .line 8749 :cond_0 new-instance v0, Ljava/lang/NullPointerException; const-string v1, "Must supply pending intent or shortcut to bubble" invoke-direct {v0, v1}, Ljava/lang/NullPointerException;->(Ljava/lang/String;)V throw v0 :cond_1 :goto_0 if-nez v7, :cond_3 iget-object v0, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mIcon:Landroidx/core/graphics/drawable/IconCompat; if-eqz v0, :cond_2 goto :goto_1 .line 8753 :cond_2 new-instance v0, Ljava/lang/NullPointerException; const-string v1, "Must supply an icon or shortcut for the bubble" invoke-direct {v0, v1}, Ljava/lang/NullPointerException;->(Ljava/lang/String;)V throw v0 .line 8756 :cond_3 :goto_1 new-instance v9, Landroidx/core/app/NotificationCompat$BubbleMetadata; iget-object v1, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mPendingIntent:Landroid/app/PendingIntent; iget-object v2, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mDeleteIntent:Landroid/app/PendingIntent; iget-object v3, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mIcon:Landroidx/core/graphics/drawable/IconCompat; iget v4, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mDesiredHeight:I iget v5, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mDesiredHeightResId:I iget v6, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mFlags:I const/4 v8, 0x0 move-object v0, v9 invoke-direct/range {v0 .. v8}, Landroidx/core/app/NotificationCompat$BubbleMetadata;->(Landroid/app/PendingIntent;Landroid/app/PendingIntent;Landroidx/core/graphics/drawable/IconCompat;IIILjava/lang/String;Landroidx/core/app/NotificationCompat$1;)V iget v0, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mFlags:I .line 8758 invoke-virtual {v9, v0}, Landroidx/core/app/NotificationCompat$BubbleMetadata;->setFlags(I)V return-object v9 .end method .method public setAutoExpandBubble(Z)Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder; .locals 1 .annotation build Landroidx/annotation/NonNull; .end annotation const/4 v0, 0x1 .line 8710 invoke-direct {p0, v0, p1}, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->setFlag(IZ)Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder; return-object p0 .end method .method public setDeleteIntent(Landroid/app/PendingIntent;)Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder; .locals 0 .param p1 # Landroid/app/PendingIntent; .annotation build Landroidx/annotation/Nullable; .end annotation .end param .annotation build Landroidx/annotation/NonNull; .end annotation iput-object p1, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mDeleteIntent:Landroid/app/PendingIntent; return-object p0 .end method .method public setDesiredHeight(I)Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder; .locals 1 .param p1 # I .annotation build Landroidx/annotation/Dimension; unit = 0x0 .end annotation .end param .annotation build Landroidx/annotation/NonNull; .end annotation const/4 v0, 0x0 .line 8676 invoke-static {p1, v0}, Ljava/lang/Math;->max(II)I move-result p1 iput p1, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mDesiredHeight:I iput v0, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mDesiredHeightResId:I return-object p0 .end method .method public setDesiredHeightResId(I)Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder; .locals 0 .param p1 # I .annotation build Landroidx/annotation/DimenRes; .end annotation .end param .annotation build Landroidx/annotation/NonNull; .end annotation iput p1, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mDesiredHeightResId:I const/4 p1, 0x0 iput p1, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mDesiredHeight:I return-object p0 .end method .method public setIcon(Landroidx/core/graphics/drawable/IconCompat;)Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder; .locals 1 .param p1 # Landroidx/core/graphics/drawable/IconCompat; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .annotation build Landroidx/annotation/NonNull; .end annotation iget-object v0, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mShortcutId:Ljava/lang/String; if-nez v0, :cond_1 if-eqz p1, :cond_0 iput-object p1, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mIcon:Landroidx/core/graphics/drawable/IconCompat; return-object p0 .line 8659 :cond_0 new-instance p1, Ljava/lang/NullPointerException; const-string v0, "Bubbles require non-null icon" invoke-direct {p1, v0}, Ljava/lang/NullPointerException;->(Ljava/lang/String;)V throw p1 .line 8654 :cond_1 new-instance p1, Ljava/lang/IllegalStateException; const-string v0, "Created as a shortcut bubble, cannot set an Icon. Consider using BubbleMetadata.Builder(PendingIntent,Icon) instead." invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw p1 .end method .method public setIntent(Landroid/app/PendingIntent;)Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder; .locals 1 .param p1 # Landroid/app/PendingIntent; .annotation build Landroidx/annotation/NonNull; .end annotation .end param .annotation build Landroidx/annotation/NonNull; .end annotation iget-object v0, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mShortcutId:Ljava/lang/String; if-nez v0, :cond_1 if-eqz p1, :cond_0 iput-object p1, p0, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->mPendingIntent:Landroid/app/PendingIntent; return-object p0 .line 8631 :cond_0 new-instance p1, Ljava/lang/NullPointerException; const-string v0, "Bubble requires non-null pending intent" invoke-direct {p1, v0}, Ljava/lang/NullPointerException;->(Ljava/lang/String;)V throw p1 .line 8626 :cond_1 new-instance p1, Ljava/lang/IllegalStateException; const-string v0, "Created as a shortcut bubble, cannot set a PendingIntent. Consider using BubbleMetadata.Builder(PendingIntent,Icon) instead." invoke-direct {p1, v0}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw p1 .end method .method public setSuppressNotification(Z)Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder; .locals 1 .annotation build Landroidx/annotation/NonNull; .end annotation const/4 v0, 0x2 .line 8728 invoke-direct {p0, v0, p1}, Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder;->setFlag(IZ)Landroidx/core/app/NotificationCompat$BubbleMetadata$Builder; return-object p0 .end method