导航菜单

页面标题

页面副标题

Fix Locker v1.5 - DeviceOwnerService.java 源代码

正在查看: Fix Locker v1.5 应用的 DeviceOwnerService.java JAVA 源代码文件

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


package com.user.a4keygen.comp;

import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.os.RemoteException;
import android.os.UserHandle;
import android.os.UserManager;
import android.util.Log;
import com.user.a4keygen.R;
import com.user.a4keygen.common.NotificationUtil;
import com.user.a4keygen.comp.IDeviceOwnerService;

public class DeviceOwnerService extends Service {
    private static final String TAG = "DeviceOwnerService";
    private Binder mBinder;

    @Override
    public void onCreate() {
        this.mBinder = new DeviceOwnerServiceImpl(this);
    }

    @Override
    public IBinder onBind(Intent intent) {
        return this.mBinder;
    }

    static class DeviceOwnerServiceImpl extends IDeviceOwnerService.Stub {
        private final Context mContext;
        private final UserManager mUserManager;

        private DeviceOwnerServiceImpl(Context context) {
            this.mContext = context;
            this.mUserManager = (UserManager) context.getSystemService("user");
        }

        @Override
        public void notifyUserIsUnlocked(UserHandle userHandle) throws RemoteException {
            long serialNumberForUser = this.mUserManager.getSerialNumberForUser(userHandle);
            Context context = this.mContext;
            NotificationUtil.showNotification(context, R.string.po_user_status, context.getString(R.string.po_user_is_unlocked, Long.valueOf(serialNumberForUser)), 0);
            Log.d(DeviceOwnerService.TAG, "notifyUserIsUnlocked() called for user with serial " + serialNumberForUser);
        }
    }
}