// Path: app/src/main/java/de/vier_bier/habpanelviewer/AdminReceiver.java
// public class AdminReceiver extends DeviceAdminReceiver {
//     public static final ComponentName COMP =
//             new ComponentName("de.vier_bier.habpanelviewer", "de.vier_bier.habpanelviewer.AdminReceiver");
// 
//     public AdminReceiver() {
//     }
// }


import android.app.Activity;
import android.app.admin.DevicePolicyManager;
import android.content.Context;
import de.vier_bier.habpanelviewer.AdminReceiver;
package de.vier_bier.habpanelviewer.command;



/**
 * Handler for ADMIN_LOCK_SCREEN command.
 */
public class AdminHandler implements ICommandHandler {
    private final DevicePolicyManager mDPM;

    public AdminHandler(Activity activity) {
        mDPM = (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE);
    }

    @Override
    public boolean handleCommand(Command cmd) {
        final String cmdStr = cmd.getCommand();

        if ("ADMIN_LOCK_SCREEN".equals(cmdStr)) {
// Path: app/src/main/java/de/vier_bier/habpanelviewer/AdminReceiver.java
// public class AdminReceiver extends DeviceAdminReceiver {
//     public static final ComponentName COMP =
//             new ComponentName("de.vier_bier.habpanelviewer", "de.vier_bier.habpanelviewer.AdminReceiver");
// 
//     public AdminReceiver() {
//     }
// }


// Path: app/src/main/java/de/vier_bier/habpanelviewer/command/AdminHandler.java
import android.app.Activity;
import android.app.admin.DevicePolicyManager;
import android.content.Context;
import de.vier_bier.habpanelviewer.AdminReceiver;

package de.vier_bier.habpanelviewer.command;



/**
 * Handler for ADMIN_LOCK_SCREEN command.
 */
public class AdminHandler implements ICommandHandler {
    private final DevicePolicyManager mDPM;

    public AdminHandler(Activity activity) {
        mDPM = (DevicePolicyManager) activity.getSystemService(Context.DEVICE_POLICY_SERVICE);
    }

    @Override
    public boolean handleCommand(Command cmd) {
        final String cmdStr = cmd.getCommand();

        if ("ADMIN_LOCK_SCREEN".equals(cmdStr)) {
            if (mDPM.isAdminActive(AdminReceiver.COMP)) {