Hi,
The keycode used is '0x3B' (59).. which maps to keycode.KEYCODE_SHIFT_LEFT

Not sure how this meta-key is responsible to unlock keyguard..
below is the log collected for below sequence

-wait for screen to lock, and unlock.,
-enable logcat, trace input events.
-press  unlock key (not a single keypress, but needs to be kept
pressed down for a duration)


# logcat &
# getevent &
# add device 1: /dev/input/event0
  name:     "omap_keypad"
add device 2: /dev/input/event2
  name:     "Synaptic TM12XX TouchPoint 1"
add device 3: /dev/input/event1
  name:     "Synaptic TM12XX TouchPoint 1"
I/power   (  825): *** set_screen_state 0
E/power   (  825): Failed setting last user activity: g_error=0
W/InputManagerService(  825): Window already focused, ignoring focus
gain of: com.android.internal.view.iinputmethodclient$stub$pr...@437dd6b0
D/dalvikvm(  910): GC freed 1246 objects / 86080 bytes in 47ms
/dev/input/eventrequest_suspend_state: wakeup (0->0) at 5582947052051
(2000-01-01 01:32:59.897705087 UTC)
0: 0001 003b 00000001
D/KeyguardViewMediator(  825): wakeWhenReadyLocked(82)
D/KeyguardViewMediator(  825): handleWakeWhenReady(82)
D/KeyguardViewMediator(  825): pokeWakelock(5000)
I/power   (  825): *** set_screen_state 1
/dev/input/event0: 0001 003b 00000000
/dev/input/event0: 0001 003b 00000001
D/KeyguardViewMediator(  825): pokeWakelock(5000)
W/InputManagerService(  825): Window already focused, ignoring focus
gain of: com.android.internal.view.iinputmethodclient$stub$pr...@4373aae0
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
E/gralloc (  825): [unregister] handle 0x417a00 still locked (state=40000001)
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000002
/dev/input/event0: 0001 003b 00000000



On Fri, Apr 2, 2010 at 8:38 PM, supermaximus79 <[email protected]> wrote:
> Thanks a lot!
>
> Could you tell me, what is the name of lock/unlock button in Android.
> I know that Back button, which return Android to previous screen,
> calls KEY_BACK in Linux.
> I added it to my platform.
> What about lock/unlock?
>
>
> On Apr 1, 2:23 pm, Deva R <[email protected]> wrote:
>> > Alternatively, set a negative value to screen_off_timeout in
>> > settings.db by SQLite access through adb connection.
>>
>> real neat way!!! :>
>>
>> but when i reboot, the phone boots with locked screen.. i have to
>> unlock once, and then it stays unlocked forever..
>>
>> is controls of 
>> /data/data/com.android.providers.settings/databases/settings.db
>> documented somewhere?? looks handy.
>>
>> thanks,
>> deva
>>
>> On Thu, Apr 1, 2010 at 3:00 PM, mizmit1222 <[email protected]> wrote:
>> > Alternatively, set a negative value to screen_off_timeout in
>> > settings.db by SQLite access through adb connection.
>>
>> > $ adb shell
>> > # cd /data/data/com.android.providers.settings/databases
>> > # sqlite3 settings.db
>> > sqlite> update system set value="-1" where name="screen_off_timeout";
>> > sqlite> .quit
>> > $
>>
>> > On Apr 1, 4:43 pm, Deva R <[email protected]> wrote:
>> >> I guess you are tocking about UI lock..
>>
>> >> >>i can't unlock it.
>>
>> >> you can unlock a locked UI, by pressing and dragging the 'lock' button 
>> >> upwards..
>> >> we also mapped a hot key to unlock the screen., will check what
>> >> keyevent it publishes.
>>
>> >> >>how to disable ANDROID to lock screen
>>
>> >> You can get handle to the keyguard manager in App, and disable it..
>>
>> >> somebody posted a snippet for this 
>> >> (source:http://www.androidsnippets.org/snippets/43/)
>> >> KeyguardManager keyguardManager =
>> >> (KeyguardManager)getSystemService(Activity.KEYGUARD_SERVICE);
>> >> KeyguardLock lock = keyguardManager.newKeyguardLock(KEYGUARD_SERVICE);
>> >> lock.disableKeyguard();
>>
>> >> in androidmanifest:
>> >> <uses-permission
>> >> android:name="android.permission.DISABLE_KEYGUARD"></uses-permission>
>>
>> >> 2010/4/1 íÁËÓÉÍ áÎÄÒÕÝÅÎËÏ <[email protected]>:
>>
>> >> > Hi.
>>
>> >> > I have no Android power driver.
>> >> > I applied a patch:
>> >> >http://gitorious.org/flow-g1-5/platform_frameworks_base/commit/4bc6cd...
>> >> > to make for ANDROID fake battery.
>> >> > It works.
>>
>> >> > But after 5 minutes working ANDROID locks screen, on the screen i see 
>> >> > message: charging(96%).
>>
>> >> > My question is, how to disable ANDROID to lock screen, because i can't 
>> >> > unlock it.
>> >> > Is there any patch or solution for this.
>>
>> >> > Regards!
>>
>> >> > --
>> >> > unsubscribe: [email protected]
>> >> > website:http://groups.google.com/group/android-porting
>>
>> >> > To unsubscribe, reply using "remove me" as the subject.
>>
>> > --
>> > unsubscribe: [email protected]
>> > website:http://groups.google.com/group/android-porting
>
> --
> unsubscribe: [email protected]
> website: http://groups.google.com/group/android-porting
>

-- 
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting

Reply via email to