.class public final Landroidx/browser/customtabs/CustomTabsIntent$Builder; .super Ljava/lang/Object; .source "CustomTabsIntent.java" # annotations .annotation system Ldalvik/annotation/EnclosingClass; value = Landroidx/browser/customtabs/CustomTabsIntent; .end annotation .annotation system Ldalvik/annotation/InnerClass; accessFlags = 0x19 name = "Builder" .end annotation # instance fields .field private mActionButtons:Ljava/util/ArrayList; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/ArrayList<", "Landroid/os/Bundle;", ">;" } .end annotation .end field .field private mInstantAppsEnabled:Z .field private final mIntent:Landroid/content/Intent; .field private mMenuItems:Ljava/util/ArrayList; .annotation system Ldalvik/annotation/Signature; value = { "Ljava/util/ArrayList<", "Landroid/os/Bundle;", ">;" } .end annotation .end field .field private mStartAnimationBundle:Landroid/os/Bundle; # direct methods .method public constructor ()V .locals 1 const/4 v0, 0x0 invoke-direct {p0, v0}, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->(Landroidx/browser/customtabs/CustomTabsSession;)V return-void .end method .method public constructor (Landroidx/browser/customtabs/CustomTabsSession;)V .locals 3 invoke-direct {p0}, Ljava/lang/Object;->()V new-instance v0, Landroid/content/Intent; const-string v1, "android.intent.action.VIEW" invoke-direct {v0, v1}, Landroid/content/Intent;->(Ljava/lang/String;)V iput-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; const/4 v0, 0x0 iput-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mMenuItems:Ljava/util/ArrayList; iput-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mStartAnimationBundle:Landroid/os/Bundle; iput-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mActionButtons:Ljava/util/ArrayList; const/4 v1, 0x1 iput-boolean v1, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mInstantAppsEnabled:Z if-eqz p1, :cond_0 iget-object v1, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; invoke-virtual {p1}, Landroidx/browser/customtabs/CustomTabsSession;->getComponentName()Landroid/content/ComponentName; move-result-object v2 invoke-virtual {v2}, Landroid/content/ComponentName;->getPackageName()Ljava/lang/String; move-result-object v2 invoke-virtual {v1, v2}, Landroid/content/Intent;->setPackage(Ljava/lang/String;)Landroid/content/Intent; :cond_0 new-instance v1, Landroid/os/Bundle; invoke-direct {v1}, Landroid/os/Bundle;->()V if-nez p1, :cond_1 goto :goto_0 :cond_1 invoke-virtual {p1}, Landroidx/browser/customtabs/CustomTabsSession;->getBinder()Landroid/os/IBinder; move-result-object v0 :goto_0 const-string p1, "android.support.customtabs.extra.SESSION" invoke-static {v1, p1, v0}, Landroidx/core/app/BundleCompat;->putBinder(Landroid/os/Bundle;Ljava/lang/String;Landroid/os/IBinder;)V iget-object p1, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; invoke-virtual {p1, v1}, Landroid/content/Intent;->putExtras(Landroid/os/Bundle;)Landroid/content/Intent; return-void .end method # virtual methods .method public final addDefaultShareMenuItem()Landroidx/browser/customtabs/CustomTabsIntent$Builder; .locals 3 iget-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; const-string v1, "android.support.customtabs.extra.SHARE_MENU_ITEM" const/4 v2, 0x1 invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent; return-object p0 .end method .method public final addMenuItem(Ljava/lang/String;Landroid/app/PendingIntent;)Landroidx/browser/customtabs/CustomTabsIntent$Builder; .locals 2 iget-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mMenuItems:Ljava/util/ArrayList; if-nez v0, :cond_0 new-instance v0, Ljava/util/ArrayList; invoke-direct {v0}, Ljava/util/ArrayList;->()V iput-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mMenuItems:Ljava/util/ArrayList; :cond_0 new-instance v0, Landroid/os/Bundle; invoke-direct {v0}, Landroid/os/Bundle;->()V const-string v1, "android.support.customtabs.customaction.MENU_ITEM_TITLE" invoke-virtual {v0, v1, p1}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V const-string p1, "android.support.customtabs.customaction.PENDING_INTENT" invoke-virtual {v0, p1, p2}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V iget-object p1, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mMenuItems:Ljava/util/ArrayList; invoke-virtual {p1, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z return-object p0 .end method .method public final addToolbarItem(ILandroid/graphics/Bitmap;Ljava/lang/String;Landroid/app/PendingIntent;)Landroidx/browser/customtabs/CustomTabsIntent$Builder; .locals 2 .annotation system Ldalvik/annotation/Throws; value = { Ljava/lang/IllegalStateException; } .end annotation .annotation runtime Ljava/lang/Deprecated; .end annotation iget-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mActionButtons:Ljava/util/ArrayList; if-nez v0, :cond_0 new-instance v0, Ljava/util/ArrayList; invoke-direct {v0}, Ljava/util/ArrayList;->()V iput-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mActionButtons:Ljava/util/ArrayList; :cond_0 iget-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mActionButtons:Ljava/util/ArrayList; invoke-virtual {v0}, Ljava/util/ArrayList;->size()I move-result v0 const/4 v1, 0x5 if-ge v0, v1, :cond_1 new-instance v0, Landroid/os/Bundle; invoke-direct {v0}, Landroid/os/Bundle;->()V const-string v1, "android.support.customtabs.customaction.ID" invoke-virtual {v0, v1, p1}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V const-string p1, "android.support.customtabs.customaction.ICON" invoke-virtual {v0, p1, p2}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V const-string p1, "android.support.customtabs.customaction.DESCRIPTION" invoke-virtual {v0, p1, p3}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V const-string p1, "android.support.customtabs.customaction.PENDING_INTENT" invoke-virtual {v0, p1, p4}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V iget-object p1, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mActionButtons:Ljava/util/ArrayList; invoke-virtual {p1, v0}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z return-object p0 :cond_1 new-instance p1, Ljava/lang/IllegalStateException; const-string p2, "Exceeded maximum toolbar item count of 5" invoke-direct {p1, p2}, Ljava/lang/IllegalStateException;->(Ljava/lang/String;)V throw p1 .end method .method public final build()Landroidx/browser/customtabs/CustomTabsIntent; .locals 3 iget-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mMenuItems:Ljava/util/ArrayList; if-eqz v0, :cond_0 iget-object v1, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; const-string v2, "android.support.customtabs.extra.MENU_ITEMS" invoke-virtual {v1, v2, v0}, Landroid/content/Intent;->putParcelableArrayListExtra(Ljava/lang/String;Ljava/util/ArrayList;)Landroid/content/Intent; :cond_0 iget-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mActionButtons:Ljava/util/ArrayList; if-eqz v0, :cond_1 iget-object v1, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; const-string v2, "android.support.customtabs.extra.TOOLBAR_ITEMS" invoke-virtual {v1, v2, v0}, Landroid/content/Intent;->putParcelableArrayListExtra(Ljava/lang/String;Ljava/util/ArrayList;)Landroid/content/Intent; :cond_1 iget-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; iget-boolean v1, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mInstantAppsEnabled:Z const-string v2, "android.support.customtabs.extra.EXTRA_ENABLE_INSTANT_APPS" invoke-virtual {v0, v2, v1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent; new-instance v0, Landroidx/browser/customtabs/CustomTabsIntent; iget-object v1, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; iget-object v2, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mStartAnimationBundle:Landroid/os/Bundle; invoke-direct {v0, v1, v2}, Landroidx/browser/customtabs/CustomTabsIntent;->(Landroid/content/Intent;Landroid/os/Bundle;)V return-object v0 .end method .method public final enableUrlBarHiding()Landroidx/browser/customtabs/CustomTabsIntent$Builder; .locals 3 iget-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; const-string v1, "android.support.customtabs.extra.ENABLE_URLBAR_HIDING" const/4 v2, 0x1 invoke-virtual {v0, v1, v2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent; return-object p0 .end method .method public final setActionButton(Landroid/graphics/Bitmap;Ljava/lang/String;Landroid/app/PendingIntent;)Landroidx/browser/customtabs/CustomTabsIntent$Builder; .locals 1 const/4 v0, 0x0 invoke-virtual {p0, p1, p2, p3, v0}, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->setActionButton(Landroid/graphics/Bitmap;Ljava/lang/String;Landroid/app/PendingIntent;Z)Landroidx/browser/customtabs/CustomTabsIntent$Builder; move-result-object p1 return-object p1 .end method .method public final setActionButton(Landroid/graphics/Bitmap;Ljava/lang/String;Landroid/app/PendingIntent;Z)Landroidx/browser/customtabs/CustomTabsIntent$Builder; .locals 3 new-instance v0, Landroid/os/Bundle; invoke-direct {v0}, Landroid/os/Bundle;->()V const-string v1, "android.support.customtabs.customaction.ID" const/4 v2, 0x0 invoke-virtual {v0, v1, v2}, Landroid/os/Bundle;->putInt(Ljava/lang/String;I)V const-string v1, "android.support.customtabs.customaction.ICON" invoke-virtual {v0, v1, p1}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V const-string p1, "android.support.customtabs.customaction.DESCRIPTION" invoke-virtual {v0, p1, p2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V const-string p1, "android.support.customtabs.customaction.PENDING_INTENT" invoke-virtual {v0, p1, p3}, Landroid/os/Bundle;->putParcelable(Ljava/lang/String;Landroid/os/Parcelable;)V iget-object p1, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; const-string p2, "android.support.customtabs.extra.ACTION_BUTTON_BUNDLE" invoke-virtual {p1, p2, v0}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; iget-object p1, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; const-string p2, "android.support.customtabs.extra.TINT_ACTION_BUTTON" invoke-virtual {p1, p2, p4}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Z)Landroid/content/Intent; return-object p0 .end method .method public final setCloseButtonIcon(Landroid/graphics/Bitmap;)Landroidx/browser/customtabs/CustomTabsIntent$Builder; .locals 2 iget-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; const-string v1, "android.support.customtabs.extra.CLOSE_BUTTON_ICON" invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent; return-object p0 .end method .method public final setExitAnimations(Landroid/content/Context;II)Landroidx/browser/customtabs/CustomTabsIntent$Builder; .locals 0 invoke-static {p1, p2, p3}, Landroidx/core/app/ActivityOptionsCompat;->makeCustomAnimation(Landroid/content/Context;II)Landroidx/core/app/ActivityOptionsCompat; move-result-object p1 invoke-virtual {p1}, Landroidx/core/app/ActivityOptionsCompat;->toBundle()Landroid/os/Bundle; move-result-object p1 iget-object p2, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; const-string p3, "android.support.customtabs.extra.EXIT_ANIMATION_BUNDLE" invoke-virtual {p2, p3, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Bundle;)Landroid/content/Intent; return-object p0 .end method .method public final setInstantAppsEnabled(Z)Landroidx/browser/customtabs/CustomTabsIntent$Builder; .locals 0 iput-boolean p1, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mInstantAppsEnabled:Z return-object p0 .end method .method public final setSecondaryToolbarColor(I)Landroidx/browser/customtabs/CustomTabsIntent$Builder; .locals 2 iget-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; const-string v1, "android.support.customtabs.extra.SECONDARY_TOOLBAR_COLOR" invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent; return-object p0 .end method .method public final setSecondaryToolbarViews(Landroid/widget/RemoteViews;[ILandroid/app/PendingIntent;)Landroidx/browser/customtabs/CustomTabsIntent$Builder; .locals 2 iget-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; const-string v1, "android.support.customtabs.extra.EXTRA_REMOTEVIEWS" invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent; iget-object p1, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; const-string v0, "android.support.customtabs.extra.EXTRA_REMOTEVIEWS_VIEW_IDS" invoke-virtual {p1, v0, p2}, Landroid/content/Intent;->putExtra(Ljava/lang/String;[I)Landroid/content/Intent; iget-object p1, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; const-string p2, "android.support.customtabs.extra.EXTRA_REMOTEVIEWS_PENDINGINTENT" invoke-virtual {p1, p2, p3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Landroid/os/Parcelable;)Landroid/content/Intent; return-object p0 .end method .method public final setShowTitle(Z)Landroidx/browser/customtabs/CustomTabsIntent$Builder; .locals 2 iget-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; const-string v1, "android.support.customtabs.extra.TITLE_VISIBILITY" invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent; return-object p0 .end method .method public final setStartAnimations(Landroid/content/Context;II)Landroidx/browser/customtabs/CustomTabsIntent$Builder; .locals 0 invoke-static {p1, p2, p3}, Landroidx/core/app/ActivityOptionsCompat;->makeCustomAnimation(Landroid/content/Context;II)Landroidx/core/app/ActivityOptionsCompat; move-result-object p1 invoke-virtual {p1}, Landroidx/core/app/ActivityOptionsCompat;->toBundle()Landroid/os/Bundle; move-result-object p1 iput-object p1, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mStartAnimationBundle:Landroid/os/Bundle; return-object p0 .end method .method public final setToolbarColor(I)Landroidx/browser/customtabs/CustomTabsIntent$Builder; .locals 2 iget-object v0, p0, Landroidx/browser/customtabs/CustomTabsIntent$Builder;->mIntent:Landroid/content/Intent; const-string v1, "android.support.customtabs.extra.TOOLBAR_COLOR" invoke-virtual {v0, v1, p1}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent; return-object p0 .end method