Вопрос

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