<commit_before>/*
 * Copyright © 2016 - 2018 by GitHub.com/JasonQS
 * anti-recall.qsboy.com
 * All Rights Reserved
 */

package com.qsboy.antirecall.access;

import android.annotation.SuppressLint;
import android.app.Notification;
import android.os.Bundle;
import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification;
import android.util.Log;


@SuppressLint("OverrideAbstract")
public class NotificationListener extends NotificationListenerService {

    private String packageName;
    private String title;
    private String text;

    String TAG = "NotificationListener";

    @Override
    public void onNotificationPosted(StatusBarNotification sbn) {
        Log.i(TAG, sbn.toString());
        Bundle extras = sbn.getNotification().extras;

        packageName = sbn.getPackageName();
        title = (String) extras.get(Notification.EXTRA_TITLE);
        text = (String) extras.get(Notification.EXTRA_TEXT);

        Log.i(TAG, "Notification - : " +
                " \npackageName: " + packageName +
                " \nTitle: " + title +
                " \nText : " + text);

        super.onNotificationPosted(sbn);
    }

    public boolean isPCApplyLogin() {

        if (!"com.tencent.mm".equals(packageName))
            return false;
        if ("微信".equals(title))
            if ("Mac 微信登录确认".equals(text) || "Windows 微信登录确认".equals(text))
                return true;
        if ("WeChat".equals(title))
            if ("Confirm your login to Mac WeChat".equals(text) || "Mac WeChat登入確認".equals(text))
                return true;

        return false;
    }

}
<commit_msg>windows wechat<commit_after>/*
 * Copyright © 2016 - 2018 by GitHub.com/JasonQS
 * anti-recall.qsboy.com
 * All Rights Reserved
 */

package com.qsboy.antirecall.access;

import android.annotation.SuppressLint;
import android.app.Notification;
import android.os.Bundle;
import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification;
import android.util.Log;


@SuppressLint("OverrideAbstract")
public class NotificationListener extends NotificationListenerService {

    private String packageName;
    private String title;
    private String text;

    String TAG = "NotificationListener";

    @Override
    public void onNotificationPosted(StatusBarNotification sbn) {
        Log.i(TAG, sbn.toString());
        Bundle extras = sbn.getNotification().extras;

        packageName = sbn.getPackageName();
        title = (String) extras.get(Notification.EXTRA_TITLE);
        text = (String) extras.get(Notification.EXTRA_TEXT);

        Log.i(TAG, "Notification - : " +
                " \npackageName: " + packageName +
                " \nTitle: " + title +
                " \nText : " + text);

        super.onNotificationPosted(sbn);
    }

    public boolean isPCApplyLogin() {

        if (!"com.tencent.mm".equals(packageName))
            return false;
        if ("微信".equals(title))
            if ("Mac 微信登录确认".equals(text) || "Windows 微信登录确认".equals(text) || "Windows WeChat登入確認".equals(text))
                return true;
        if ("WeChat".equals(title))
            if ("Confirm your login to Mac WeChat".equals(text) || "Confirm your login to Windows WeChat".equals(text) || "Mac WeChat登入確認".equals(text))
                return true;

        return false;
    }

}

{'fraction_non_alphanumeric': 0.11316329522134272, 'fraction_numerical': 0.004690706537672237, 'mean_word_length': 2.799554565701559, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5013561', 'n_tokens_mistral': 1025, 'n_tokens_neox': 981, 'n_words': 211}