<commit_before>﻿namespace Nine.Application
{
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Threading;
    using System.Threading.Tasks;
    using Android.App;
    using Android.Content;
    using Android.Graphics;
    using Android.Support.V4.App;
    using Android.Text;
    using Android.Views;
    using Android.Widget;
    using Android.Text.Method;

    [Activity]
    class NotificationRedirectActivity : Activity
    {
        public NotificationRedirectActivity()
        {
            Finish();

            if (AppUI._notificationTcs != null)
            {
                AppUI._notificationTcs.TrySetResult(true);
            }
        }
    }

    public partial class AppUI : IAppUI
    {
        private const int NotificationCode = 90002;

        private int lastNotificationId;

        private readonly Func<Context> _contextFactory;

        private DateTime _lastNotificationTime;

        internal static TaskCompletionSource<bool> _notificationTcs;

        public AppUI() : this(ContextProvider.Current) { }
        public AppUI(Context context) : this(() => context) { }
        public AppUI(Func<Context> contextFactory)
        {
            if (contextFactory == null) throw new ArgumentNullException(nameof(contextFactory));

            this._contextFactory = contextFactory;
        }

        public virtual Task<bool> Confirm(string title, string message, string yes, string no, CancellationToken cancellation)<commit_msg>Fix a bug of android notify<commit_after>﻿namespace Nine.Application
{
    using System;
    using System.Collections.Generic;
    using System.IO;
    using System.Linq;
    using System.Threading;
    using System.Threading.Tasks;
    using Android.App;
    using Android.Content;
    using Android.Graphics;
    using Android.Support.V4.App;
    using Android.Text;
    using Android.Views;
    using Android.Widget;
    using Android.Text.Method;

    [Activity]
    class NotificationRedirectActivity : Activity
    {
        protected override void OnStart()
        {
            base.OnStart();
            Finish();
        }

        protected override void OnDestroy()
        {
            base.OnDestroy();
            if (AppUI._notificationTcs != null)
            {
                AppUI._notificationTcs.TrySetResult(true);
            }
        }
    }

    public partial class AppUI : IAppUI
    {
        private const int NotificationCode = 90002;

        private int lastNotificationId;

        private readonly Func<Context> _contextFactory;

        private DateTime _lastNotificationTime;

        internal static TaskCompletionSource<bool> _notificationTcs;

        public AppUI() : this(ContextProvider.Current) { }
        public AppUI(Context context) : this(() => context) { }
        public AppUI(Func<Context> contextFactory)
        {
            if (contextFactory == null) throw new ArgumentNullException(nameof(contextFactory));

            this._contextFactory = contextFactory;
        }

        public virtual Task<bool> Confirm(string title, string message, string yes, string no, CancellationToken cancellation)
{'fraction_non_alphanumeric': 0.0785175879396985, 'fraction_numerical': 0.0037688442211055275, 'mean_word_length': 2.417381974248927, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5185056', 'n_tokens_mistral': 818, 'n_tokens_neox': 787, 'n_words': 206}