正在查看: Moneyman v2.316.0.0 应用的 NotificationsPermissionActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Moneyman v2.316.0.0 应用的 NotificationsPermissionActivity.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.exponea.sdk.view;
import S1.AbstractC0309c;
import android.app.Activity;
import android.content.Intent;
import android.os.Build;
import android.os.Bundle;
import com.exponea.sdk.receiver.NotificationsPermissionReceiver;
import com.exponea.sdk.services.inappcontentblock.ContentBlockCarouselViewController;
import com.exponea.sdk.util.Logger;
import kotlin.Metadata;
import kotlin.jvm.internal.i;
@Metadata(d1 = {"\u0000:\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u0011\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0015\n\u0002\b\u0006\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003J\u0017\u0010\u0007\u001a\u00020\u00062\u0006\u0010\u0005\u001a\u00020\u0004H\u0002¢\u0006\u0004\b\u0007\u0010\bJ\u0019\u0010\u000b\u001a\u00020\u00062\b\u0010\n\u001a\u0004\u0018\u00010\tH\u0014¢\u0006\u0004\b\u000b\u0010\fJ/\u0010\u0014\u001a\u00020\u00062\u0006\u0010\u000e\u001a\u00020\r2\u000e\u0010\u0011\u001a\n\u0012\u0006\b\u0001\u0012\u00020\u00100\u000f2\u0006\u0010\u0013\u001a\u00020\u0012H\u0016¢\u0006\u0004\b\u0014\u0010\u0015R\u0014\u0010\u0016\u001a\u00020\r8\u0002X\u0082D¢\u0006\u0006\n\u0004\b\u0016\u0010\u0017¨\u0006\u0018"}, d2 = {"Lcom/exponea/sdk/view/NotificationsPermissionActivity;", "Landroid/app/Activity;", "<init>", "()V", ContentBlockCarouselViewController.EMPTY_PLACEHOLDER_ID, "result", "LVf/A;", "sendBroadcastResult", "(Z)V", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "(Landroid/os/Bundle;)V", ContentBlockCarouselViewController.EMPTY_PLACEHOLDER_ID, "requestCode", ContentBlockCarouselViewController.EMPTY_PLACEHOLDER_ID, ContentBlockCarouselViewController.EMPTY_PLACEHOLDER_ID, "permissions", ContentBlockCarouselViewController.EMPTY_PLACEHOLDER_ID, "grantResults", "onRequestPermissionsResult", "(I[Ljava/lang/String;[I)V", "permissionRequestCode", "I", "sdk_release"}, k = 1, mv = {1, 9, 0}, xi = 48)
public final class NotificationsPermissionActivity extends Activity {
private final int permissionRequestCode;
private final void sendBroadcastResult(boolean result) {
Intent intent = new Intent();
intent.setPackage(getPackageName());
intent.setAction(NotificationsPermissionReceiver.INSTANCE.getBroadcastAction(this));
intent.putExtra(NotificationsPermissionReceiver.ACTION_PERMISSIONS_RESULT_BOOL, result);
sendBroadcast(intent);
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (Build.VERSION.SDK_INT < 33) {
Logger.INSTANCE.w(this, "Push notifications permission is not needed");
sendBroadcastResult(true);
finish();
} else {
if (T1.a.a(this, "android.permission.POST_NOTIFICATIONS") != 0) {
AbstractC0309c.e(this, new String[]{"android.permission.POST_NOTIFICATIONS"}, this.permissionRequestCode);
return;
}
Logger.INSTANCE.w(this, "Push notifications permission already granted");
sendBroadcastResult(true);
finish();
}
}
@Override
public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {
i.g(permissions, "permissions");
i.g(grantResults, "grantResults");
Logger logger = Logger.INSTANCE;
logger.i(this, "Permission got code " + requestCode);
if (requestCode != this.permissionRequestCode) {
super.onRequestPermissionsResult(requestCode, permissions, grantResults);
return;
}
if ((grantResults.length == 0) || grantResults[0] != 0) {
logger.w(this, "Push notifications permission has been denied");
sendBroadcastResult(false);
} else {
logger.i(this, "Push notifications permission has been granted");
sendBroadcastResult(true);
}
finish();
}
}