Question

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.

Was it helpful?

Solution 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);*/

}

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top