discord-jadx/app/src/main/java/com/discord/utilities/auth/GoogleSmartLockManagerKt.java

38 lines
1.6 KiB
Java

package com.discord.utilities.auth;
import android.content.Context;
import android.content.Intent;
import com.discord.utilities.auth.GoogleSmartLockManager;
import d0.z.d.m;
/* compiled from: GoogleSmartLockManager.kt */
public final class GoogleSmartLockManagerKt {
public static final void clearSmartLockCredentials(Intent intent) {
m.checkNotNullParameter(intent, "$this$clearSmartLockCredentials");
intent.removeExtra("smartlock_extra_id");
intent.removeExtra("smartlock_extra_password");
}
public static final GoogleSmartLockManager googleSmartLockManager(Context context) {
m.checkNotNullParameter(context, "$this$googleSmartLockManager");
return new GoogleSmartLockManager(context, null, 2, null);
}
public static final boolean hasSmartLockCredentials(Intent intent) {
m.checkNotNullParameter(intent, "$this$hasSmartLockCredentials");
return intent.hasExtra("smartlock_extra_id");
}
public static final GoogleSmartLockManager.SmartLockCredentials toSmartLockCredentials(Intent intent) {
m.checkNotNullParameter(intent, "$this$toSmartLockCredentials");
if (!intent.hasExtra("smartlock_extra_id")) {
return null;
}
String stringExtra = intent.getStringExtra("smartlock_extra_id");
String stringExtra2 = intent.getStringExtra("smartlock_extra_password");
if (stringExtra == null || stringExtra2 == null) {
return null;
}
return new GoogleSmartLockManager.SmartLockCredentials(stringExtra, stringExtra2);
}
}