package com.seewo.factoryaging.boot;

import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.os.Looper;
import android.util.Log;
import com.seewo.vcommons.data.c;

/* JADX INFO: loaded from: classes.dex */
public class BootReceiver extends BroadcastReceiver {
    static /* synthetic */ void a(Context context) {
        Intent intent = new Intent();
        intent.setComponent(new ComponentName("com.seewo.factoryaging", "com.seewo.factoryaging.MainActivity"));
        intent.addFlags(268435456);
        context.startActivity(intent);
    }

    @Override // android.content.BroadcastReceiver
    public void onReceive(final Context context, Intent intent) {
        String action = intent.getAction();
        Log.d("AgingBootReceiver", "onReceive: action = " + action);
        if (action == null || !action.equals("android.intent.action.BOOT_COMPLETED") || !b.a.e()) {
            System.exit(0);
            return;
        }
        int iF = c.f("persist.sys.aging.start.delay", 20);
        Log.i("AgingBootReceiver", "Boot completed, starting factory aging app after delay: " + iF + " seconds");
        new Handler(Looper.getMainLooper()).postDelayed(new Runnable() { // from class: com.seewo.factoryaging.boot.a
            @Override // java.lang.Runnable
            public final void run() {
                BootReceiver.a(context);
            }
        }, ((long) iF) * 1000);
    }
}
