我想知道之间的区别
KeyguardManager localKeyguardManager = (KeyguardManager)getSystemService("keyguard");
String str1 = getClass().toString();
keyguardlock = localKeyguardManager.newKeyguardLock(str1);
keyguardlock.reenableKeyguard(); 和
mDPM = (DevicePolicyManager)getSystemService(Context.DEVICE_POLICY_SERVICE);
mAM = (ActivityManager)getSystemService(Context.ACTIVITY_SERVICE);
mDeviceAdminSample = new ComponentName(Controller.this, UnLockAdminReceiver.class);
setContentView(R.layout.main);
Intent intent = new Intent(DevicePolicyManager.ACTION_ADD_DEVICE_ADMIN); intent.putExtra(DevicePolicyManager.EXTRA_DEVICE_ADMIN, mDeviceAdminSample);
intent.putExtra(DevicePolicyManager.EXTRA_ADD_EXPLANATION, "Additional text explaining why this needs to be added.");
startActivity(intent);
mDPM.lockNow();*用DevicePolicyManager锁定安卓有什么好处?我也需要知道我们是否可以使用DevicePolicyManager解锁手机*
发布于 2012-02-09 19:31:07
keyguardLock方法锁定屏幕,DevicePolicyManager锁方法锁定设备
https://stackoverflow.com/questions/8473773
复制相似问题