alexandroid/decompiled/jadx/sources/androidx/browser/trusted/NotificationApiHelperForO.java
KaKi87 a47fad5135 📦 Add decompiled Alexa 2.2.730155.0 (jadx, apktool, Hermes strings)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 00:04:16 +01:00

34 lines
1.4 KiB
Java

package androidx.browser.trusted;
import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
import android.content.Context;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.annotation.RestrictTo;
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
@RequiresApi(26)
@RestrictTo({RestrictTo.Scope.LIBRARY})
/* loaded from: classes.dex */
class NotificationApiHelperForO {
private NotificationApiHelperForO() {
}
@Nullable
public static Notification copyNotificationOntoChannel(Context context, NotificationManager notificationManager, Notification notification, String str, String str2) {
notificationManager.createNotificationChannel(new NotificationChannel(str, str2, 3));
if (notificationManager.getNotificationChannel(str).getImportance() == 0) {
return null;
}
Notification.Builder recoverBuilder = Notification.Builder.recoverBuilder(context, notification);
recoverBuilder.setChannelId(str);
return recoverBuilder.build();
}
public static boolean isChannelEnabled(NotificationManager notificationManager, String str) {
NotificationChannel notificationChannel = notificationManager.getNotificationChannel(str);
return notificationChannel == null || notificationChannel.getImportance() != 0;
}
}