导航菜单

页面标题

页面副标题

Fancy Optimizer v4.6.3 - SyncService.java 源代码

正在查看: Fancy Optimizer v4.6.3 应用的 SyncService.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package com.fancyclean.boost.accountsync;

import android.accounts.Account;
import android.app.Service;
import android.content.AbstractThreadedSyncAdapter;
import android.content.ContentProviderClient;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.SyncResult;
import android.os.Bundle;
import android.os.Handler;
import android.os.IBinder;
import android.os.Looper;
import androidx.appcompat.widget.b;
import kotlin.jvm.internal.i;
import vj.e;
import vj.h;

public class SyncService extends Service {
    public static final h c = new h("SyncService");
    public static a d = null;
    public static final Object e = new Object();

    public static class a extends AbstractThreadedSyncAdapter {
        public static final int b = 0;
        public final Handler a;

        public a(Context context) {
            super(context, true);
            this.a = new Handler(Looper.getMainLooper());
        }

        @Override
        public final void onPerformSync(Account account, Bundle bundle, String str, ContentProviderClient contentProviderClient, SyncResult syncResult) {
            h hVar = SyncService.c;
            hVar.c("==> onPerformSync");
            Context context = getContext();
            h hVar2 = y7.a.a;
            SharedPreferences sharedPreferences = context.getSharedPreferences("main", 0);
            if (sharedPreferences != null ? sharedPreferences.getBoolean("is_toast_perform_sync_enabled", false) : false) {
                this.a.post(new b(context, 4));
            }
            long currentTimeMillis = System.currentTimeMillis();
            e eVar = i.i;
            if (currentTimeMillis - eVar.e(0L, context, "check_virus_pattern_update_timestamp") < 172800000) {
                hVar.c("Within check virus pattern update time interval, skip this time");
                return;
            }
            d7.a.a(context).b(true);
            eVar.i(System.currentTimeMillis(), context, "check_virus_pattern_update_timestamp");
            eVar.b(context);
        }
    }

    @Override
    public final IBinder onBind(Intent intent) {
        return d.getSyncAdapterBinder();
    }

    @Override
    public final void onCreate() {
        synchronized (e) {
            if (d == null) {
                d = new a(getApplicationContext());
            }
        }
    }
}