package com.discord.widgets.settings.account; import android.content.Context; import androidx.fragment.app.FragmentActivity; import b.a.d.m; import com.discord.R; import com.discord.api.user.User; import com.discord.stores.StoreStream; import com.discord.utilities.auth.GoogleSmartLockManager; import com.discord.utilities.auth.GoogleSmartLockManagerKt; import rx.functions.Action1; /* compiled from: WidgetSettingsAccountChangePassword.kt */ /* loaded from: classes2.dex */ public final class WidgetSettingsAccountChangePassword$saveNewPassword$1 implements Action1 { public final /* synthetic */ String $newPasswordText; public final /* synthetic */ WidgetSettingsAccountChangePassword this$0; public WidgetSettingsAccountChangePassword$saveNewPassword$1(WidgetSettingsAccountChangePassword widgetSettingsAccountChangePassword, String str) { this.this$0 = widgetSettingsAccountChangePassword; this.$newPasswordText = str; } public final void call(User user) { GoogleSmartLockManager googleSmartLockManager; m.i(this.this$0, R.string.saved_settings, 0, 4); StoreStream.Companion.getAuthentication().setAuthed(user.p()); Context context = this.this$0.getContext(); if (!(context == null || (googleSmartLockManager = GoogleSmartLockManagerKt.googleSmartLockManager(context)) == null)) { googleSmartLockManager.updateAccountInfo(null, this.$newPasswordText); } FragmentActivity activity = this.this$0.e(); if (activity != null) { activity.finish(); } } }