I had caught phone boot event. On boot complete event I am writing following code

        KeyguardManager mKeyguardManager = (KeyguardManager) mContext.getSystemService(KEYGUARD_SERVICE);
        KeyguardLock mLock = mKeyguardManager.newKeyguardLock("MyApp");
        mLock.disableKeyguard();

but what happing I can able to see lock and after that screen is getting unlocked. But requirement is that lock should not be visible at all after booting. My guess is that I need to make modification in framework somewhere in setting file. But I don't know where to modify.

有帮助吗?

解决方案 2

I have did it by commenting following code in KeyguardViewMediator

private void showLocked() {

   /* if (DEBUG) Log.d(TAG, "showLocked");

    Message msg = mHandler.obtainMessage(SHOW);

    mHandler.sendMessage(msg);*/

}

其他提示

but what happing I can able to see lock and after that screen is getting unlocked

You did not lock the screen. Hence, you cannot unlock it. disableKeyguard() is only used to reverse the effects of reenableKeyguard().

My guess is that I need to make modification in framework somewhere in setting file.

If by "setting file" you mean "Java, or possibly C/C++, source code", then yes that is probably the case.

But I don't know where to modify.

StackOverflow is not a great resource for assistance with firmware modifications, sorry.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top