package com.ifpdos.debugmenu.action;

import android.content.Context;
import android.content.Intent;
import android.os.Handler;
import android.os.Looper;
import android.os.SystemProperties;
import com.ifpdos.debugmenu.DebugMenuApplication;
import com.ifpdos.debugmenu.action.base.ItemSwitchAction;
import d.i.f.c.c;

/* JADX INFO: loaded from: classes.dex */
@Deprecated
public class ShowDebugSwitchAction extends ItemSwitchAction {
    private Runnable mBroadcastRunnable;
    private Handler mHandler;

    public ShowDebugSwitchAction(Context context) {
        super(context);
        this.mHandler = new Handler(Looper.getMainLooper());
        this.mBroadcastRunnable = new Runnable() { // from class: d.f.a.p1.q5
            @Override // java.lang.Runnable
            public final void run() {
                DebugMenuApplication.f1956b.sendBroadcast(new Intent("com.seewo.action.UPDATE_LOG_ENABLE"));
            }
        };
    }

    @Override // com.ifpdos.debugmenu.action.base.ItemSwitchAction
    public boolean isOn(Context context) {
        return c.j();
    }

    @Override // com.ifpdos.debugmenu.action.base.ItemSwitchAction
    public void onSwitch(Context context, boolean z) {
        SystemProperties.set("persist.sys.log.enable", String.valueOf(z));
        boolean z2 = d.i.f.g.c.a;
        d.i.f.g.c.a = c.j();
        d.i.f.g.c.f3658b = c.j();
        this.mHandler.removeCallbacks(this.mBroadcastRunnable);
        this.mHandler.postDelayed(this.mBroadcastRunnable, 1000L);
    }
}
