@Override public void requestWritePermissionNotification() { if (hasStoragePermission()) { return; } PendingIntent pendingIntent = RequestStoragePermissionActivity.createPendingIntent(context); String contentTitle = context.getString(R.string.leak_canary_permission_notification_title); CharSequence packageName = context.getPackageName(); String contentText = context.getString(R.string.leak_canary_permission_notification_text, packageName); showNotification(context, contentTitle, contentText, pendingIntent); }
private void requestWritePermissionNotification() { if (permissionNotificationDisplayed) { return; } permissionNotificationDisplayed = true; PendingIntent pendingIntent = RequestStoragePermissionActivity.createPendingIntent(context); String contentTitle = context.getString(R.string.leak_canary_permission_notification_title); CharSequence packageName = context.getPackageName(); String contentText = context.getString(R.string.leak_canary_permission_notification_text, packageName); showNotification(context, contentTitle, contentText, pendingIntent, 0xDEAFBEEF); }